Skip to main content

Table of Contents

  1. Quickstart
    1. Installing
    2. Using
  2. Why?
  3. How?

Quickstart

Installing

You can install using pip.

pip install maas-api

Using

You can use the api client the same way you would use the CLI.

from maas_api import Client

client = Client("http://192.0.2.10:/MAAS", api_key="your:api:key")

# allocate a machine
machine = client.machines.allocate()
# start deploy
client.machine.deploy(system_id=machine["system_id"])
# release the machine
client.machine.release(system_id=machine["system_id"])

Why?

The official MAAS api client library python-libmaas did not receive any new functionality that is available with MAAS. There is however a CLI written in python. This allows all the functionality to be used.

How?

By using the same technique as the official CLI. By using the API description available at /MAAS/api/2.0/describe. This allows us to expose the full API exposed by the MAAS server and to keep functional parity with the CLI.

Metadata

Release files for maas-api 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for maas-api 0.1.1
File Size Uploaded
maas-api-0.1.1.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for maas-api 0.1.1
File Interpreter ABI Platform
maas_api-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 5.9 kB

Release files / maas-api-0.1.1.tar.gz

Download URL maas-api-0.1.1.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
bcc8069fbc0931d883992a2e7082eac261c68593dae5fc2d126d77ef09d65436
BLAKE2b-256 checksum
How to use checksums
6242088e60b9f1caa4303873a5acc49d229c59a63adb87db335fe2f474b5d39b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.9.7 Linux/5.10.68-1-MANJARO

Release files / maas_api-0.1.1-py3-none-any.whl

Download URL maas_api-0.1.1-py3-none-any.whl
Size 2.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6f10fc789219dc40f8125faea8867a4982cb359a180a25449b58d504d5d2e0d5
BLAKE2b-256 checksum
How to use checksums
940cc363a85e814f361f1ac65ecc9f2f40e525a6fd4925a5dac1c57abb1b8eef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.9.7 Linux/5.10.68-1-MANJARO

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page