|
1 | 1 | """ |
2 | | -mod_api — JSON-only REST API for the CCExtractor CI/sample platform. |
| 2 | +mod_api: JSON REST API blueprint for the CCExtractor CI platform. |
3 | 3 |
|
4 | | -Blueprint registered at /api/v1. All endpoints return structured JSON, |
5 | | -use scoped Bearer token auth, and enforce rate limiting. |
| 4 | +Registered at /api/v1. All endpoints return structured JSON, use scoped |
| 5 | +Bearer token auth, and enforce per-client rate limiting. |
6 | 6 | """ |
7 | 7 |
|
8 | 8 | from flask import Blueprint |
9 | 9 |
|
10 | 10 | mod_api = Blueprint('api', __name__) |
11 | 11 |
|
12 | | -# Import middleware (registers before_request, error handlers) |
13 | | -from mod_api.middleware import error_handler # noqa: E402, F401 |
| 12 | +# Middleware (registers before_request hooks and error handlers) |
14 | 13 | from mod_api.middleware import auth # noqa: E402, F401 |
| 14 | +from mod_api.middleware import error_handler # noqa: E402, F401 |
15 | 15 | from mod_api.middleware import rate_limit # noqa: E402, F401 |
16 | | - |
17 | | -# Import routes (registers endpoint functions) |
| 16 | +# Route modules (registers endpoint functions on the blueprint) |
18 | 17 | from mod_api.routes import auth as auth_routes # noqa: E402, F401 |
| 18 | +from mod_api.routes import errors_logs # noqa: E402, F401 |
| 19 | +from mod_api.routes import results # noqa: E402, F401 |
19 | 20 | from mod_api.routes import runs # noqa: E402, F401 |
20 | 21 | from mod_api.routes import samples # noqa: E402, F401 |
21 | | -from mod_api.routes import results # noqa: E402, F401 |
22 | | -from mod_api.routes import errors_logs # noqa: E402, F401 |
23 | 22 | from mod_api.routes import system # noqa: E402, F401 |
0 commit comments