--- id: pylxd version: "2.4.1" license: Apache-2.0 license_treatment: permissive maintenance: active --- # pylxd — Python library for interacting with the LXD REST API License: permissive · Maintenance: active · Downloads: 78.4K/mo ## What it is and what it does pylxd is a Python client library for the LXD container and virtual machine manager, maintained by Canonical. It wraps the LXD REST API to let you create, configure, start, stop, and manage containers and VMs programmatically from Python code. The library depends on cryptography, requests, requests-toolbelt, python-dateutil, and ws4py for HTTP communication, secure operations, and WebSocket support. You use it when you need to automate LXD operations—provisioning containers, orchestrating deployments, or integrating LXD into larger Python-based infrastructure tools. It's aimed at system administrators and developers working with LXD on Linux systems who want to avoid shell scripting or direct REST calls. Use it for: - Automate container provisioning and lifecycle management in Python-based infrastructure-as-code tools. - Build monitoring or management dashboards that query and control LXD containers programmatically. - Integrate LXD container operations into CI/CD pipelines or deployment orchestration scripts. - Write administrative tools to batch-manage containers, snapshots, and resource allocation across LXD hosts. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. pylxd provides a Python interface to the LXD REST API, enabling programmatic control of LXD containers and virtual machines. Yes. pylxd is actively maintained, has no known vulnerabilities, installs cleanly with common dependencies, and is the standard Python client for LXD. Install it if you need to automate LXD operations from Python; skip it if you only use LXD from the command line or don't manage LXD systems. ## Install pip install pylxd uv add pylxd poetry add pylxd ## Installing pylxd Before you install: Low install friction with a pure-wheel distribution and five common runtime dependencies. Active maintenance with a recent release (130 days ago) and ongoing repository activity. License in practice: Apache-2.0 permissive license allows use in most projects, including commercial ones, with minimal restrictions. Quickstart: pip install pylxd import pylxd # Connect to LXD daemon client = pylxd.client.Client() Requires Python 3.10 or later; LXD daemon must be running and accessible on the system. Verify before relying: - Whether the package works with remote LXD instances or only local sockets. - Performance characteristics when managing large numbers of containers. - Compatibility with different LXD versions and API stability guarantees. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 78.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags lxd python client, lxd rest api library, container management python, lxd automation, python lxd control, container-management, lxd-client, infrastructure-automation [View on SkillFed](https://skillfed.io/packages/pylxd) · [View on PyPI](https://pypi.org/project/pylxd/)