Skip to main content

Asynchronous client library for LXD REST API

Project description

Latest Version Build Status Coverage Status

asyncLXD is an asyncio-based client library for the the LXD REST API.

It provides an high level API to interact with resources on LXD servers, such as containers, images, networks, profiles and storage.

LXD servers are accessible through the asynclxd.remote.Remote class, which exposes server details and configuration, as well as access to resource collections.

Collections (such as containers, images, profiles, networks, …) allow creating and fetching resources, which can be modified, updated or deleted.

For example:

from pprint import pprint

from asynclxd import lxc

# get all remotes defined in the client config
remotes = lxc.get_remotes()
async with remotes['local'] as remote:
    # fetch all images and print their details
    resp = await
    for image in resp:
        resp = await
        # image details have been read, now they're also cached (same
        # output as above)

    # fetch a single container by name
    container = await remote.containers.get('c')
    # rename it
    await container.rename('new-c')
    # change some details
    await container.update({'description': 'foo'})
    # and now delete it
    await container.delete()

Project details

Download files

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

Files for asynclxd, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size asynclxd-0.0.1.tar.gz (27.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page