WIP: Migration to async_pymongo

This commit is contained in:
2023-08-14 13:44:07 +02:00
parent 80ec8eb4f3
commit a1acaed6dd
13 changed files with 196 additions and 175 deletions

View File

@@ -1,4 +1,6 @@
import contextlib
from pathlib import Path
from typing import Mapping, Union
from exif import Image
@@ -21,7 +23,7 @@ def decimal_coords(coords: float, ref: str) -> float:
return round(decimal_degrees, 5)
def extract_location(filepath: str) -> dict:
def extract_location(filepath: Union[str, Path]) -> Mapping[str, float]:
"""Get location data from image
### Args: