Coverage for app_modules/__init__.py: 100%
0 statements
« prev ^ index » next coverage.py v7.10.4, created at 2025-08-20 00:55 +0200
« prev ^ index » next coverage.py v7.10.4, created at 2025-08-20 00:55 +0200
1"""
2app_modules package
4Purpose:
5 - Provide a modular structure for the Flask application so that `app.py` acts
6 purely as the initializer/entrypoint while all business logic, routes,
7 helpers, and configuration live in dedicated modules.
9Contents:
10 - paths.py: Centralized filesystem paths (ROOT_DIR, STATIC_PATH, DB_PATH)
11 - config.py: Flask configuration classes and helpers
12 - db.py: SQLite connection lifecycle and teardown registration
13 - security.py: Authentication/authorization decorators
14 - assets.py: Icon/url helpers, icon context processor, and /assets blueprint
15 - helpers.py: Timestamp parsing, formatting, and path normalization helpers
16 - images_service.py: Image collection, grouping, and latest-file discovery
17 - views.py: Auth pages (login/logout), selection, and add-camera view
18 - cameras_api.py: CRUD API for cameras
19 - gallery.py: Gallery routes and image deletion API
20 - map_routes.py: Map and markers routes/APIs (Leaflet integration)
21 - admin_routes.py: Admin panel and admin actions
23Usage:
24 - `app.py` imports blueprints and init helpers from this package and registers
25 them on the Flask app. All modules are designed to be import-safe and have
26 no side effects until `init_app` or blueprint registration occurs.
27"""