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

Evaluation results

100%

Set Up a New Python Web Service for a Pet Adoption Platform

Criteria
Without context
With context

pyproject.toml with build-system

100%

100%

requires-python >= 3.11

100%

100%

No setup.py created

100%

100%

Dependency groups separated

100%

100%

Ruff configured in pyproject.toml

100%

100%

Mypy configured with strict

100%

100%

.gitignore includes venv

100%

100%

.gitignore includes __pycache__ and .env

100%

100%

__init__.py in all packages

100%

100%

Config uses pydantic-settings BaseSettings

100%

100%

Routes separated by resource

100%

100%

App factory pattern in main.py

100%

100%

Type hints on function signatures

100%

100%

tests/ with conftest.py

100%

100%

Database logic separated

100%

100%

Custom errors with handler registration

100%

100%

98%

-2%

Build a Notification Microservice with Full Test Coverage

Criteria
Without context
With context

pyproject.toml with build-system

100%

100%

requires-python

100%

100%

Separate dev and test groups

100%

100%

Ruff configured

100%

100%

Mypy strict

100%

100%

pytest configured in pyproject.toml

100%

100%

.gitignore comprehensive

100%

100%

__init__.py in all packages

100%

100%

App factory pattern

100%

100%

Config from environment

100%

100%

Routes with APIRouter

100%

100%

Type hints everywhere

100%

87%

conftest.py with fixtures

100%

100%

Multiple test files

100%

100%

tests/ has __init__.py

100%

100%

No setup.py

100%

100%

Pydantic models with Literal types

100%

100%

100%

12%

Build a Python CLI Tool for Log Analysis

Criteria
Without context
With context

pyproject.toml with build-system

100%

100%

[project.scripts] entry point

100%

100%

requires-python >= 3.11

0%

100%

Dependency groups

87%

100%

Ruff configured

100%

100%

Mypy strict

100%

100%

Proper package with __init__.py

100%

100%

py.typed marker

100%

100%

.gitignore with venv and pycache

80%

100%

Type hints on all functions

100%

100%

Tests directory with conftest.py

100%

100%

No setup.py

100%

100%

Separate modules for concerns

100%

100%

pytest configured in pyproject.toml

0%

100%

Data models defined

100%

100%

100%

4%

Create a Reusable Python Library for Data Validation

Criteria
Without context
With context

src layout used

100%

100%

py.typed marker

100%

100%

pyproject.toml with build-system

100%

100%

requires-python

100%

100%

Dependency groups

100%

100%

Ruff configured

100%

100%

Mypy strict

100%

100%

__init__.py with public API

100%

100%

__init__.py in all directories

100%

100%

.gitignore comprehensive

100%

100%

Type hints on all functions

100%

100%

tests/ with conftest and test files

100%

100%

No setup.py

100%

100%

Custom exceptions defined

100%

100%

pytest configured

0%

100%

100%

4%

Restructure a Single-File Flask App into a Proper Project

Criteria
Without context
With context

pyproject.toml with build-system

100%

100%

requires-python

50%

100%

Dependency groups separated

100%

100%

Ruff configured

100%

100%

Mypy strict

100%

100%

.gitignore with venv

100%

100%

.gitignore with pycache and .env

100%

100%

Flask app factory

100%

100%

Config from environment (BaseSettings)

100%

100%

__init__.py everywhere

100%

100%

Routes use Blueprints

100%

100%

Database logic in db.py

100%

100%

Custom errors with handler

100%

100%

Type hints on functions

100%

100%

tests/ with conftest.py and __init__.py

100%

100%

No setup.py

100%

100%

No hardcoded config

75%

100%

Evaluated
Agent
Claude Code
Model
Claude Sonnet 4.6

Table of Contents