diff --git a/.gitignore b/.gitignore index 58089a3..30799f5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,8 @@ -# Created by https://www.toptal.com/developers/gitignore/api/dotenv,python,visualstudiocode -# Edit at https://www.toptal.com/developers/gitignore?templates=dotenv,python,visualstudiocode +# Created by https://www.toptal.com/developers/gitignore/api/dotenv,python,visualstudiocode,direnv +# Edit at https://www.toptal.com/developers/gitignore?templates=dotenv,python,visualstudiocode,direnv + +### direnv ### +.direnv ### dotenv ### .env @@ -194,9 +197,8 @@ pyrightconfig.json .history .ionide -# End of https://www.toptal.com/developers/gitignore/api/dotenv,python,visualstudiocode +# End of https://www.toptal.com/developers/gitignore/api/dotenv,python,visualstudiocode,direnv -result data/* cert/* diff --git a/config.py b/config.py index 9823d83..2cdb17a 100644 --- a/config.py +++ b/config.py @@ -18,10 +18,7 @@ OVERPASS_API_URL = 'https://overpass-api.de/api/interpreter' OPENSTREETMAP_API_URL = os.getenv('OPENSTREETMAP_API_URL', 'https://api.openstreetmap.org/api/0.6/') REPLICATION_URL = 'https://planet.openstreetmap.org/replication/minute/' -COUNTRIES_GEOJSON_URL = ( - 'https://raw.githubusercontent.com/Zaczero/osm-countries-geojson/main/geojson/osm-countries-0-01.geojson.br' -) - +COUNTRIES_GEOJSON_URL = 'https://osm-countries-geojson.monicz.dev/osm-countries-0-01.geojson.br' DEFAULT_CACHE_MAX_AGE = timedelta(minutes=1) DEFAULT_CACHE_STALE = timedelta(minutes=5) diff --git a/osm_countries.py b/osm_countries.py index dd0800b..f511e08 100644 --- a/osm_countries.py +++ b/osm_countries.py @@ -1,6 +1,6 @@ from collections.abc import Sequence -import brotli +import brotlicffi as brotli import orjson from shapely.geometry import shape diff --git a/poetry.lock b/poetry.lock index b4e3fa7..98aeb0e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2209,4 +2209,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.12" -content-hash = "48fbb10bd2e88cb26838d0f395f11981176bdf2f21090fa6bd91c769e5794288" +content-hash = "06c5a5903df8c8d4887cc720bdc6d5642d97f37cc6b3d3799e4d2b566ce0ff2b" diff --git a/pyproject.toml b/pyproject.toml index c264a53..3e20a61 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,6 +36,7 @@ uvicorn = {extras = ["standard"], version = "^0.25.0"} xmltodict = "^0.13.0" tzfpy = "^0.15.3" pytz = "^2023.3.post1" +brotlicffi = "^1.1.0.0" [build-system] build-backend = "poetry.core.masonry.api"