python-project

Solid

Modern Python project architecture guide for 2025. Use when creating Python projects (APIs, CLI, data pipelines). Covers uv, Ruff, Pydantic, FastAPI, and async patterns.

AI & Automation 140 stars 15 forks Updated today MIT

Install

View on GitHub

Quality Score: 87/100

Stars 20%
72
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Python Project Architecture ## Core Principles - **Type hints everywhere** — Pydantic for runtime, mypy for static - **uv for everything** — Package management, virtualenv, Python version - **Ruff only** — Replace Flake8 + Black + isort with single tool - **src layout** — All code under `src/` directory - **pyproject.toml only** — No setup.py, no requirements.txt - **Async all the way** — Once async, stay async through call chain - **No backwards compatibility** — Delete, don't deprecate. Change directly - **LiteLLM for LLM APIs** — Use LiteLLM proxy for all LLM integrations --- ## No Backwards Compatibility > **Delete unused code. Change directly. No compatibility layers.** ```python # ❌ BAD: Deprecated decorator kept around import warnings def old_function(): warnings.warn("Use new_function instead", DeprecationWarning) return new_function() # ❌ BAD: Alias for renamed functions new_name = old_name # "for backwards compatibility" # ❌ BAD: Unused parameters with underscore def process(_legacy_param, data): ... # ❌ BAD: Version checking for old behavior if version < "2.0": # old behavior ... # ✅ GOOD: Just delete and update all usages def new_function(): ... # Then: Find & replace all old_function → new_function # ✅ GOOD: Remove unused parameters entirely def process(data): ... ``` --- ## LiteLLM for LLM APIs > **Use LiteLLM proxy. Don't call provider APIs directly.** ```python # src/myapp/llm.py from openai import AsyncOpenAI fr...

Details

Author
majiayu000
Repository
majiayu000/claude-arsenal
Created
5 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category