Skip to main content

No project description provided

Project description

Installation

portainer-py is distributed on PyPI as a universal wheel and is available on Linux/macOS and Windows and supports Python 3.5+.

$ pip install portainer-py

Usage

If you’re running Portainer locally, which should be very easy using Docker, connect to it like this:

from portainer_py import portainer_for_host

portainer = portainer_for_host("http://localhost:9000")
portainer.login("<username>", "<password>")

stack = portainer.stack_with_name("my-stack")

try:
    portainer.update_stack(
        stack["Id"],
        "path/to/stackfile.yml",
        env_vars={"foo": "bar"}
    )
except: PortainerError as error:
    print(error.message)

License

portainer-py is distributed under the terms of the MIT License.

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

portainer-py-0.4.0.tar.gz (8.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page