mirror of
https://github.com/codeflash-ai/codeflash-agent.git
synced 2026-05-04 18:25:19 +00:00
Clarify attrs for internals, Pydantic for API boundary only
This commit is contained in:
parent
c978a9d2a9
commit
2221de0a71
1 changed files with 2 additions and 1 deletions
|
|
@ -101,7 +101,8 @@ Package-specific conventions (attrs patterns, type annotations, testing) are in
|
|||
`packages/codeflash-api/` is a ground-up FastAPI rewrite of the Django aiservice from `codeflash-internal/django/aiservice/`. The Django version is the reference implementation — port logic faithfully, don't reimplement from scratch.
|
||||
|
||||
Key design decisions:
|
||||
- FastAPI with async throughout, Pydantic v2 models at every boundary
|
||||
- FastAPI with async throughout
|
||||
- Pydantic v2 for request/response schemas only (API boundary). attrs for all internal domain models — same as the rest of the repo
|
||||
- No Django ORM — use async SQLAlchemy or raw asyncpg for Postgres
|
||||
- Middleware chain as FastAPI dependencies: auth → rate limit → usage tracking
|
||||
- Every module must have comprehensive unit tests, including error paths and edge cases
|
||||
|
|
|
|||
Loading…
Reference in a new issue