python-libmaas
A client API library specially for MAAS.
What it is and what it does
python-libmaas is a Python client library and command-line tool for interacting with MAAS, a bare-metal infrastructure provisioning platform. It provides both a programmatic API and a CLI interface for managing physical servers, networks, and deployment workflows. The library wraps MAAS REST APIs and handles authentication via OAuth and Macaroon tokens, making it suitable for infrastructure automation and systems administration tasks.
The package depends on aiohttp for async HTTP, PyYAML for configuration, oauthlib for OAuth flows, macaroonbakery for token handling, and several UI/display libraries including colorclass, terminaltables, and argcomplete. It targets Python 3.6–3.9 and is classified as Alpha-stage software. The last release was in August 2022, and while the repository remains active, the lack of recent commits suggests limited active maintenance.
Use it for:
- Automate bare-metal server provisioning and deprovisioning workflows in MAAS-managed environments.
- Build infrastructure-as-code scripts that configure networks, storage, and power management for physical hardware.
- Integrate MAAS into CI/CD pipelines to dynamically allocate and release test machines.
- Query and monitor MAAS inventory, including machine status, resource allocation, and deployment history.
- Manage user credentials and OAuth authentication for multi-tenant MAAS environments programmatically.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python client library and CLI for MAAS, providing programmatic and command-line access to bare-metal infrastructure provisioning and management.
Yes, if you are actively using MAAS and need programmatic control or CLI access to its APIs. The low install friction and absence of known vulnerabilities make it safe to deploy. However, the aging maintenance status (last release August 2022, no commits since) means you should verify that the library remains compatible with your MAAS version and modern dependency versions before relying on it for new projects. Not suitable if you cannot accept AGPLv3 licensing.
Install
python-libmaas on PyPI
pip
pip install python-libmaasuv
uv add python-libmaaspoetry
poetry add python-libmaasInstalling python-libmaas
Before you install
Low install friction with a pure-Python wheel distribution. Maintenance is aging—last release was in August 2022 and no commits since September 2025, though the repository remains active. Nine runtime dependencies are all established packages.
License in practice
Licensed under AGPLv3, a copyleft license requiring that any derivative work or distribution also be licensed under AGPLv3. This is suitable for internal tools and open-source projects but incompatible with proprietary software that cannot be released under the same terms.
Quickstart
pip install python-libmaas
from aiohttp import ClientSession
import asyncio
async def example():
async with ClientSession() as session:
# Use python-libmaas with aiohttp for MAAS API calls
pass
asyncio.run(example())
Requires a running MAAS instance with valid credentials; async/await context requires Python 3.5+.
Verify before relying
- Whether the package works with Python versions beyond 3.9 despite the description mentioning 3.5+ support.
- Current compatibility with modern versions of aiohttp, PyYAML, and oauthlib given the aging maintenance status.
- Whether MAAS API changes since August 2022 have rendered parts of the library obsolete or incompatible.
Package facts
| License | not declared (agpl) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 9 — PyYAML, aiohttp, argcomplete, colorclass, macaroonbakery, oauthlib, pymongo, pytz, terminaltables |
| Maintenance | aging — 1,458 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 537,183/month — #6,121 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: python_libmaas-0.6.8-py3-none-any.whl
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
maas-apiA Python client library for MAAS (Metal as a…
unclear · top 15,000 on PyPI
python-ironicclientPython client library and CLI for the OpenStack…
permissive · top 15,000 on PyPI
metal-sdkPython client library for indexing and querying…
permissive · top 15,000 on PyPI
google-cloud-computePython client library for Google Compute Engine…
permissive · top 1,000 on PyPI
oktaA Python SDK for the Okta Management APIs,…
permissive · top 5,000 on PyPI
python-sonarqube-apiProvides a Python client library for…
agpl · top 15,000 on PyPI
stackit-iaasProvides Python bindings to create and modify…
permissive · top 15,000 on PyPI
config-parserMerges configuration from YAML/JSON files,…
agpl · top 5,000 on PyPI
fspathProvides a more intuitive Python API for…
agpl · top 15,000 on PyPI
pyobjc-framework-MetalProvides Python bindings to Apple's Metal…
permissive · top 15,000 on PyPI