pyproject-config
pyproject.toml Configuration
Standard configuration for Python projects using setuptools, ruff, and pytest.
Console Scripts
[project.scripts]
my-tool = "your_package.cli:main"
Build System (src layout)
[build-system]
requires = ["setuptools>=68.0.0"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
package-dir = {"" = "src"}
[tool.setuptools.packages.find]
where = ["src"]
This enables uv pip install -e . for editable installs with a src/ layout.
Ruff
[tool.ruff]
target-version = "py313"
line-length = 100
src = ["src", "tests"]
[tool.ruff.lint]
select = ["E", "F", "I"]
ignore = ["E203", "W503"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
Pytest
[tool.pytest.ini_options]
python_files = ["test_*.py", "*_test.py", "*_tests.py"]
Project Layout
.
pyproject.toml # project metadata, deps, tooling
Makefile # common tasks (run, lint, test, build)
.env.server # server env vars
src/ # application/CLI package (editable install)
cli.py # Click CLI entrypoint
server/ # FastAPI app
main.py # ASGI entrypoint
templates/ # Jinja2 templates
static/ # static assets
data/ # datasets and outputs
plots/ # generated figures
Keep a src/ layout for packages so editable installs work cleanly. Use .env.server and .env.client for local development with .env.example files alongside code.
More from brojonat/llmsrules
ibis-data
Use Ibis for database-agnostic data access in Python. Use when writing data queries, connecting to databases (DuckDB, PostgreSQL, SQLite), or building portable data pipelines that should work across backends.
13go-service
Build Go microservices with stdlib HTTP handlers, sqlc, urfave/cli, and slog. Use when creating or modifying a Go HTTP server, adding routes, middleware, database queries, or CLI commands.
13temporal-go
Build Temporal workflow applications in Go. Use when creating or modifying Temporal workflows, activities, workers, clients, signals, queries, updates, retry policies, saga patterns, or writing Temporal tests.
13parquet-analysis
Analyze parquet files using Python and Ibis. Use when the user wants to explore, transform, or analyze parquet data files, perform aggregations, joins, or export results. Works with local parquet files and provides database-agnostic data operations.
12ducklake
Work with DuckLake, an open lakehouse format built on DuckDB. Use when creating or querying DuckLake tables, managing snapshots, time travel, schema evolution, partitioning, or lakehouse maintenance operations.
12temporal-python
Build Temporal applications in Python using the temporalio SDK. Use when creating workflows, activities, workers, clients, signals, queries, updates, child workflows, timers, retry policies, saga/compensation patterns, testing, or any durable execution pattern in Python.
12