Files
moneyfy/backend/app/scripts/seed.py
T
moneyfyandClaude Opus 5 0b06775be3 feat: Projektfundament mit Datenmodell, Migrationen und Seed
- Repo-Struktur für Backend, Frontend, Dokumentation und Gitea-Workflows
- FastAPI-Skeleton mit pydantic-settings und RFC-7807-artigem Fehlerformat
- Vollständiges Datenmodell (15 Tabellen) als SQLAlchemy-2.0-Modelle
- Alembic gegen die Async-Engine inklusive Erstmigration
- Idempotenter Seed für den deutschen Kategoriebaum und Standardregeln
- Endpunkte /api/health und /api/version
- pytest-Infrastruktur mit transaktionsisolierten Fixtures

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014e7t8UpmoVNMtWivY5LiSH
2026-09-09 13:12:08 +02:00

21 lines
515 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""CLI: Stammdaten seeden `python -m app.scripts.seed`."""
import asyncio
from app.db.session import SessionLocal, engine
from app.services.seed import seed_all
async def main() -> None:
async with SessionLocal() as session:
result = await seed_all(session)
await engine.dispose()
print(
f"Seed fertig: {result['categories']} Kategorien, "
f"{result['notification_rules']} Benachrichtigungsregeln neu angelegt."
)
if __name__ == "__main__":
asyncio.run(main())