Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FastAPI media endpoints #4

Draft
wants to merge 10 commits into
base: fastapi-poc
Choose a base branch
from
2 changes: 0 additions & 2 deletions frigate/api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from frigate.api.defs.tags import Tags
from frigate.api.event import EventBp
from frigate.api.export import ExportBp
from frigate.api.media import MediaBp
from frigate.api.notification import NotificationBp
from frigate.api.review import ReviewBp
from frigate.config import FrigateConfig
Expand All @@ -49,7 +48,6 @@
bp = Blueprint("frigate", __name__)
bp.register_blueprint(EventBp)
bp.register_blueprint(ExportBp)
bp.register_blueprint(MediaBp)
bp.register_blueprint(ReviewBp)
bp.register_blueprint(AuthBp)
bp.register_blueprint(NotificationBp)
Expand Down
8 changes: 6 additions & 2 deletions frigate/api/fastapi_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from fastapi import FastAPI

from frigate.api import app as main_app
from frigate.api import preview
from frigate.api import media, preview
from frigate.plus import PlusApi
from frigate.ptz.onvif import OnvifController
from frigate.stats.emitter import StatsEmitter
Expand All @@ -21,9 +21,13 @@ def create_fastapi_app(
stats_emitter: StatsEmitter,
):
logger.info("Starting FastAPI app")
app = FastAPI(debug=False)
app = FastAPI(
debug=False,
swagger_ui_parameters={"apisSorter": "alpha", "operationsSorter": "alpha"},
)
# Routes
app.include_router(main_app.router)
app.include_router(media.router)
app.include_router(preview.router)
# App Properties
app.frigate_config = frigate_config
Expand Down
Loading