CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/python-project-structure

Python project structure — pyproject.toml, src layout, __init__.py, .gitignore, dependency groups, type hints, py.typed, test structure, entry points, ruff/mypy configuration

91

1.03x
Quality

87%

Does it follow best practices?

Impact

99%

1.03x

Average score across 5 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

project-organization.jsonverifiers/

{
  "instruction": "Organize Python code into a package with __init__.py, separate routes by resource, and load config from environment",
  "relevant_when": "Agent builds a Python web application with multiple files",
  "context": "Application code must live in a proper Python package (directory with __init__.py), not as loose .py files. Routes should be separated by resource into a routes/ subdirectory using APIRouter or Blueprints. Database logic belongs in db.py, not in route handlers. Configuration must come from environment variables using pydantic-settings BaseSettings, not hardcoded values. Use model_config dict instead of inner class Config (Pydantic v2).",
  "sources": [
    {
      "type": "file",
      "filename": "skills/python-project-structure/SKILL.md",
      "tile": "tessl-labs/python-project-structure@0.2.0"
    }
  ],
  "checklist": [
    {
      "name": "app-package-exists",
      "rule": "Agent creates a Python package (directory with __init__.py) rather than putting everything in one file",
      "relevant_when": "Agent builds a multi-file Python application"
    },
    {
      "name": "routes-separated",
      "rule": "Routes are separated by resource into individual files in a routes/ subdirectory, each with its own router",
      "relevant_when": "Agent creates a web API with multiple resource types"
    },
    {
      "name": "config-from-environment",
      "rule": "Configuration uses pydantic-settings BaseSettings to load from environment variables, not hardcoded values",
      "relevant_when": "Agent creates a Python application with configurable settings"
    },
    {
      "name": "db-separated",
      "rule": "Database logic is in a separate db.py module, not mixed into route handler files",
      "relevant_when": "Agent creates a Python web application with database access"
    }
  ]
}

tile.json