pylxd
Python library for interacting with the LXD REST API
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 on this page — 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
pylxd on PyPI
pip
pip install pylxduv
uv add pylxdpoetry
poetry add pylxdInstalling 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 the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — cryptography, python-dateutil, requests, requests-toolbelt, ws4py |
| Maintenance | actively maintained — 130 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 78,366/month — #14,447 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pylxd-2.4.1-py3-none-any.whl
Tags
More Distributed Computing packages
gRPC Python is an HTTP/2-based RPC framework…
permissive · top 100 on PyPI
execnetexecnet lets you spawn and communicate with…
permissive · top 1,000 on PyPI
cloudpickleCloudpickle extends Python's standard pickle…
permissive · top 1,000 on PyPI
smart-openProvides a unified, open()-compatible Python…
permissive · top 1,000 on PyPI
portalockerPortalocker provides cross-platform file…
permissive · top 1,000 on PyPI
rayRay is a distributed computing framework that…
permissive · top 1,000 on PyPI
docker-pyA Python client library that lets you control…
permissive · top 5,000 on PyPI
dockerA Python library that lets you programmatically…
permissive · top 1,000 on PyPI
podmanProvides Python bindings to the Podman…
permissive · top 15,000 on PyPI
exasol-integration-test-docker-environmentProvides a CLI and Python API to start and…
permissive · top 15,000 on PyPI
python-vagrantProgrammatic control of Vagrant virtual…
permissive · top 5,000 on PyPI
livyA Python client for Apache Livy that enables…
permissive · top 15,000 on PyPI
xrpl-pyA pure Python library for building applications…
permissive · top 15,000 on PyPI
lxml-html-cleanCleans and sanitizes HTML by removing unwanted…
permissive · top 5,000 on PyPI
opsA Python framework for developing…
permissive · top 15,000 on PyPI
oneloginOfficial Python SDK for OneLogin's API,…
unclear · top 15,000 on PyPI