Best practiace when parsing settings into multiple functions #8877
Replies: 1 comment
-
|
Could you post a more complete code sample? Where is your FastAPI |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I read environment variables from a .env file like in your example here. But I need to parse the
settingsinto multiple functions, not just one. Somethings like this:It works only the first time. At the 2nd call in B function, it raises an error:
AttributeError: 'Depends' object has no attribute bardespite that vscode still suggestsbarwhile I'm typingsetting.I find my practice is kinda bad. Could you suggest a better one?Beta Was this translation helpful? Give feedback.
All reactions