Migrating a Python Project From Pytype to Pyrefly
Learn how to migrate a Python project from Pytype to Pyrefly, configure type checking, review errors, and update annotations for your development workflow.
Learn it from developers who built it.
Tutorials, how-tos and deep dives on AI, .NET, C#, cloud and developer tools, written by the community.
Learn how to migrate a Python project from Pytype to Pyrefly, configure type checking, review errors, and update annotations for your development workflow.
Learn how to use Django's async ORM safely and handle database transactions in async views by moving atomic operations into synchronous functions.
Everything on Python, not only its articles: the Python page →
Learn how to use Pydantic Settings to load, validate, and protect Python configuration values from environment variables and .env files.
Learn how to use FastAPI lifespan to initialize, share, and safely close HTTPX clients and other application resources during startup and shutdown.
Learn how to diagnose and fix Python SSL/TLS certificate verification errors by updating CA bundles, configuring trusted certificates, and resolving common HTTPS trust issues.
Learn how to safely test Python 3.16 Alpha in an isolated virtual environment, install dependencies, run tests, and identify compatibility issues without affecting existing projects.
Learn how Python asyncio task cancellation works and how to safely release resources with try/finally, async context managers, timeouts, and proper CancelledError handling.
Learn to use uv and uv.lock to manage Python dependencies, synchronize repeatable environments, and enforce locked installs in CI.
Learn how to use uv and uv.lock to lock Python dependencies, create repeatable environments, and install exact dependency versions in GitHub Actions.
Learn how Python asyncio cancellation works and how to safely clean up tasks, HTTP sessions, connections, and other resources using finally blocks and async context managers.
Learn how asyncio task cancellation works in Python, including re-raising CancelledError, releasing resources with finally, and using timeouts to prevent stuck background jobs.
Learn how to use uv to manage Python dependencies, generate uv.lock files, and install reproducible project environments in development and CI/CD.
Learn how to test applications, dependencies, virtual environments, and test suites against Python 3.16 Alpha 1 before upgrading.
Learn to use Python 3.15's Tachyon sampling profiler to analyze running scripts and processes, generate flame graphs, and choose between sampling and deterministic profiling.
Learn how Python 3.15's UTF-8 default affects text file and CSV handling, and when to specify encoding="utf-8" explicitly.
Explore where Python 3.15's experimental CPython JIT improves performance, including CPU-bound loops, tracing, register allocation, and workload-specific benchmark results.
Learn how Python 3.15 lazy imports can defer module loading, reduce startup work, and what to measure before adopting them.
Learn how Python 3.15's frozendict provides immutable mappings, how it differs from dict, and where it helps prevent unintended configuration changes.
Python 3.10 has reached end of life. Learn how to inventory affected environments, check dependency compatibility, choose a supported version, and plan a controlled upgrade.
Learn how Python 3.15 explicit lazy imports defer module loading, improve startup behavior, and affect optional dependencies and testing.
Learn how Python 3.15's built-in frozendict creates immutable mappings, how it differs from dict and MappingProxyType, and when to use it for configuration and hashable keys.
Compare standard and free-threaded CPython in Python 3.15, check whether the GIL is active, and benchmark CPU-bound threaded workloads.
Explains Python 3.15's experimental CPython JIT, its tracing and optimization changes, and what published pyperformance benchmarks do and do not prove.
Learn how Python 3.15's UTF-8 default affects text file handling, legacy encodings, CSV pipelines, and explicit encoding in Python code.
Learn how Python 3.15's default frame pointers improve native stack unwinding for compatible profiling tools and support performance investigations.
Explore Python 3.15 features including explicit lazy imports, the built-in frozendict type, and improvements to the experimental JIT compiler.
Learn how to assess dependency, build, and runtime compatibility before upgrading an existing project to Python 3.15.
Learn how to prepare projects for Python 3.15 by testing dependencies, native extensions, virtual environments, application behavior, and lazy imports before release.
Learn how SQLAlchemy 2.1 supports Microsoft's mssql-python driver for connecting Python applications to SQL Server using the mssql+python dialect.
AI features can be easy to add and surprisingly difficult to debug. A normal API call is fairly simple to follow. A request enters the application, a function runs, and a response comes back. With an AI feature, one user request can involve several model calls, retrieval steps, prompts, tool calls,
Write an article and earn +1,000 SHARP when it is approved.
Write an article