Spaces:
Sleeping
Sleeping
Download app/api/v1/api.py from MustafaHussein/Saudi_Law_Vision: direct link, hf CLI and curl.
- Browser
- Download file 1.69 kB
-
https://huggingface.co/spaces/MustafaHussein/Saudi_Law_Vision/resolve/main/app/api/v1/api.py
- Command line
-
hf download hf://spaces/MustafaHussein/Saudi_Law_Vision/app/api/v1/api.py
-
curl -L -o api.py https://huggingface.co/spaces/MustafaHussein/Saudi_Law_Vision/resolve/main/app/api/v1/api.py
1.69 kB
| """ | |
| Main API Router — combines all endpoint routers | |
| File: app/api/v1/api.py | |
| """ | |
| from fastapi import APIRouter | |
| api_router = APIRouter() | |
| _routers = [ | |
| ("app.api.v1.endpoints.auth", "/auth", ["Authentication"]), | |
| ("app.api.v1.endpoints.users", "/users", ["Users"]), | |
| ("app.api.v1.endpoints.clients", "/clients", ["Clients"]), | |
| ("app.api.v1.endpoints.tickets", "/tickets", ["Tickets"]), | |
| ("app.api.v1.endpoints.reminders", "/reminders", ["Reminders"]), | |
| ("app.api.v1.endpoints.documents", "/documents", ["Documents"]), | |
| ("app.api.v1.endpoints.notifications", "/notifications", ["Notifications"]), | |
| ("app.api.v1.endpoints.financial", "/financial", ["Financial"]), | |
| ("app.api.v1.endpoints.analytics", "/analytics", ["Analytics"]), | |
| ("app.api.v1.endpoints.dashboard", "/dashboard", ["Dashboard"]), | |
| ("app.api.v1.endpoints.lawyers", "/lawyers", ["Lawyers"]), | |
| ("app.api.v1.endpoints.cases", "/cases", ["Cases"]), | |
| ("app.api.v1.endpoints.llm", "/llm", ["AI Assistant"]), | |
| ] | |
| for module_path, prefix, tags in _routers: | |
| try: | |
| import importlib | |
| module = importlib.import_module(module_path) | |
| api_router.include_router( | |
| module.router, | |
| prefix=prefix, | |
| tags=tags, | |
| # redirect_slashes removed — not supported in this FastAPI version | |
| # Handled at app level: FastAPI(redirect_slashes=False) in main.py | |
| ) | |
| print(f" ✅ Loaded: {prefix}") | |
| except Exception as e: | |
| print(f" ⚠️ Skipped {prefix}: {e}") |