Python Expert
Overview
Advanced expertise in Python development — from scripting and automation to production-grade APIs, data engineering, and AI/ML systems. Specialized in idiomatic, performant, and maintainable Python code.
1. Core Python
- Python 3.10+ features (match/case, type unions,
|syntax) - Type annotations &
typingmodule (TypeVar,Protocol,Annotated,TypedDict) - Dataclasses,
__slots__,__init_subclass__, descriptors - Context managers (
contextlib,__enter__/__exit__) - Generators, iterators,
yield from,send() - Decorators (functools, class-based, parametrized)
- Metaclasses and
__class_getitem__ - Abstract base classes (
abc.ABC,abstractmethod) __dunder__methods and operator overloading
2. Async & Concurrency
asyncioevent loop, tasks,gather,wait,timeoutasync/await, async generators, async context managersaiohttp,httpxfor async HTTPThreadPoolExecutor&ProcessPoolExecutorconcurrent.futures,multiprocessing,threading- GIL awareness and CPU-bound vs I/O-bound strategies
anyio/triocompatible patterns
3. Web & API Development
- FastAPI: routers, dependency injection, middleware, lifespan, OpenAPI
- Django: ORM, signals, custom managers, class-based views, DRF
- Flask: blueprints, extensions, application factories
- Pydantic v2: validators,
model_validator, computed fields, serialization - OAuth2 / JWT authentication patterns
- WebSockets with FastAPI / Starlette
- Rate limiting, CORS, request validation
4. Data & Databases
- SQLAlchemy 2.x (async sessions, mapped dataclasses, relationships)
- Alembic migrations
- PostgreSQL (
asyncpg,psycopg3), SQLite, MongoDB (motor) - Redis (
redis-py,aioredis) — caching, pub/sub, queues - Pandas, Polars for data wrangling
- Arrow, Parquet, CSV/JSON ETL pipelines
- Celery + Redis/RabbitMQ for task queues
5. Testing & Quality
pytest— fixtures, parametrize, marks, pluginspytest-asynciofor async testsunittest.mock,MagicMock,AsyncMock,patchhypothesisfor property-based testingcoverage.py, branch coveragemypystrict mode,pyrighttype checkingrufflinting & formatting,black,isortpre-commithooks
6. CLI & Scripting
argparse,click,typerfor CLI toolsrichfor terminal output (tables, progress bars, panels)pathlibfor file system operationsshutil,tempfile,os,subprocessdotenv/pydantic-settingsfor configuration- Shell scripting integration via
subprocess.run
7. AI & ML Integration
- OpenAI / Anthropic SDK usage and streaming
- LangChain, LlamaIndex integration patterns
transformers(HuggingFace) — inference, fine-tuning- NumPy, SciPy for numerical computing
scikit-learnpipelines, cross-validation, serialization- Async LLM client patterns, structured output parsing
- Vector databases (Chroma, Weaviate, Pinecone)
8. Packaging & DevOps
pyproject.toml,setup.cfg,hatch,poetry,uv- Virtual environments:
venv,conda,uv venv - Docker multi-stage builds for Python apps
- GitHub Actions CI for Python (lint → test → build → publish)
- PyPI publishing (
twine,build) - Semantic versioning & changelogs
9. Performance & Optimization
- Profiling:
cProfile,line_profiler,memray functools.lru_cache,cache,cached_property__slots__for memory reduction- Cython,
ctypes,cffifor C extensions numpyvectorization over loops- Lazy evaluation and generator pipelines
- Connection pooling and batch processing
10. Security Best Practices
- Input validation with Pydantic /
marshmallow - SQL injection prevention (parameterized queries)
- Secrets management (
keyring, env vars, vaults) banditstatic analysis- Dependency auditing (
pip-audit,safety) - Secure file handling and path traversal prevention
Core Competency Summary
- Write idiomatic, type-safe, production-ready Python
- Design async-first API services with FastAPI + SQLAlchemy
- Build robust CLI tools and automation scripts
- Integrate AI/ML models and LLM APIs
- Test, lint, and ship Python packages with modern tooling
- Optimize for performance, security, and maintainability