mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-22 17:47:02 +03:00
Update services example
This commit is contained in:
parent
1292d4af68
commit
8bc5b35903
|
@ -68,7 +68,7 @@ Example
|
||||||
from dependency_injector import providers
|
from dependency_injector import providers
|
||||||
from dependency_injector import injections
|
from dependency_injector import injections
|
||||||
|
|
||||||
import services # Example business services module (Users, Photos, Auth)
|
from example import services
|
||||||
|
|
||||||
|
|
||||||
class Platform(catalogs.DeclarativeCatalog):
|
class Platform(catalogs.DeclarativeCatalog):
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
"""Flask application."""
|
|
||||||
|
|
||||||
import flask
|
|
||||||
|
|
||||||
|
|
||||||
app = flask.Flask(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
app.run()
|
|
|
@ -1,8 +0,0 @@
|
||||||
"""Services package."""
|
|
||||||
|
|
||||||
from dependency_injector import catalogs
|
|
||||||
from dependency_injector import providers
|
|
||||||
|
|
||||||
|
|
||||||
class ServicesModule(catalogs.DeclarativeCatalog):
|
|
||||||
"""Service providers module."""
|
|
1
examples/miniapps/services/example/__init__.py
Normal file
1
examples/miniapps/services/example/__init__.py
Normal file
|
@ -0,0 +1 @@
|
||||||
|
"""Example top-level package."""
|
|
@ -1,4 +1,4 @@
|
||||||
"""Services module."""
|
"""Example business services module."""
|
||||||
|
|
||||||
|
|
||||||
class Users(object):
|
class Users(object):
|
|
@ -9,7 +9,7 @@ from dependency_injector import catalogs
|
||||||
from dependency_injector import providers
|
from dependency_injector import providers
|
||||||
from dependency_injector import injections
|
from dependency_injector import injections
|
||||||
|
|
||||||
import services # Example business services module (Users, Photos, Auth)
|
from example import services
|
||||||
|
|
||||||
|
|
||||||
class Platform(catalogs.DeclarativeCatalog):
|
class Platform(catalogs.DeclarativeCatalog):
|
Loading…
Reference in New Issue
Block a user