Skip to content

Instantly share code, notes, and snippets.

@FlorianLudwig
Created July 19, 2018 09:32
Show Gist options
  • Save FlorianLudwig/6e4c6f8c039a9408c4daf725d4b249d6 to your computer and use it in GitHub Desktop.
Save FlorianLudwig/6e4c6f8c039a9408c4daf725d4b249d6 to your computer and use it in GitHub Desktop.
dependecy injection
context = {
'a': 'something-that-should-be-injected'
}
import di
@di.inject
def with_param(a):
print(a)
def via_call():
a = di.get('a')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment