Property-Based Testing with Hypothesis in Python
Learn property-based testing with Hypothesis to find edge cases your example-based tests miss and write more robust Python code.
143 posts · page 2 of 3
Learn property-based testing with Hypothesis to find edge cases your example-based tests miss and write more robust Python code.
Compare Python's concurrency models -- threading, multiprocessing, and asyncio -- with practical examples and performance guidance.
Learn how Python context managers work under the hood, build custom ones with classes and contextlib, and explore advanced patterns.
Go beyond basic dataclass usage with post-init processing, field factories, inheritance, frozen instances, and custom serialization.
Understand Python's descriptor protocol, how properties work internally, and how to build reusable validation descriptors.
Master Python's itertools module with practical recipes for grouping, windowing, chaining, and processing iterables efficiently.
Explore how CPython manages memory with reference counting, generational garbage collection, and practical tips to avoid memory leaks.
Demystify Python metaclasses with practical examples. Learn how classes are created, when to use metaclasses, and real-world patterns.
Replace os.path with pathlib for cleaner, more readable file path handling in Python. Covers all essential operations with examples.
Learn how __slots__ reduces memory usage in Python classes, when to use it, and the trade-offs involved.
Learn Python's asyncio — coroutines, tasks, event loops, async generators, and building concurrent I/O-bound applications.
Master Python dataclasses — automatic __init__, __repr__, ordering, immutability, default factories, and post-init processing.
Go beyond basic decorators: decorator factories, class decorators, functools.wraps, stacking behavior, and real-world patterns used in production Python code.
A thorough exploration of Python generators: yield mechanics, send and throw, generator pipelines, memory efficiency, coroutine basics, and practical patterns.
How Django QuerySets lazily build SQL, how to avoid N+1 queries with select_related and prefetch_related, and patterns to keep the ORM fast under real load.
How FastAPI's Depends system actually works, the lifecycle of dependencies, scoping with yield, and patterns for testable, layered FastAPI apps.
Go beyond the default Django admin: customize ModelAdmin classes, list views, search, filters, inline editing, and admin actions to build a usable backoffice your team will actually enjoy.
Compare per-view, template fragment, low-level, and per-site caching in Django and learn when each pays off.
A practical guide to wiring Celery into Django for background work, scheduled jobs, and reliable task processing.
Understand Django's class-based views by building from View up to ListView and UpdateView. Learn the MRO, mixins, and when CBVs beat function-based views in real projects.
Understand how a Django request flows through middleware, URL routing, and views, and learn to write custom middleware for cross-cutting concerns.
Understand how DRF serializers validate, transform, and persist data, and learn how to compose them for complex API payloads.
A practical comparison of DRF and FastAPI: performance, ORM, validation, async, and how to choose for a new Python service.
Learn how Django signals decouple side effects from your models, when to use them, and the common pitfalls that make signals hard to debug.
Master the Django template language: contexts, inheritance, includes, custom tags and filters, autoescaping, and performance tips for building maintainable server-rendered UIs.
Implement JWT-based authentication in FastAPI with OAuth2 password flow, secure token signing, and a reusable get_current_user dependency.
Configure CORS in FastAPI without security holes: how the browser preflight works, which origins and headers to allow, credentials and cookies, and the most common misconfigurations to avoid.
Deploy FastAPI to production with Gunicorn managing Uvicorn workers. Cover process counts, timeouts, and health checks.
Learn how FastAPI middleware works under the hood and write your own for logging, timing, and request enrichment.
Tailor FastAPI's auto-generated OpenAPI schema: tags, summaries, examples, response models, custom operation IDs, security schemes, and a custom Swagger UI your team will actually use.
Master Pydantic models in FastAPI: type coercion, validators, nested models, settings, and tips for clean request and response schemas.
Add rate limiting to FastAPI using slowapi and Redis: token buckets vs fixed windows, per-user and per-IP limits, returning proper headers, and avoiding the most common production mistakes.
Compare SQLModel and raw SQLAlchemy for FastAPI projects and learn how to pick the right one for your team.
Stream large files, generated text, and Server-Sent Events from FastAPI without loading everything into memory.
Write fast, reliable tests for FastAPI apps using TestClient, pytest fixtures, dependency overrides, and a separate test database.
Build real-time features with FastAPI WebSockets. Manage connections, broadcast messages, and handle disconnects cleanly.
When to reach for .apply and when vectorized operations win. A practical comparison with benchmarks, mental models, and the patterns that keep Pandas code both readable and fast.
Use Pandas Categorical dtype to cut memory, speed up groupby, and encode ordered categories cleanly with practical conversion and pitfall notes.
Hands-on pandas patterns for cleaning messy real-world data, covering missing values, types, duplicates, strings, and a reliable cleaning pipeline.
Master pandas groupby with single and multi-column aggregations, named outputs, transform, and filter for clean analytical pipelines.
A practical guide to Pandas MultiIndex: when to use it, how it really works, and the slicing, stacking, and groupby patterns that make hierarchical data manageable.
A practical tour of the Pandas .str accessor: cleaning text, extracting patterns, splitting and joining, dealing with missing values, and writing string code that stays fast.
Use Pandas rolling, expanding, and ewm window functions to compute moving averages, running totals, and time-aware aggregations with clear examples.
Understand how Python's asyncio event loop schedules coroutines, what await actually does, and how to avoid the classic mistakes that turn async code into a tangle of bugs.
A practical tour of Python decorators: how they work under the hood, when to use them, and how to write decorators that preserve metadata, accept arguments, and stack cleanly.
How to set up Python logging properly: loggers vs handlers, structured logs, contextual fields, log levels that scale, and how to avoid the classic print-debug trap.
When to use threads, when to use processes, and why the GIL shapes both choices. A practical comparison with code, benchmarks, and patterns for real workloads.
A gentle introduction to Python's async and await — coroutines, the event loop, awaiting tasks, asyncio.gather for concurrency, and when async actually helps.