Python
Setting Up Python with uv
A guide to set up a modern Python development environment using uv, the fast all-in-one tool from Astral that replaces pyenv, virtualenv, and Poetry.
Load Python Environment Variables
A guide to managing Python environment variables using dotenv, including best practices for configuration and security.
How to Read a Python Error Traceback
A practical guide to reading Python tracebacks - the bottom-up mental model, multi-frame call stacks, common exception types, and the "During handling of the above exception" chain that confuses beginners.
Python Context Managers: The with Statement and the __enter__/__exit__ Protocol
Python's with statement compresses try/finally resource handling into a clean syntax - but it's just sugar over the __enter__/__exit__ protocol, which you can implement yourself with a class or the @contextmanager decorator.
What is, if __name__ == "__main__":
An in-depth explanation of the __name__ == __main__ pattern in Python, why it exists, and how to use it effectively in your modules.
Setting Up Python: pyenv, pyenv-virtualenv, poetry
A guide to set up a modern Python development environment using pyenv for version management and Poetry for dependency management.