Skip to content

Commit a07c9fa

Browse files
committed
feat: add env loading
1 parent 40359af commit a07c9fa

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

app/container.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ class Container(containers.DeclarativeContainer):
1010
]
1111
)
1212

13-
config = providers.Configuration(ini_files=["config.ini"], strict=True)
13+
config = providers.Configuration(
14+
ini_files=["config.ini"],
15+
strict=True
16+
)
1417

1518
spotify_service = providers.Singleton(
1619
SpotifyService,

app/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
from dotenv import load_dotenv
12
from fastapi import FastAPI
23
from pydantic import TypeAdapter
34

45
from app.container import Container
56
from app.spotify.router import spotify_router
67
from app.system.router import system_router
78

9+
load_dotenv()
810
container = Container()
911

1012

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
spotipy==2.23.0
2-
environs==9.5.0
2+
python-dotenv==1.0.0
33
fastapi[all]==0.104.1
44
typing_inspect==0.9.0
5-
dependency-injector==4.41.0
5+
dependency-injector==4.41.0

0 commit comments

Comments
 (0)