Command line interface to easy communicate to your Portainer application.
Project description
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 to your Portainer application, like in a continuous integration and continuous deploy 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]
E.g:
portainer-cli update_stack 2 1 docker-compose.yml
update_stack command environment variables arguments
portainer-cli update_stack id endpoint_id [stack_file] --env.var=value
Where var
is environment variable name and value
is the environment variable value.
Flags
Flag | Description |
---|---|
-p or --prune |
Prune services |
-c or --clear-env |
Clear all environment variables |
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 update dist
directory.
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
Built Distributions
File details
Details for the file portainer-cli-0.1.0.tar.gz
.
File metadata
- Download URL: portainer-cli-0.1.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using 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.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 524c3430209422671bdc39ba6ae62abc57cb7f450719eec99740af3feacf5639 |
|
MD5 | fe5d5e634c510509429a7fd6216c6339 |
|
BLAKE2b-256 | 2cf9607f05747eea7803195143bcc3f29ac38a757a21c016b3107f421a42467a |
File details
Details for the file portainer_cli-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: portainer_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using 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.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 527fee8cd8ec83e3d16c091449e03fb0561abb756238d16479f351f125251888 |
|
MD5 | 4aa9ec25387d4de84ee808ba7c3a9781 |
|
BLAKE2b-256 | 0cec9adf5ff58dd3c1c40b105ef7171f5a527af4c66a998841ad300357c826f4 |
File details
Details for the file portainer_cli-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: portainer_cli-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 2, Python 3
- Uploaded using 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.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | af082a9fa43ac7f47ae6b59d688e2f94743084d0f52868c83a4cd45f4559ee48 |
|
MD5 | 57e5b0847c2da6a78ad176709b0e2434 |
|
BLAKE2b-256 | 31b8ccdf52213649110d4836d251008907f6a5e9da6e14b1f450dbd57a5b95c2 |