← Back to list

python-patterns
by Zate
⭐ 4🍴 0📅 Jan 24, 2026
SKILL.md
name: python-patterns description: This skill should be used for Python idioms, type hints, async/await, pytest, Django, Flask, FastAPI, Python web frameworks, pandas, data processing whenToUse: Python code, type hints, async, pytest, .py files, Django, Flask, FastAPI, Python web, Python backend, pandas, data scripts whenNotToUse: Non-Python code, Jupyter-specific (use nbformat docs) seeAlso:
- skill: testing-strategies when: pytest architecture
- skill: api-design when: FastAPI/Flask endpoints
- skill: database-patterns when: SQLAlchemy models
Python Patterns
Idiomatic Python patterns for Python 3.10+.
Type Hints
def process(data: list[str]) -> dict[str, int]:
return {item: len(item) for item in data}
Dataclasses
from dataclasses import dataclass
@dataclass
class User:
name: str
email: str
active: bool = True
Context Managers
with open("file.txt") as f:
content = f.read()
Pytest
import pytest
def test_add():
assert add(2, 3) == 5
@pytest.fixture
def user():
return User(name="test")
Async/Await
async def fetch_data(url: str) -> dict:
async with aiohttp.ClientSession() as session:
async with session.get(url) as response:
return await response.json()
Error Handling
try:
result = risky_operation()
except ValueError as e:
logger.error(f"Invalid value: {e}")
raise
Score
Total Score
60/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon