The go-to resource for upgrading Python, Django, Flask, and your dependencies.

All Articles

70 articles on upgrading Python, Django, Flask, and managing dependencies

FastAPI OpenAPI Schema Generation: Customizing Swagger UI with Custom CSS and Logo

FastAPI OpenAPI schema generation & Swagger UI customization: Add custom CSS, logo to /docs. Override schema info/tags, serve static files, production uvicorn. Benchmarks: Custom CSS adds 0.2ms latency. Code examples, pydantic models, swagger_ui_css_url. Keywords: 'fastapi custom swagger ui', 'fastapi swagger logo css', 'openapi schema customize fastapi', 'fastapi docs customization', 'swagger ui custom css fastapi'.

Scaling FastAPI WebSockets to 10,000 Concurrent Connections with Uvicorn

Configure Uvicorn to handle up to 10,000 concurrent WebSocket connections in FastAPI applications. Covers multi-worker setup, system tuning (ulimit, sysctl), benchmarks showing 5ms p99 latency and 50k msg/s throughput on Python 3.13, verified with websocket-bench. Addresses common issues like connection refused and too many open files.

Flask Application Factory Pattern: When to Use create_app() vs Global app Instance

Flask application factory pattern guide: create_app() vs global app instance. Use factory for testing, config/env separation, blueprints/extensions (80% production apps). Global for quick prototypes. Code examples, migration steps, pytest integration, circular import fixes. Flask 3.0+ best practices.

How to Fix Flaky pytest Tests Caused by Random Order Execution with pytest-randomly

pytest flaky tests random order fix: pytest-randomly shuffles execution order + seeds random, exposes hidden deps. Install pip, demo failing suite, reproduce w/ --randomly-seed=12345, fix w/ autouse fixtures. CI: --randomly-seed=last. Benchmarks detect 80% hidden flakiness. Keywords: 'fix flaky pytest tests', 'pytest-randomly tutorial', 'pytest random order execution', 'pytest flaky random seed', 'detect order dependent tests pytest'.

Sponsored by Durable Programming

Need help maintaining or upgrading your Python application? Durable Programming specializes in keeping Python apps secure, performant, and up-to-date.

Hire Durable Programming