diff --git a/api/settings.py b/api/settings.py index 373e24e..bdf1204 100644 --- a/api/settings.py +++ b/api/settings.py @@ -12,6 +12,9 @@ https://docs.djangoproject.com/en/5.1/ref/settings/ import os from pathlib import Path +from dotenv import load_dotenv + +load_dotenv() # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent diff --git a/pyproject.toml b/pyproject.toml index 4cee924..e957ea7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,5 +12,6 @@ dependencies = [ "gunicorn>=23.0.0", "psycopg[binary]>=3.2.5", "pydantic[email]>=2.10.6", + "python-dotenv>=1.0.1", "uvicorn>=0.34.0", ] diff --git a/requirements.txt b/requirements.txt index dfab4df..288583b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -15,6 +15,7 @@ psycopg==3.2.5 psycopg-binary==3.2.5 pydantic==2.10.6 pydantic-core==2.27.2 +python-dotenv==1.0.1 sqlparse==0.5.3 typing-extensions==4.12.2 uvicorn==0.34.0 diff --git a/uv.lock b/uv.lock index cbfb00c..1220069 100644 --- a/uv.lock +++ b/uv.lock @@ -233,6 +233,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/51/b2/b2b50d5ecf21acf870190ae5d093602d95f66c9c31f9d5de6062eb329ad1/pydantic_core-2.27.2-cp313-cp313-win_arm64.whl", hash = "sha256:ac4dbfd1691affb8f48c2c13241a2e3b60ff23247cbcf981759c768b6633cf8b", size = 1885186 }, ] +[[package]] +name = "python-dotenv" +version = "1.0.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/bc/57/e84d88dfe0aec03b7a2d4327012c1627ab5f03652216c63d49846d7a6c58/python-dotenv-1.0.1.tar.gz", hash = "sha256:e324ee90a023d808f1959c46bcbc04446a10ced277783dc6ee09987c37ec10ca", size = 39115 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6a/3e/b68c118422ec867fa7ab88444e1274aa40681c606d59ac27de5a5588f082/python_dotenv-1.0.1-py3-none-any.whl", hash = "sha256:f7b63ef50f1b690dddf550d03497b66d609393b40b564ed0d674909a68ebf16a", size = 19863 }, +] + [[package]] name = "sqlparse" version = "0.5.3" @@ -285,6 +294,7 @@ dependencies = [ { name = "gunicorn" }, { name = "psycopg", extra = ["binary"] }, { name = "pydantic", extra = ["email"] }, + { name = "python-dotenv" }, { name = "uvicorn" }, ] @@ -297,5 +307,6 @@ requires-dist = [ { name = "gunicorn", specifier = ">=23.0.0" }, { name = "psycopg", extras = ["binary"], specifier = ">=3.2.5" }, { name = "pydantic", extras = ["email"], specifier = ">=2.10.6" }, + { name = "python-dotenv", specifier = ">=1.0.1" }, { name = "uvicorn", specifier = ">=0.34.0" }, ]