CLAUDE.md@by-language/pythonA

CLAUDE.md@by-language/python from overseastelegramaliterateperson865/awesome-claude-md is a CLAUDE.md file: the standing instructions Claude Code reads in that repo.

Install it, pinned
mdr add overseastelegramaliterateperson865/awesome-claude-md/by-language/python/CLAUDE.md@git:20260320.fcf2609

Pins git:20260320.fcf2609 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 14 of 14 checks passed
Kind
CLAUDE.md file
Repository
overseastelegramaliterateperson865/awesome-claude-md
Path
by-language/python/CLAUDE.md
Versions recorded
1
Latest version
git:20260320.fcf2609, committed Mar 20, 2026
Size
2,021 bytes
Repository stars
3
License
MIT

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# Python 项目规范

## 环境与依赖

- Python >= 3.11,使用 `uv` 管理虚拟环境和依赖(优先),备选 poetry
- 激活环境:`uv venv && source .venv/bin/activate`
- 安装依赖:`uv pip install -e ".[dev]"`,不要用裸 `pip install`
- 锁文件 `uv.lock` 必须提交,手动修改 pyproject.toml 后执行 `uv lock`

## 类型标注(严格模式)

- 所有公开函数必须有完整的参数和返回值类型标注
- 禁止使用 `Any`,除非有注释说明原因
- 容器类型用 `list[str]` 而非 `List[str]`(Python 3.9+ 内置泛型)
- 可选参数用 `str | None = None`,不用 `Optional[str]`
- 运行 `mypy --strict src/` 零错误

## 测试

- 框架:pytest,配置写在 pyproject.toml 的 `[tool.pytest.ini_options]`
- 运行全部测试:`pytest -x -q`,单文件:`pytest tests/test_xxx.py -v`
- 测试文件与源码目录镜像:`src/app/services/user.py` -> `tests/services/test_user.py`
- fixture 放 `tests/conftest.py`,按模块拆分避免单文件过大
- 覆盖率:`pytest --cov=src --cov-report=term-missing`,目标 >= 80%

## Linting 与格式化

- 唯一工具:ruff(替代 flake8 + isort + black)
- 格式化:`ruff format src/ tests/`
- 检查:`ruff check src/ tests/ --fix`
- 提交前必须通过:`ruff check && ruff format --check && mypy --strict src/`

## 项目结构

```
src/
  app/
    __init__.py
    models/       # 数据模型(dataclass / Pydantic)
    services/     # 业务逻辑,不依赖框架
    utils/        # 纯工具函数,无副作用
tests/
pyproject.toml
```

## 常见陷阱

- 默认可变参数:写 `def f(items: list[int] | None = None)` 而非 `def f(items: list[int] = [])`
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add overseastelegramaliterateperson865/awesome-claude-md/by-language/python/CLAUDE.md@sha256:0b4d651677f053f7

The line at the top of this page pins the label git:20260320.fcf2609, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_vx6fuvvy7et545kr.svg)](https://markdownregistry.com/a/art_vx6fuvvy7et545kr)

2 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 1 version of this file, committed on Mar 20, 2026.

versioncommittedcommitsizeaudit
git:20260320.fcf2609 latest2026-03-20 fcf2609 2,021 BA view

Audit of the latest version

A  14 of 14 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Size between 200 bytes and 200 KB (2021 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

overseastelegramaliterateperson865/awesome-claude-md · 3 stars · license MIT · pushed 2026-10-14 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_vx6fuvvy7et545kr
GET https://markdownregistry.com/api/v1/resolve?ref=overseastelegramaliterateperson865/awesome-claude-md/by-language/python/CLAUDE.md
GET https://markdownregistry.com/api/v1/blob/0b4d651677f053f77f949d9905af6e59b9b1baf9d26d2ca530f6eb316ad29ce6

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: what a CLAUDE.md file is · keeping AGENTS.md and CLAUDE.md in sync · which agent file does what.

More from overseastelegramaliterateperson865/awesome-claude-md

CLAUDE.md@by-framework/fastapi CLAUDE.md file
overseastelegramaliterateperson865/awesome-claude-md · by-framework/fastapi/CLAUDE.md
git:20260320.9b01aca · audit A · 3 stars
CLAUDE.md@by-framework/nextjs CLAUDE.md file
overseastelegramaliterateperson865/awesome-claude-md · by-framework/nextjs/CLAUDE.md
git:20260320.9b01aca · audit A · 3 stars
CLAUDE.md@by-framework/react CLAUDE.md file
overseastelegramaliterateperson865/awesome-claude-md · by-framework/react/CLAUDE.md
git:20260320.9b01aca · audit A · 3 stars
CLAUDE.md@by-framework/spring-boot CLAUDE.md file
overseastelegramaliterateperson865/awesome-claude-md · by-framework/spring-boot/CLAUDE.md
git:20260320.9b01aca · audit A · 3 stars
CLAUDE.md@by-framework/svelte CLAUDE.md file
overseastelegramaliterateperson865/awesome-claude-md · by-framework/svelte/CLAUDE.md
git:20260405.ab9f266 · audit B · 3 stars
CLAUDE.md@by-framework/tauri CLAUDE.md file
overseastelegramaliterateperson865/awesome-claude-md · by-framework/tauri/CLAUDE.md
git:20260320.fcf2609 · audit A · 3 stars
CLAUDE.md@by-framework/uni-app CLAUDE.md file
overseastelegramaliterateperson865/awesome-claude-md · by-framework/uni-app/CLAUDE.md
git:20260320.fcf2609 · audit B · 3 stars
CLAUDE.md@by-framework/vue-nuxt CLAUDE.md file
overseastelegramaliterateperson865/awesome-claude-md · by-framework/vue-nuxt/CLAUDE.md
git:20260320.fcf2609 · audit B · 3 stars
CLAUDE.md@by-language/go CLAUDE.md file
overseastelegramaliterateperson865/awesome-claude-md · by-language/go/CLAUDE.md
git:20260320.9b01aca · audit A · 3 stars
CLAUDE.md@by-language/java CLAUDE.md file
overseastelegramaliterateperson865/awesome-claude-md · by-language/java/CLAUDE.md
git:20260320.9b01aca · audit A · 3 stars
CLAUDE.md@by-language/rust CLAUDE.md file
overseastelegramaliterateperson865/awesome-claude-md · by-language/rust/CLAUDE.md
git:20260320.9b01aca · audit A · 3 stars
CLAUDE.md@by-language/typescript CLAUDE.md file
overseastelegramaliterateperson865/awesome-claude-md · by-language/typescript/CLAUDE.md
git:20260320.fcf2609 · audit A · 3 stars

Every file in overseastelegramaliterateperson865/awesome-claude-md

Browse by kind, by grade A, or by owner.