Files
headquarter/apps/api/src/scripts/.pi-map.md
T
Developer 070cd4d5a5 chore: track all project map and index files
Add generated .pi-map.md and .pi-map.index.md files across the repository
so the project navigation maps are shared and versioned. These artifacts
are maintained by project_map_init/patch/validate and must be kept in
sync with source edits.

Note: .cache/ remains ignored (added in previous commit).
2026-06-12 13:46:23 +00:00

1.3 KiB

apps/api/src/scripts

dir: apps/api/src/scripts

index: apps/api/src/scripts/.pi-map.index.md

role

Provides utility scripts for administrative and setup tasks for the API application.

files

  • __init__.py | Marks the directory as a Python package and provides a docstring describing it as utility scripts for the API package.
  • seed.py | Seeds a development user into the database using SQLAlchemy async operations, with idempotency check to avoid duplicates. | exp: func:build_seed_user() → Mapping[str, str | None], func:seed_database(session: AsyncSession) → User, call:build_seed_user, call:session.scalar, call:select(User).where, call:User, call:session.add, call:session.commit, call:session.refresh, func:run() → None, call:SessionLocal, call:seed_database, call:print, call:str, func:main() → None, call:asyncio.run, call:run | dep: collections.abc, sqlalchemy, sqlalchemy.ext.asyncio, src.database, src.models.user, asyncio

arch

Simple procedural scripts using async SQLAlchemy for database operations, with idempotency guards for safe re-runs.

tags

seed, user, database, sqlalchemy, package, init, call:build, call:session.scalar

symbols

  • build_seed_user
  • seed_database
  • run
  • main
  • call:build_seed_user
  • call:session.scalar
  • call:select(User).where
  • call:User

workflows

  • change scripts behavior read: __init__.py, seed.py

dirty