aswi2021jmsd-gitlab/src/config/configuration.py @ 3195e946
1 | aff74b5a | Jan Pašek | from injector import singleton |
---|---|---|---|
2 | |||
3 | |||
4 | class Configuration: |
||
5 | |||
6 | def __init__(self, connection_string): |
||
7 | self.connection_string = connection_string |
||
8 | |||
9 | |||
10 | def configure_default(binder): |
||
11 | configuration = Configuration("db/database_sqlite.db") |
||
12 | binder.bind(Configuration, to=configuration, scope=singleton) |