Coding
PromptBeginner5 minmarkdown
Markdown Converter
Agent skill for markdown-converter
7
- `src/tenauth/fastapi.py` publishes FastAPI dependencies (`require_auth`, `build_access_scoped_session_dependency`) for wiring auth and database access into routes.
Sign in to like and favorite skills
src/tenauth/fastapi.py publishes FastAPI dependencies (require_auth, build_access_scoped_session_dependency) for wiring auth and database access into routes.src/tenauth/session.py owns tenant-aware session management, including helpers to apply and reset Postgres GUCs.src/tenauth/models.py contains the Pydantic models (AuthContext, AccessContext) shared across the API surface.src/tenauth/tenancy.py offers DSN utilities for injecting tenant metadata into connection strings.tests/, mirroring module names (for example tests/test_auth_jwt.py), and packaging metadata lives in pyproject.toml.uv.lock:
uv pip sync
uv run pytest
uv run python -m tenauth.fastapi
uv is unavailable, fall back to python -m venv .venv && source .venv/bin/activate followed by pip install -e .[dev].from __future__ import annotations for future-proof typing.snake_case for functions/variables, PascalCase for Pydantic models, and persist UUIDs as UUID objects (avoid stringly-typed helpers).HTTPException for client-facing errors and RuntimeError for internal assertion failures; reuse logger for diagnostic logging.tests/ using the test_*.py pattern and pytest style asserts.pytest.mark.asyncio; leverage the provided signed JWT fixture when exercising auth flows.uv run pytest -k name to focus on a module while iterating.add, refactor, fix) and keep the subject ≤72 characters.uv run pytest output or reasoning when skipped), and links to related issues or design notes.