def app(monkeypatch, environment, apply_migration) -> FastAPI: # patching environs for key, value in environment.items(): monkeypatch.setenv(key, value) from simcore_service_api_server.core.application import init_app app = init_app() return app
def app(project_env_devel_environment, monkeypatch) -> FastAPI: # overrides conftest.py: app # uses packages/pytest-simcore/src/pytest_simcore/environment_configs.py: env_devel_config # Adds Dockerfile environs monkeypatch.setenv("SC_BOOT_MODE", "production") # settings from environs settings = AppSettings.create_from_envs() settings.API_SERVER_POSTGRES = None settings.API_SERVER_WEBSERVER = None settings.API_SERVER_CATALOG = None mini_app = init_app(settings) return mini_app
"""Main application to be deployed in for example uvicorn. """ from fastapi import FastAPI from simcore_service_api_server.core.application import init_app # SINGLETON FastAPI app the_app: FastAPI = init_app()
def app(project_env_devel_environment) -> FastAPI: _app: FastAPI = init_app() return _app