Skip to main content

An api client library for MAAS.io

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

maas-api-0.1.1.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

maas_api-0.1.1-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file maas-api-0.1.1.tar.gz.

File metadata

  • Download URL: maas-api-0.1.1.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.9.7 Linux/5.10.68-1-MANJARO

File hashes

Hashes for maas-api-0.1.1.tar.gz
Algorithm Hash digest
SHA256 bcc8069fbc0931d883992a2e7082eac261c68593dae5fc2d126d77ef09d65436
MD5 617d5423bc427191b685290fbb097a64
BLAKE2b-256 6242088e60b9f1caa4303873a5acc49d229c59a63adb87db335fe2f474b5d39b

See more details on using hashes here.

File details

Details for the file maas_api-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: maas_api-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.9.7 Linux/5.10.68-1-MANJARO

File hashes

Hashes for maas_api-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6f10fc789219dc40f8125faea8867a4982cb359a180a25449b58d504d5d2e0d5
MD5 e01a4a1b33c04c252059ed24f5552a76
BLAKE2b-256 940cc363a85e814f361f1ac65ecc9f2f40e525a6fd4925a5dac1c57abb1b8eef

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page