Portainer CLI
Powered by Ilhasoft's Web Team.
Portainer CLI is a Python software to use in command line. Use this command line interface to easy communicate with your Portainer application, like in a continuous integration and continuous deployment environments.
Install
pip install [--user] portainer-cli
Usage
Global flags
| Flag | Description |
|---|---|
-l or --local |
Save and load configuration file (.portainer-cli.json) in current directory. |
-d or --debug |
Enable DEBUG messages in stdout |
configure command
Configure Portainer HTTP service base url.
portainer-cli configure base_url
E.g:
portainer-cli configure http://10.0.0.1:9000/
login command
Identify yourself and take action.
portainer-cli login username password
E.g:
portainer-cli login douglas d1234
update_stack command
Update stack.
portainer-cli update_stack id endpoint_id [stack_file] [-env-file]
E.g:
portainer-cli update_stack 2 1 docker-compose.yml
Environment variables arguments
portainer-cli update_stack id endpoint_id [stack_file] --env.var=value
Where var is the environment variable name and value is the environment variable value.
Flags
| Flag | Description |
|---|---|
-env-file |
Pass env file path, usually .env |
-p or --prune |
Prune services |
-c or --clear-env |
Clear all environment variables |
update_registry command
Update registry.
portainer-cli update_registry id [-name] [-url]
E.g:
portainer-cli update_registry 1 -name="Some registry" -url="some.url.com/r"
Authentication
You can use authentication passing -a or --authentication flag, but you must pass the -username and -password options.
portainer-cli update_registry 1 -a -username=douglas -password=d1234
request command
Make a request.
portainer-cli request path [method=GET] [data]
E.g:
portainer-cli request status
Flags
| Flag | Description |
|---|---|
-p or --printc |
Print response content in stdout. |
Development
This project use Pipenv to manager Python packages.
With Pipenv installed, run make install to install all development packages dependencies.
Run make lint to run flake8 following PEP8 rules.
Run make or make sdist to create/update dist directory.
Metadata
Release files for portainer-cli 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| portainer-cli-0.3.0.tar.gz | 4.8 kB | Without provenance | Details for portainer-cli-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| portainer_cli-0.3.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for portainer_cli-0.3.0-py2.py3-none-any.whl |
Total release size: 10.6 kB
Release files / portainer-cli-0.3.0.tar.gz
| Download URL | portainer-cli-0.3.0.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
11ec4cda06ffb0e0086bc5a57d070407149437deaea4f0999bcc98e19ff5cf63
|
|
BLAKE2b-256 checksum How to use checksums |
ad7a984844a7ba841f435dd82581d03c243134c3f7bfc8c789f99c4113e19738
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.6.7
|
Release files / portainer_cli-0.3.0-py2.py3-none-any.whl
| Download URL | portainer_cli-0.3.0-py2.py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a31e2f1ca14e9f99f155c6274bdaade875544edf79e0e97c9e471f14351644f6
|
|
BLAKE2b-256 checksum How to use checksums |
c8896820f419a61c81c1dd1575321317550a8342329ff131a6000d16450620df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.6.7
|
Security for portainer-cli 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.