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.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41419c0232af2b7193e4ffa755c1a1bca4a2db5b09e731c4e60ab9dffc424afe |
|
MD5 | b4491a5932c3c43b47df8d36c479adfa |
|
BLAKE2b-256 | e2f290c5a07397fa42ab069c0f6ea4178343d2f0d38b03a613814fe0c0ee3caa |
Provenance
The following attestation bundles were made for aiotainer-0.0.1b4.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.1b4.tar.gz
- Subject digest:
41419c0232af2b7193e4ffa755c1a1bca4a2db5b09e731c4e60ab9dffc424afe
- Sigstore transparency entry: 148707965
- Sigstore integration time:
- Predicate type:
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8ec8c8260b2978466117eb750bdaef8749415c2d7c568d4b634654f0023746f |
|
MD5 | 1326fbea8f4b8b87e89f83773c78e722 |
|
BLAKE2b-256 | e5b03399410972e36821b99f17fca5a85d80e930b7fd279a2a2f3b1e3a631e50 |
Provenance
The following attestation bundles were made for aiotainer-0.0.1b4-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.1b4-py3-none-any.whl
- Subject digest:
d8ec8c8260b2978466117eb750bdaef8749415c2d7c568d4b634654f0023746f
- Sigstore transparency entry: 148707969
- Sigstore integration time:
- Predicate type: