python
Python is a versatile, high-level programming language known for its clean syntax and readability. It’s widely used in web development, data science, automation, scripting, and more.
Why Python?
Python’s simplicity makes it an excellent choice for beginners, while its extensive ecosystem of libraries and frameworks makes it powerful enough for complex applications. Some key areas where Python excels:
- Web Development: Frameworks like Django, Flask, and FastAPI
- Data Science: NumPy, pandas, matplotlib for analysis and visualization
- Automation & Scripting: Perfect for automating repetitive tasks
- Machine Learning: TensorFlow, PyTorch, scikit-learn
- API Development: Building RESTful APIs and microservices
- AI: Pydantic AI, LangChain, etc.
Featured Python Content
Below you’ll find my posts, TIL entries, and questions related to Python development, covering everything from basic syntax to advanced techniques and best practices.
When should I use Django vs Flask vs FastAPI?
I've been struggling with optimizing Django ORM queries for a high-traffic dashboard. We use select_related everywhere, but we are still seeing N+1 issues in some background tasks.
Customize your IPython shell in Docker
You can heavily customize your IPython shell experience when using it inside Docker or in a Docker Compose project. Without your personal preferences annoying your teammates!
Your pytest fixtures can return containers
It's easy to have your pytest function's argument signatures explode with a bunch of fixture references. And sometimes you need things that depend on each other, both separately and together which can be hard to keep straight. I suggest using an object to contain them.
Creating a PostgreSQL database using psycopg
Quotes around your tables got you down? Yeah me too. Creating, dropping or altering PostgreSQL objects with Python and psycopg is a bit tricky when it comes to identifiers like the names of databases, tables, and indexes.
Rebuild Sphinx Docs Automatically + Live Reload
Working on a lot of Sphinx documentation? This PyPI module helps auto-rebuild your docs and includes livereload so you can more quickly see your changes.
Explore More Python Resources
Looking to expand your Python knowledge? Here are some resources I recommend:
Official Resources
- Python Documentation - The official Python docs
- PEP Index - Python Enhancement Proposals
- PyPI - Python Package Index
Learning Platforms
- Real Python - Excellent tutorials and articles
- Python Morsels - Weekly Python exercises
Community
- r/Python on Reddit - News and discussions
Python Tools I Use
- uv - Modern dependency management and packaging
- pytest - Powerful testing framework
- ruff - Fast Python linter
- ty - Fast Python typechecking and LSP
Have a question about Python? Feel free to ask me!