Skip to main content

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.

Files for portainer-cli, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size portainer_cli-0.1.0-py2.py3-none-any.whl (5.2 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size portainer_cli-0.1.0-py3-none-any.whl (5.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size portainer-cli-0.1.0.tar.gz (4.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page