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.1b4.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: aiotainer-0.0.1b4.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.1b4.tar.gz
Algorithm Hash digest
SHA256 41419c0232af2b7193e4ffa755c1a1bca4a2db5b09e731c4e60ab9dffc424afe
MD5 b4491a5932c3c43b47df8d36c479adfa
BLAKE2b-256 e2f290c5a07397fa42ab069c0f6ea4178343d2f0d38b03a613814fe0c0ee3caa

See more details on using hashes here.

Provenance

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

Publisher: release.yml on Thomas55555/aiotainer

Attestations:

File details

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

File metadata

  • Download URL: aiotainer-0.0.1b4-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.1b4-py3-none-any.whl
Algorithm Hash digest
SHA256 d8ec8c8260b2978466117eb750bdaef8749415c2d7c568d4b634654f0023746f
MD5 1326fbea8f4b8b87e89f83773c78e722
BLAKE2b-256 e5b03399410972e36821b99f17fca5a85d80e930b7fd279a2a2f3b1e3a631e50

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiotainer-0.0.1b4-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