Development
python-development - Claude MCP Skill
Modern Python development with Python 3.12+, Django, FastAPI, async patterns, and production best practices. Use for Python projects, APIs, data processing, or automation scripts.
SEO Guide: Enhance your AI agent with the python-development tool. This Model Context Protocol (MCP) server allows Claude Desktop and other LLMs to modern python development with python 3.12+, django, fastapi, async patterns, and production best pr... Download and configure this skill to unlock new capabilities for your AI workflow.
Documentation
SKILL.md# Python Development
## Project Setup
### Modern Python Project Structure
```
my-project/
āāā src/
ā āāā my_project/
ā āāā __init__.py
ā āāā main.py
ā āāā utils.py
āāā tests/
ā āāā __init__.py
ā āāā test_main.py
āāā pyproject.toml
āāā README.md
āāā .gitignore
```
### pyproject.toml
```toml
[project]
name = "my-project"
version = "0.1.0"
requires-python = ">=3.12"
dependencies = [
"fastapi>=0.100.0",
"pydantic>=2.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0",
"ruff>=0.1.0",
"mypy>=1.0",
]
[tool.ruff]
line-length = 88
select = ["E", "F", "I", "N", "W"]
[tool.mypy]
strict = true
```
## Type Hints
```python
from typing import TypeVar, Generic
from collections.abc import Sequence
T = TypeVar('T')
def process_items(items: Sequence[str]) -> list[str]:
return [item.upper() for item in items]
class Repository(Generic[T]):
def get(self, id: int) -> T | None: ...
def save(self, item: T) -> T: ...
```
## Async Patterns
```python
import asyncio
from collections.abc import AsyncIterator
async def fetch_all(urls: list[str]) -> list[dict]:
async with aiohttp.ClientSession() as session:
tasks = [fetch_one(session, url) for url in urls]
return await asyncio.gather(*tasks)
async def stream_data() -> AsyncIterator[bytes]:
async with aiofiles.open('large_file.txt', 'rb') as f:
async for chunk in f:
yield chunk
```
## FastAPI Patterns
```python
from fastapi import FastAPI, Depends, HTTPException
from pydantic import BaseModel
app = FastAPI()
class UserCreate(BaseModel):
email: str
name: str
class UserResponse(BaseModel):
id: int
email: str
name: str
@app.post("/users", response_model=UserResponse)
async def create_user(
user: UserCreate,
db: Database = Depends(get_db)
) -> UserResponse:
result = await db.users.create(user.model_dump())
return UserResponse(**result)
```
## Testing
```python
import pytest
from unittest.mock import AsyncMock, patch
@pytest.fixture
def mock_db():
db = AsyncMock()
db.users.get.return_value = {"id": 1, "name": "Test"}
return db
@pytest.mark.asyncio
async def test_get_user(mock_db):
result = await get_user(1, db=mock_db)
assert result["name"] == "Test"
mock_db.users.get.assert_called_once_with(1)
```
## Best Practices
- Use `ruff` for linting and formatting
- Use `mypy` with strict mode
- Prefer `pathlib.Path` over `os.path`
- Use dataclasses or Pydantic for data structures
- Use `asyncio` for I/O-bound operations
- Use `contextlib.asynccontextmanager` for async resourcesSignals
Information
- Repository
- skillcreatorai/Ai-Agent-Skills
- Author
- skillcreatorai
- Last Sync
- 3/12/2026
- Repo Updated
- 3/12/2026
- Created
- 1/13/2026
Reviews (0)
No reviews yet. Be the first to review this skill!
Related Skills
upgrade-nodejs
Upgrading Bun's Self-Reported Node.js Version
cursorrules
CrewAI Development Rules
cn-check
Install and run the Continue CLI (`cn`) to execute AI agent checks on local code changes. Use when asked to "run checks", "lint with AI", "review my changes with cn", or set up Continue CI locally.
CLAUDE
CLAUDE.md
Related Guides
Bear Notes Claude Skill: Your AI-Powered Note-Taking Assistant
Learn how to use the bear-notes Claude skill. Complete guide with installation instructions and examples.
Mastering tmux with Claude: A Complete Guide to the tmux Claude Skill
Learn how to use the tmux Claude skill. Complete guide with installation instructions and examples.
OpenAI Whisper API Claude Skill: Complete Guide to AI-Powered Audio Transcription
Learn how to use the openai-whisper-api Claude skill. Complete guide with installation instructions and examples.