Initial commit
Some checks failed
Run linters on applied template / Python 3.13 lint and build (push) Failing after 39s
Some checks failed
Run linters on applied template / Python 3.13 lint and build (push) Failing after 39s
This is a FastAPI backend microservice template used with `copier` utility. Features of applied template are: - Configuration file processing logic - Metrics and tracing (both optional) configuration available - Debug endpoints - Database migration commands, prepared Alembic environment - Database usage example in ping_db endpoint - gitea sanity check pipeline
This commit is contained in:
20
{{project_slug}}/handlers/__init__.py
Normal file
20
{{project_slug}}/handlers/__init__.py
Normal file
@@ -0,0 +1,20 @@
|
||||
"""All FastAPI handlers are exported from this module."""
|
||||
|
||||
import importlib
|
||||
from pathlib import Path
|
||||
|
||||
from .routers import routers_list
|
||||
|
||||
for file in sorted(Path(__file__).resolve().parent.iterdir()):
|
||||
if file.name.endswith(".py"):
|
||||
importlib.import_module(f".{file.name[:-3]}", __package__)
|
||||
|
||||
|
||||
list_of_routers = [
|
||||
*routers_list,
|
||||
]
|
||||
|
||||
|
||||
__all__ = [
|
||||
"list_of_routers",
|
||||
]
|
||||
Reference in New Issue
Block a user