# aiotainer
[![codecov](https://codecov.io/gh/Thomas55555/aiotainer/graph/badge.svg?token=Hn1Qp8ZvOt)](https://codecov.io/gh/Thomas55555/aiotainer)
[![Python Versions](https://img.shields.io/pypi/pyversions/aiotainer)](https://pypi.org/project/aiotainer/)
[![License](https://img.shields.io/github/license/Thomas55555/aiotainer.svg)](LICENSE.md)
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](https://docs.portainer.io/admin/settings/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][poetry-install]
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][poetry] dependency manager.
As this repository uses the [pre-commit][pre-commit] framework, all changes
are linted and tested with each commit. You can run all checks and tests
manually, using the following command:
```bash
poetry run pre-commit run --all-files
```
To run just the Python tests:
```bash
poetry run pytest
```
To update snapshots:
```bash
poetry run pytest --snapshot-update
```
[poetry-install]: https://python-poetry.org/docs/#installation
[poetry]: https://python-poetry.org
[pre-commit]: https://pre-commit.com/
Raw data
{
"_id": null,
"home_page": "https://github.com/Thomas55555/aiotainer",
"name": "aiotainer",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.11",
"maintainer_email": null,
"keywords": "Portainer, Docker, api, async, client",
"author": "Thomas Peter Protzner",
"author_email": "thomas.protzner@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/86/25/f13a28e11f5d88de4f56011485344ff9f211e28c70966169f31a9e9dfda8/aiotainer-0.0.1b5.tar.gz",
"platform": null,
"description": "# aiotainer\n\n[![codecov](https://codecov.io/gh/Thomas55555/aiotainer/graph/badge.svg?token=Hn1Qp8ZvOt)](https://codecov.io/gh/Thomas55555/aiotainer)\n[![Python Versions](https://img.shields.io/pypi/pyversions/aiotainer)](https://pypi.org/project/aiotainer/)\n[![License](https://img.shields.io/github/license/Thomas55555/aiotainer.svg)](LICENSE.md)\n\nAsynchronous library to communicate with the Portainer API\n\n## Quickstart\n\nIn order to use the library, you'll need to do some work yourself to get authentication\ncredentials. This depends a lot on the context (e.g. redirecting to use OAuth via web)\nbut should be easy to incorporate using Portainers's authentication examples. See\nPortainers's [Authentication](https://docs.portainer.io/admin/settings/authentication) for details.\n\nYou will implement `AbstractAuth` to provide an access token. Your implementation\nwill handle any necessary refreshes. You can invoke the service with your auth implementation\nto access the API.\n\nYou need at least:\n\n- Python 3.11+\n- [Poetry][poetry-install]\n\nFor a first start you can run the `example.py`, by doing the following steps\n\n- `git clone https://github.com/Thomas55555/aiotainer.git`\n- `cd aiotainer`\n- `poetry install`\n- Enter your personal `client_id` and `client_secret` in the `_secrets.yaml` and rename it to `secrets.yaml`\n- Run with `poetry run ./example.py`\n\n## Contributing\n\nThis is an active open-source project. We are always open to people who want to use the code or contribute to it.\nThis Python project is fully managed using the [Poetry][poetry] dependency manager.\n\nAs this repository uses the [pre-commit][pre-commit] framework, all changes\nare linted and tested with each commit. You can run all checks and tests\nmanually, using the following command:\n\n```bash\npoetry run pre-commit run --all-files\n```\n\nTo run just the Python tests:\n\n```bash\npoetry run pytest\n```\n\nTo update snapshots:\n\n```bash\npoetry run pytest --snapshot-update\n```\n\n[poetry-install]: https://python-poetry.org/docs/#installation\n[poetry]: https://python-poetry.org\n[pre-commit]: https://pre-commit.com/\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "MPython module to talk to a Portainer.",
"version": "0.0.1b5",
"project_urls": {
"Documentation": "https://github.com/Thomas55555/aiotainer",
"Homepage": "https://github.com/Thomas55555/aiotainer",
"Issues": "https://github.com/Thomas55555/aiotainer/issues",
"Repository": "https://github.com/Thomas55555/aiotainer"
},
"split_keywords": [
"portainer",
" docker",
" api",
" async",
" client"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f2872ed06d7c6eb37ca1eb67d01b45e6eaac010873fe60e74d2052ec10112d44",
"md5": "8c2479215591e0089648ba09574f5887",
"sha256": "b2754a5d965724e22f80804a123a95c55f95e7440a6ed5c657ead78665a129da"
},
"downloads": -1,
"filename": "aiotainer-0.0.1b5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8c2479215591e0089648ba09574f5887",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.11",
"size": 10936,
"upload_time": "2024-11-25T18:55:20",
"upload_time_iso_8601": "2024-11-25T18:55:20.917115Z",
"url": "https://files.pythonhosted.org/packages/f2/87/2ed06d7c6eb37ca1eb67d01b45e6eaac010873fe60e74d2052ec10112d44/aiotainer-0.0.1b5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8625f13a28e11f5d88de4f56011485344ff9f211e28c70966169f31a9e9dfda8",
"md5": "f6a75d9086543ce46ca2ea121c994d80",
"sha256": "8205f5cd408256e39000b860cc6ad27e6f18097bca926f756f525cc2badf5642"
},
"downloads": -1,
"filename": "aiotainer-0.0.1b5.tar.gz",
"has_sig": false,
"md5_digest": "f6a75d9086543ce46ca2ea121c994d80",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.11",
"size": 12816,
"upload_time": "2024-11-25T18:55:22",
"upload_time_iso_8601": "2024-11-25T18:55:22.732300Z",
"url": "https://files.pythonhosted.org/packages/86/25/f13a28e11f5d88de4f56011485344ff9f211e28c70966169f31a9e9dfda8/aiotainer-0.0.1b5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-25 18:55:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Thomas55555",
"github_project": "aiotainer",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "aiotainer"
}