skillfed

python-libmaas

A client API library specially for MAAS.

python-libmaas v0.6.8 537.2K downloads/30d#6,121 on PyPI65
AGPL license AGING released

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-libmaas

uv

uv add python-libmaas

poetry

poetry add python-libmaas

Installing 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

Development Status :: 3 - AlphaIntended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: GNU Affero General Public License v3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries

Tags

maas client librarybare metal provisioningmetal as a service pythonmaas cli toolinfrastructure management clientmaas python apibare metal management
bare-metal-provisioninginfrastructure-automationmaas-client

More Libraries packages