Planet Python

The website Planet Python is a planet site that aggregates Python-related content from various sources, including blogs, news sites, and other online publications. The website provides a one-stop destination for individuals to stay up-to-date with the latest developments in the Python programming world. The content on the site includes tutorials, news, project announcements, and discussions about various Python-related topics. Users can visit the site to stay informed about the Python community, new releases, conferences, and best practices in using the Python programming language. The website's purpose is to help promote and disseminate Python-related content, thereby contributing to the growth and development of the Python community.

Thread Of Notes

The author reflects on Pyrolog, an RPython-based Prolog implementation started in 2006. Initially developed as part of an EU project, Pyrolog's early versions featured object-oriented unification and exception-based backtracking with continuations. Deep recursion was handled by RPython's stackless transformation, though this proved impractical. Early performance was disappointing compared to established Prolog systems.Significant architectural changes occurred between 2009 and 2010, shifting to a continuation-based model that stored both success and failure continuations as heap objects. This refactoring aimed to improve JIT compatibility, leading to excellent performance on predictable code but exhibiting extreme performance cliffs on complex backtracking. The author details these architectural evolutions and their impact on performance.The project also explored JIT developments, with Pyrolog serving as an early testbed for the PyPy meta-JIT. Later, Pyrolog's capabilities were widened to include modules, DCGs, and attributed variables through student theses. It also proved to be a good test case for ARM JIT backends.A notable experimental feature, compressed terms, was attempted but not fully integrated into Pyrolog due to complexities with variable bindings and backtracking. This concept was later explored and significantly advanced for a different functional language. Although Pyrolog itself ceased major development, its underlying ideas influenced subsequent RPython projects and research.
This blog post marks the 7th anniversary of its creation, with the author reflecting on personal and professional activities. Following a shift away from most volunteer open-source contributions, the author focused on personal creative pursuits and a single OSS project, truststore, avoiding burnout. This year was notable for being uninvolved in the latest urllib3 release for the first time since 2016.The author published 54 articles on their blog and 21 more for various Python Foundation platforms, showcasing a prolific writing year. The most cherished article, "Food JPEGs in Super Smash Bros. and Kirby Air Riders," involved extensive research and custom software. Another favorite, "Adding Animal Crossing events to your digital calendar," explored game mechanics and calendar formats.A more flexible approach to sharing software was adopted, using the blog and Gists instead of formal project setups. Numerous software projects were undertaken, including tools for LAN party calculations, Animal Crossing events, and SMS features. The author also developed tools for extracting and archiving ROMs from legally owned physical game copies, such as Nintendo e-Reader cards and Joyboot games.Additionally, tools were created to track play activity across different gaming platforms, enabling measurement and analysis of gaming habits. This year saw a significant return to gaming, with the author completing several games and reflecting deeply on their experiences. Total play activity reached 83 hours, slightly more than the previous year, across Nintendo Switch, GameCube, and Delta emulator.The author ended the year immersed in "Ocarina of Time," expressing profound enjoyment and anticipation for completing the game's remaining temples. They appreciate readers' engagement and invite feedback through various social media channels. The post reflects a year of intentional creativity, focused contributions, and a rekindled passion for gaming.
The author, possibly in retirement, is enjoying a new lifestyle developing software with AI tools. He is working on a project called Muru, dedicating significant time to it, finding it engaging and fulfilling. AI coding allows him flexibility, letting him step away from the computer while the work continues, which he views as a lifestyle choice. The cost of AI tools initially influenced his usage, but current participation in a free program has removed this constraint.Acknowledging that AI-generated code isn't perfect, he likens its development to shaping a dorodango, starting as mud and incrementally polishing it into something refined. He emphasizes that he takes full responsibility for Muru, intending to contribute to the Python community through software development, a role he prefers over administrative tasks. Muru is not a fleeting project but the culmination of twenty years of thought, and he is committed to its long-term development.He actively seeks feedback from Python web application developers on missing features or daily frustrations they wish to address. Recognizing that many developers lack the time to implement these solutions, he offers to consider problems described to him for inclusion in Muru. He invites users to review Muru's documentation and provide their ideas through GitHub discussions or social media comments. The author also uses daily blog posts and interactive workshops as part of Muru's "polishing in public" process, believing that explaining concepts helps identify areas needing improvement. He intends to continue refining Muru until it is a trustworthy and polished system.
Muru allows mixing WSGI and ASGI applications within a single process, simplifying the integration of websockets into existing WSGI applications. Instead of separate servers or full application ports, a WSGI application can hand off requests to an ASGI application. This is achieved through a muru.wsgi_to_asgi object in the WSGI environ, which can determine if a request is a websocket upgrade and then hand off to an ASGI application.For websockets, Muru provides muru.asgi.websocket.Handler which converts ASGI websocket events into synchronous method calls on a custom object, resembling synchronous development patterns. This feature needs to be explicitly enabled in pyproject.toml with handoff = "asgi".A key benefit is that threads are not tied up by inactive websockets; a thread is only borrowed for the brief duration of a callback execution. This allows a worker with limited threads to handle numerous concurrent websockets without impacting other requests.Muru also supports mounting ASGI applications alongside WSGI ones based on request paths, allowing new async parts of an application to coexist seamlessly. These mounted ASGI applications can leverage the worker's event loop for concurrent processing, avoiding thread limitations.Mounts can be configured with their own concurrency and even dedicated threads to prevent one part of the application from monopolizing resources. The system also supports handing off requests from ASGI back to WSGI, facilitating gradual migration of applications to ASGI. This reverse handoff also requires explicit enablement and can utilize dedicated threads for the WSGI component.
The author initially identified as a specialist, having narrowed their academic focus from broad sciences to a specific field within optics during their PhD and working there for over a decade. However, they questioned this label, admitting others were more proficient in their specialized area, and they had gaps in related skills like programming. Moving into teaching Python and running a business further highlighted their generalist tendencies, requiring diverse skills in which they weren't expert. The author realized they enjoyed learning about a wide array of subjects beyond their professional fields. They now embrace being a generalist, especially in the "After AI" era. AI helps them leverage existing knowledge in various fields, enabling them to accomplish tasks they previously lacked the expertise to complete alone. The author argues that neither pure specialists nor pure generalists exist, but rather individuals with unique profiles of knowledge depth and breadth. AI empowers generalists by bridging knowledge gaps and allowing them to pursue ideas that previously required extensive resources. For instance, the author, a novice athletics coach, used AI to translate theoretical knowledge into a detailed training program. This collaboration allows generalists to "do more with knowledge and skills," enhancing their capabilities in multiple areas. The "After AI" era, the author concludes, is the "Age of the Generalist" because AI magnifies the utility of broad knowledge, enabling individuals to translate various interests into actionable outcomes.
CdXz5zHNQW_RedQV1M3J6.jpeg
Muru now offers a simplified way to test Python web applications locally with HTTPS, eliminating the complexities of proxy setup. Developers can enable HTTPS for their WSGI application by adding the --https flag during development server startup. This automatically configures HTTPS on port 8443 alongside HTTP on 8080. Muru also generates a trusted certificate using mkcert, if available, or a self-signed one otherwise. The generated certificates are securely stored in the user cache and reused for subsequent runs.Testing with HTTPS is crucial because certain behaviors, like the URL scheme and HTTP/2 protocol, only manifest under secure connections. Browsers exclusively use HTTP/2 over TLS, impacting how applications handle multiple assets. Additionally, code creating absolute URLs or setting Secure cookies will behave differently without HTTPS. Muru's simplified HTTPS offering integrates TLS and HTTP/2 handling at the edge, abstracting away the need for proxy configuration or trust headers.To avoid cookie conflicts when developing multiple projects, Muru allows adding hostnames like shop.localhost using the --host option. Modern browsers automatically resolve .localhost names to the loopback address, eliminating the need to modify /etc/hosts. For production-like testing, the --https-only flag forces all HTTP requests to redirect to HTTPS, ensuring that all traffic is secure. These redirects are temporary (307) to preserve method and prevent browser caching issues. Project-specific run settings, including HTTPS_only and hosts, can be configured in pyproject.toml for convenience.
Muru's application loading strategy involves preloading the application once in a host Python process, then forking worker processes from it. This "import once" method significantly benefits large applications by saving memory and speeding up worker startup since workers share memory pages with the host until modified. Muru also freezes the garbage collector's view of preloaded objects to optimize shared memory. This contrasts with systems like mod_wsgi, where each daemon process must import the application independently.However, preloading can cause issues because some resources do not survive a fork, such as active sockets, background threads, or child processes. If an application opens a database connection or starts a thread during import, preloading would silently break workers. Muru addresses this by performing an "import check" that detects such problematic resources left behind after the application import in the host process.If the import check fails, Muru defaults to a safer fallback: each worker imports the application individually. This ensures functionality, though it sacrifices the performance and memory benefits of preloading. Muru provides warnings and suggestions for fixing these issues, such as closing connections in a pre_fork hook and reopening them in a post_fork hook, or opening them lazily.To resolve these problems and enable preloading benefits, applications can utilize Muru's hooks module. The 'post_fork' hook, for instance, allows defining functions that run in each worker right after it's forked, enabling resources like database connections or metric threads to be initiated safely per worker. Muru's 'preload' setting offers control over this behavior: 'auto' (default) preloads with fallback, 'true' makes import check failures an error, and 'false' disables preloading entirely.Beyond 'post_fork', hooks include 'on_load' (host after import), 'pre_fork' (host before fork), 'on_ready' (worker before requests), 'on_drain' (worker stopping), and 'on_exit' (worker after last request). The context object passed to hooks provides information about the running environment. Muru's default worker configuration includes four threads, which are generally efficient for I/O-bound web applications.
Muru's architecture separates client-facing, control, and application execution components to enhance resilience and flexibility. The muructl run command initiates a Rust-based edge and controller, which then launch a Python host process. This host forks worker processes where the Python application code actually runs. The edge handles all client interactions, including TLS and HTTP, routes requests, and serves static files, keeping Python code out of the critical path.The host's sole function is to manage workers, replacing them if they fail, without ever serving requests itself. Workers execute the application code, communicating with the edge via a specialized "worker link" over a Unix socket. The controller oversees the entire system, managing hosts and releases, and directing traffic, though it never handles actual client requests. This design ensures that application slowdowns do not impede the edge's ability to serve new connections.A request flows from the client to the edge, which parses it, determines the appropriate release and worker, and then forwards it to the chosen worker. The worker processes the request, and the response travels back through the edge to the client. This architecture prioritizes efficiency by avoiding redundant HTTP parsing and buffering. The overhead of this extra hop is minimal, typically involving one additional byte copy and microseconds of processing, which is negligible compared to typical Python application response times.The primary benefit of this design is the independent lifecycle management of its components. The edge can continue serving clients while application versions are swapped, and workers can be recycled without dropping client connections. Muru introduces "releases" as immutable units of application code, Python version, and settings. When a new version is deployed or a file changes in development, a new release is started alongside the old one, and traffic is only switched over once the new release is ready.This allows for seamless blue/green deployments and canary releases. In a production environment, the controller resides in a long-running daemon process, separate from the edge and hosts, orchestrating multiple applications and releases. This separation allows the daemon to be restarted or upgraded without interrupting live traffic, as the edge and hosts continue operating using their last known configurations.This robust, decoupled architecture addresses limitations found in traditional servers like Apache, where core components are tightly coupled. Muru's design allows for independent scaling, upgrades, and fault tolerance across its edge, controller, host, and worker components. The next steps involve delving deeper into the host's mechanics, particularly how it safely forks workers after importing the application once.
Muru's access log distinguishes between worker wait time and application execution time, but to understand why a request is slow, one needs to examine what workers are doing internally. Traditional methods involve guessing, adding print statements, or using external monitoring tools. Muru, drawing on years of experience, aims to provide robust built-in diagnostic capabilities.A sample WSGI application with a deliberate slow report, simulating database wait per month and arithmetic over millions of rows, illustrates Muru's features. Muru's settings can be configured via pyproject.toml, specifying the entrypoint, worker processes, and a soft timeout. Initial tests show that slow requests are application-bound, not queue-bound, indicating a code-level issue.Muru's soft timeout prevents requests from indefinitely tying up worker threads. If a request exceeds the soft timeout, a muru.RequestTimeout exception is raised, causing a 504 Gateway Timeout and providing a detailed traceback pinpointing the exact line of code where the timeout occurred. This ensures that only the problematic request is stopped, allowing the worker to continue serving others.To identify currently running slow requests, muructl requests provides an overview of in-flight requests, including their age, state, worker ID, and other details. This information, gathered from the edge, is low-cost and remains available even if workers are unresponsive. Once a specific worker and request are identified, more advanced debugging tools can be deployed.To see what a specific request is doing right now, muructl debug stacks for a given worker reveals the current Python stack trace of each thread. This offers a precise snapshot of where the code is executing, helping diagnose real-time performance issues.For a comprehensive understanding of where time is spent, muructl debug profile samples stack traces over a period, providing a statistical breakdown of function execution. This profiling generates folded stacks compatible with flame graph tools, offering evidence-based insights into performance bottlenecks. For exact numbers, muructl debug trace counts every Python function call and the time spent in each, offering detailed execution metrics, though it is resource-intensive and not meant for long-term use in production.
CdXz5zHNQW_ezl9eahQff.png
The biwak.info website, a map of Alpine huts, bivouacs, and peaks, transitioned from hash-based linking to shareable URLs. This required converting 42,866 OpenStreetMap place names into unique, stable slugs for URLs like /p/matterhorn. The slugification process involves transcribing German umlauts, ASCII-folding, lowercasing, and replacing non-alphanumeric characters with dashes. A major challenge was that many alpine places share names, necessitating a unique slug generation strategy.The solution prioritizes the shortest unique slug: plain name, then name with region, followed by name with region and elevation, and finally name with region and OpenStreetMap ID. For region identification, Natural Earth admin-1 boundaries were adapted for the Alps, and a point-in-polygon lookup assigns each place a recognizable region. To ensure URL stability, a Git-committed slug registry is maintained, preventing slugs from moving to different places. It also allows existing places to retain their registry slug and new places to get the first available candidate.If a place is renamed, its old slug redirects to the new one; if it disappears, its slug is reserved for search. The system includes fallbacks: shared plain names lead to a search results page, and slugs ending in an OpenStreetMap ID always resolve, even if the name part is outdated. While effective, the registry continuously grows, and rule changes can impact thousands of URLs. The platform also uses these /p/ URLs for directly loading peaks.
CdXz5zHNQW_vDlKSoQ0T4.webp
gilguard is a compact, zero-dependency Python package designed for free-threaded Python versions (3.13t, 3.14t, 3.15t). Its primary function is to detect and report instances where the Global Interpreter Lock (GIL) is unexpectedly re-enabled. In free-threaded Python, if a C extension module that hasn't declared itself GIL-safe is loaded, the GIL is re-activated for the entire process, negating the benefits of free-threading without a prominent warning.By importing gilguard as the very first statement in your application, any subsequent import that re-enables the GIL will trigger a GILEnabledError. This error provides comprehensive details, including the infringing module, its file path, the distribution it belongs to, and the exact line in your code that initiated the problematic import chain. This level of detail eliminates the need for manual debugging and import bisecting.The GILEnabledError is designed to inherit from BaseException, ensuring that it bypasses common generic exception handlers that might otherwise silently consume the error and hide the GIL re-activation. For environments not ready for hard failures, a GILGUARD_ACTION environment variable can be set to "warn" to receive the detailed report as a warning instead of an exception.To audit an entire Python environment, gilguard offers a command-line tool: "python -m gilguard". This tool checks each installed package in parallel within a fresh interpreter, guaranteeing that every potential GIL-re-enabling module is identified. It exits with a non-zero status if any offenders are found, making it suitable for integration into Continuous Integration (CI) pipelines.Furthermore, gilguard can be used as a pytest plugin ("pytest -p gilguard") to catch gracefully loaded extensions that might re-enable the GIL during feature usage rather than at initial import. While gilguard effectively identifies GIL re-activation, it's crucial to understand that it does not guarantee thread-safety or performance improvements; those require separate testing. Built as part of a larger effort to enhance free-threaded Python, gilguard aims to make the transition safer and accelerate its adoption by ensuring the runtime environment truly operates without the GIL.
This Core Dispatch covers Python news from October 9 to November 6, 2026. Python 3.16.0 alpha 1 has been released, with alpha 2 due soon. The release team shipped 16 Python releases, including 10 security updates, with significant thanks to contributors. Key security releases on October 26 blocked compromised eMudhra intermediate CA keys in ssl and contained additional fixes.Two new PEPs, 850 and 851, propose wheel-variant providers and list.discard(), respectively. PEP 813, the pretty print protocol, is back for discussion after revisions. PEPs 836 and 774, related to a supported JIT, have been withdrawn, with the Steering Council making no further decisions on the JIT.CPython's main branch saw merges speeding up UUID operations, numeric strptime() parsing, and buffered asyncio reads. Free-threaded builds gained safer memoryview operations and an asyncio crash fix. Community discussions include performance tooling, ecosystem testing with snake_pit, and an updated AI-policy triage process.Upcoming releases include Python 3.16.0 alpha 2, 3.14.11, and 3.15.3. Official news highlights security releases and the Python ecosystem's response to the eMudhra compromise. Notable merged PRs feature C implementations for UUID and strptime, lock-free weak-reference reads, and enhanced asyncio functionalities.Community updates also mention a limit of three open PRs for contributors and an updated triage process for CPython's AI policy. Readers are encouraged to test their projects with Python 3.16.0 alpha 1 and report any issues. Various CFPs and conferences are also listed.
Twisted originated as the networking component for a text-based role-playing game engine in the late 90s. This initial project evolved, shedding the game engine to focus on network protocols like email, instant messaging, DNS, and SSH. For a long time, Twisted was the leading event-driven I/O library for Python, ideal for building high-performance servers. However, the inclusion of asyncio in Python's standard library has diminished its prominence in this area. Despite this, Twisted still offers robust protocol implementations for SSH, email, DNS, and web services, including websockets. The project's core purpose is to demystify networked software and empower individuals to build internet-facing systems at a manageable scale. It emphasizes memory safety, integrated testing, and operability on personal hardware, contrasting with the trend of centralized cloud computing. Twisted aims to simplify managing a comprehensive suite of network services by integrating various protocol implementations under a unified framework. This approach reduces the complexity typically associated with running multiple disparate software components. The project intentionally avoids AI in its development to ensure human understandability and maintainability. The overarching goal is to provide an "engine for your internet" that is personal and manageable, allowing individuals to host their own services. Although the author no longer uses all of Twisted's components personally, the project itself is still actively used for critical infrastructure. Twisted continues to fall short of its ambitious goals, and contributions are actively sought to help realize its vision.
The eMudhra Intermediate CA compromise, reported on October 20th, 2026, necessitated a significant response for Python's ecosystem. A compromised Certificate Authority poses a serious threat because HTTPS security is deeply integrated into Python applications and packaging. The Python Software Foundation's security team, particularly the Security Developer-in-Residence Seth Larson, was crucial in coordinating a customized and comprehensive mitigation effort. Leveraging pre-existing trust with maintainers, the response respected volunteers' time by offering clear next steps and proactive outreach. Within two days, fixes were deployed to numerous projects, including certifi, Python, pip, and uv. Vulnerable versions of critical components like certifi, pip, and sigstore were patched across the PSF's managed projects, including PyPI and python.org. The community was alerted through advisories, CVE records, and discussion threads to guide mitigation and answer questions. The incident highlighted that while browsers could update certificate stores outside of software updates, tools like pip relied on bundled dependencies. Certifi, a repackaged Mozilla CA bundle, was a key dependency that needed to remove the compromised root CA. To address older Python versions, a "last-resort" denylist was added to reject compromised certificates, tracked as CVE-2026-115557. Future efforts will focus on integrating technologies like Certificate Revocation Lists (CRLs) to enable quicker, more robust responses to similar incidents.
Muru provides three application execution modes: development, daemon, and container, all sharing a unified process model for consistency. Installation involves the muructl binary and a runtime library fetched automatically. To begin, create a project directory and a virtual environment. A simple WSGI application can be run using muructl run, which automatically detects the project's environment. The output reveals Muru's host and worker process structure, preloading the application before forking workers.Muru's safe application import mechanism, ensuring resources are handled correctly before forking, is a key feature. Development mode exclusively uses loopback for local access, with the daemon mode intended for external exposure. The access log provides detailed metrics, differentiating between code slowness and capacity issues with queue and app times. Error handling is robust; exceptions result in failed requests and detailed tracebacks, either in the browser or as JSON, without crashing the worker.Development mode features automatic reloading on file changes, implemented by starting new releases alongside existing ones. Traffic shifts only after the new release is ready, and if it fails, the previous release continues serving. This mechanism underpins Muru's zero-downtime deployments. The same release-based deployment strategy applies to popular frameworks like Flask and Django. Future posts will cover configuration, safe worker forking, the dashboard, and mixed WSGI/ASGI applications.
The author reflects on the 20-year journey of mod_wsgi, a project born from the need for a standardized Python WSGI hosting solution on the ubiquitous Apache httpd platform. While mod_wsgi earned a reputation for reliability, its reliance on Apache's architecture presented significant limitations, particularly regarding process management and application lifecycle. Apache's rigid design prevented many desirable features, like intelligent scaling or seamless updates, from being implemented within mod_wsgi. Now, with a sabbatical and the advent of AI coding tools, the author is freed from Apache's constraints and the chore of coding. This newfound freedom allows for the creation of "Muru," a modern system for hosting Python web applications. Muru is designed as a comprehensive solution, covering the entire journey from development to production, and moves beyond Apache as a standalone system. It supports WSGI, ASGI, and gRPC applications, even allowing them to be mixed within a single deployment. Muru integrates best practices by default, addressing common production needs like rolling out new versions, request routing, and graceful restarts. Crucially, Muru is built with an intimate understanding of Python web application quirks, considering factors like the GIL, slow import times, and memory creep. It also leverages application metrics not just for monitoring but as feedback for intelligent hosting decisions. Muru is currently in active development, aiming to be a powerful and intelligent platform for Python web applications. The author plans a series of posts to detail Muru's capabilities, starting with local development and progressing to advanced deployment scenarios. The author openly acknowledges using AI coding tools extensively for Muru's development.
Wing Pro 12.1 introduces autonomous development, where AI agents manage the entire application development process. You initiate this by providing a high-level application specification or major feature request. The Tasks Manager then breaks down the work into individual tasks, assigning these to AI agents. These agents handle coding, unit testing, and documentation, committing their work in logical units. You oversee this process by answering questions, reviewing results, and requesting revisions within the Tasks tool. This shifts your role from detailed coding to product design and oversight, accelerating development significantly.To begin, set up an isolated environment like a virtual machine for AI agent use, preventing access to sensitive data. Install a suitable AI agent like Claude Code or Codex, ensuring an account or subscription covers expected usage. Install Git or Mercurial for version control, as Wing and the agents utilize it for tracking and committing changes. Create a new Wing Pro project, selecting your AI agent and a Python environment, ensuring "Create a Git repository" is checked. Review the Tasks Manager settings, initially keeping automatic commits enabled for continuous work.Next, draft your specification or tasks on the Plan tab of the Tasks tool, marking them "Ready." Describe desired functionality and any technical constraints; the Manager will research and refine these tasks. Monitor progress on the Execute tab and address any agent questions on the Questions tab, as other tasks will continue running concurrently. Finally, review completed work on the Review tab, where each task provides a summary of changes and decisions. You can request revisions, or, if not using automatic commits, manually commit changes after review.For optimal outcomes, integrate testing and cross-checks into your process. Ask the Manager to establish ways for agents to run the application as a user would, enabling them to evaluate their work. Incorporate tasks to review code for security, test coverage, or other critical aspects, with identified issues becoming new tasks. Consider letting the Manager commit to a separate branch, which you can review before merging into your main branch. Additionally, use the application yourself and create tasks for any bugs or improvements you discover.If you are unfamiliar with any of these steps, you can instruct the Manager in the Execute tab to assist with environment setup and initiating autonomous software development. Detailed information is available in the Wing Pro manual and autonomous development demos. For any issues or questions, contact [email protected].
CdXz5zHNQW_rjwrd1ZyMu.png
pyinfra is a command-line tool that translates Python code into shell commands executed across multiple servers via SSH in parallel. It functions similarly to Ansible but with a simpler approach. The tool is declarative and idempotent, meaning it ensures servers are in a desired state without making changes if already configured. Unlike Ansible, pyinfra uses Python code for deployments, enabling Python's full functionality like loops, conditionals, and library imports. In small-scale tests, pyinfra has demonstrated faster performance than Ansible with the Mitogen plugin. While it has a smaller ecosystem and fewer built-in operations than Ansible, custom operations are easy to create. pyinfra is well-suited for cloud-agnostic architectures, from managing numerous servers to single-computer programming for reproducibility. It is also user-friendly for self-hosting and home servers, and even useful for running ad-hoc commands on server fleets. The tool's simplicity has limitations, requiring extra effort for fully automated pipelines and careful handling of concurrent deploys. The provided example demonstrates deploying two websites, a landing page and a Python web app, first on a local virtual machine and then on two remote production servers. pyinfra operates using two core concepts: operations, which modify server states, and facts, which gather information about hosts to control operations. Operations are defined in Python files called deploys, and their execution can be previewed before application. Facts allow for dynamic configuration based on server characteristics, such as installing the correct web server package for different Linux distributions.
CdXz5zHNQW_cUgyFs93O9.png