Skip to main content

MPython module to talk to a Portainer.

Project description

aiotainer

codecov Python Versions License

Asynchronous library to communicate with the Portainer API

Quickstart

In order to use the library, you'll need to do some work yourself to get authentication credentials. This depends a lot on the context (e.g. redirecting to use OAuth via web) but should be easy to incorporate using Portainers's authentication examples. See Portainers's Authentication for details.

You will implement AbstractAuth to provide an access token. Your implementation will handle any necessary refreshes. You can invoke the service with your auth implementation to access the API.

You need at least:

For a first start you can run the example.py, by doing the following steps

  • git clone https://github.com/Thomas55555/aiotainer.git
  • cd aiotainer
  • poetry install
  • Enter your personal client_id and client_secret in the _secrets.yaml and rename it to secrets.yaml
  • Run with poetry run ./example.py

Contributing

This is an active open-source project. We are always open to people who want to use the code or contribute to it. This Python project is fully managed using the Poetry dependency manager.

As this repository uses the pre-commit framework, all changes are linted and tested with each commit. You can run all checks and tests manually, using the following command:

poetry run pre-commit run --all-files

To run just the Python tests:

poetry run pytest

To update snapshots:

poetry run pytest --snapshot-update

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

aiotainer-0.0.1b3.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

aiotainer-0.0.1b3-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file aiotainer-0.0.1b3.tar.gz.

File metadata

  • Download URL: aiotainer-0.0.1b3.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for aiotainer-0.0.1b3.tar.gz
Algorithm Hash digest
SHA256 3d30c85c9739d8d4752a9fb15af9d2bbc8bba7ceaa70f828c18808f6e183487c
MD5 fed6dec035d60ee394150345c9adda30
BLAKE2b-256 dcbfadb736a927f1c0f8516143dbc648c70ad7eb4f7368ad001e105bf2460795

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiotainer-0.0.1b3.tar.gz:

Publisher: release.yml on Thomas55555/aiotainer

Attestations:

File details

Details for the file aiotainer-0.0.1b3-py3-none-any.whl.

File metadata

  • Download URL: aiotainer-0.0.1b3-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for aiotainer-0.0.1b3-py3-none-any.whl
Algorithm Hash digest
SHA256 b00be1bf0e49d9bf31a10f798576dee170b5bd3ee5be6ded67b5e790b2062c8d
MD5 6dad3658d9471ea9142bd4ebbd468d17
BLAKE2b-256 75244f8329a3545aa51dd07b8de543cb55427d94ec53132276d60aa498ba9389

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiotainer-0.0.1b3-py3-none-any.whl:

Publisher: release.yml on Thomas55555/aiotainer

Attestations:

Supported by

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