Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Inject Configuration copy #585

Unanswered
yaroslavambrozyak asked this question in Q&A
Discussion options

Hi, in my project I have defined a configuration like this
config = providers.Configuration()
then I inject this configuration into a function

async def my_func(config = Provide[Container.config]):
 // some logic here

so if I add/modify any config property it will affect it globaly, so can I somehow inject a copy of the config so then I can modify it inside my function and don't affect the actual config?
Thanks

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /