MPython module to talk to a Portainer.
Project description
aiotainer
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:
- Python 3.11+
- Poetry
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
andclient_secret
in the_secrets.yaml
and rename it tosecrets.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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d30c85c9739d8d4752a9fb15af9d2bbc8bba7ceaa70f828c18808f6e183487c |
|
MD5 | fed6dec035d60ee394150345c9adda30 |
|
BLAKE2b-256 | dcbfadb736a927f1c0f8516143dbc648c70ad7eb4f7368ad001e105bf2460795 |
Provenance
The following attestation bundles were made for aiotainer-0.0.1b3.tar.gz
:
Publisher:
release.yml
on Thomas55555/aiotainer
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
aiotainer-0.0.1b3.tar.gz
- Subject digest:
3d30c85c9739d8d4752a9fb15af9d2bbc8bba7ceaa70f828c18808f6e183487c
- Sigstore transparency entry: 148682654
- Sigstore integration time:
- Predicate type:
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | b00be1bf0e49d9bf31a10f798576dee170b5bd3ee5be6ded67b5e790b2062c8d |
|
MD5 | 6dad3658d9471ea9142bd4ebbd468d17 |
|
BLAKE2b-256 | 75244f8329a3545aa51dd07b8de543cb55427d94ec53132276d60aa498ba9389 |
Provenance
The following attestation bundles were made for aiotainer-0.0.1b3-py3-none-any.whl
:
Publisher:
release.yml
on Thomas55555/aiotainer
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
aiotainer-0.0.1b3-py3-none-any.whl
- Subject digest:
b00be1bf0e49d9bf31a10f798576dee170b5bd3ee5be6ded67b5e790b2062c8d
- Sigstore transparency entry: 148682656
- Sigstore integration time:
- Predicate type: