mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-28 20:44:01 +03:00
Update decoupled-packages example
This commit is contained in:
parent
7c1d8d5225
commit
da636171de
|
@ -35,7 +35,6 @@ def main(
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
application = ApplicationContainer()
|
application = ApplicationContainer()
|
||||||
application.config.from_ini("config.ini")
|
|
||||||
application.wire(modules=[__name__])
|
application.wire(modules=[__name__])
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
|
|
@ -12,7 +12,7 @@ from .analytics.containers import AnalyticsContainer
|
||||||
|
|
||||||
class ApplicationContainer(containers.DeclarativeContainer):
|
class ApplicationContainer(containers.DeclarativeContainer):
|
||||||
|
|
||||||
config = providers.Configuration()
|
config = providers.Configuration(ini_files=["config.ini"])
|
||||||
|
|
||||||
sqlite = providers.Singleton(sqlite3.connect, config.database.dsn)
|
sqlite = providers.Singleton(sqlite3.connect, config.database.dsn)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user