#python
Posts tagged with “python”.
6 posts
FastAPI Request Bodies: Build a Small Local API
Create a local FastAPI endpoint with a Pydantic request model, try valid and invalid JSON, and separate validation from storage and permissions.
Pydantic: Validate JSON in Python Without Guessing
Build a small Pydantic model, validate JSON, handle clear errors, and understand coercion before trusting data from forms, APIs, or AI tools.
pytest Parametrize: Test More Cases With Less Code
Learn pytest parametrization with readable cases, boundary checks, and clear failures. Build a small test table without hiding the behavior being tested.
Ruff for Beginners: Lint and Format Python Code
Learn Ruff with a small Python project: find unused imports, preview fixes, format code, and add read-only checks without hiding useful warnings.
Static vs Dynamic Typing: A Practical Comparison
Static typing checks types before running; dynamic typing checks at runtime. Compare the trade-offs with real examples and pick the right tool.
uv: The Python Package Manager That Replaced pip
uv rewrote Python packaging in Rust with 10-100x faster installs, unified venvs, lockfiles, and script running. Setup, commands, and migration from pip and Poetry.