Flatness, accessibility and metric spaces