mirror of
				https://github.com/ets-labs/python-dependency-injector.git
				synced 2025-11-04 18:07:44 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			455 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			455 B
		
	
	
	
		
			Python
		
	
	
	
	
	
"""Application module."""
 | 
						|
 | 
						|
from flask import Flask
 | 
						|
from flask_bootstrap import Bootstrap4
 | 
						|
 | 
						|
from .containers import Container
 | 
						|
from .blueprints import example
 | 
						|
 | 
						|
 | 
						|
def create_app() -> Flask:
 | 
						|
    container = Container()
 | 
						|
    container.config.github.auth_token.from_env("GITHUB_TOKEN")
 | 
						|
 | 
						|
    app = Flask(__name__)
 | 
						|
    app.container = container
 | 
						|
    app.register_blueprint(example.blueprint)
 | 
						|
 | 
						|
    bootstrap = Bootstrap4()
 | 
						|
    bootstrap.init_app(app)
 | 
						|
 | 
						|
    return app
 |