location: add all.py, using takeout/gpslogger/ip (#237)

* location: add all.py, using takeout/gpslogger/ip, update docs
This commit is contained in:
seanbreckenridge 2022-04-26 13:11:35 -07:00 committed by GitHub
parent 66a00c6ada
commit 2cb836181b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 488 additions and 46 deletions

View file

@ -2,17 +2,13 @@
Simple location provider, serving as a fallback when more detailed data isn't available
'''
from dataclasses import dataclass
from datetime import datetime, date, time, timezone
from datetime import datetime, time, timezone
from functools import lru_cache
from typing import Sequence, Tuple, Union, cast
from my.config import location as user_config
DateIsh = Union[datetime, date, str]
# todo hopefully reasonable? might be nice to add name or something too
LatLon = Tuple[float, float]
from my.location.common import LatLon, DateIsh
@dataclass
class Config(user_config):