Python project structure — pyproject.toml, src layout, __init__.py, .gitignore, dependency groups, type hints, py.typed, test structure, entry points, ruff/mypy configuration
91
87%
Does it follow best practices?
Impact
99%
1.03xAverage score across 5 eval scenarios
Passed
No known issues
A small nonprofit is building a pet adoption platform. They need a FastAPI backend that manages pets (dogs, cats, rabbits) and adoption applications. The API will be deployed to a cloud VM running Ubuntu with Python 3.12.
The team wants the project scaffolded properly from scratch so it is maintainable as volunteers contribute. They care about clean project organization, proper dependency management, and being able to run linting and type checking in CI.
Produce a complete project structure with:
pyproject.toml -- project metadata, dependencies (FastAPI, uvicorn, pydantic, pydantic-settings, sqlalchemy), dev/test dependency groups (pytest, httpx, ruff, mypy), tool configuration for ruff and mypy.gitignore -- proper Python ignores including virtual environment, bytecode, build artifacts, .env__init__.py files in all package directoriesconfig.py -- Settings from environment using pydantic-settings BaseSettingsmodels.py -- Pydantic models for Pet (name, species, breed, age, status), AdoptionApplication (applicant_name, pet_id, message, status)routes/pets.py -- CRUD endpoints for pets using APIRouterroutes/applications.py -- Endpoints for adoption applications using APIRouterdb.py -- Database connection and query functions (can use in-memory store)errors.py -- Custom exception classes with error handler registrationmain.py -- App factory pattern with router registration, error handlers, and startup eventtests/ directory with conftest.py containing test fixtures and at least one test fileFocus on project structure, packaging, and tooling rather than complete business logic. Use type hints on all function signatures.
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
skills
python-project-structure
verifiers