Skip to main content

Python API for porto

Project description

To initiate connection, simply do(portod must be started):

>>> from porto import Connection
>>> rpc = Connection()
>>> rpc.connect()

To create container test:

>>> container = rpc.Create('test')

List all properties:

>>> print rpc.Plist()

List data:

>>> print rpc.Dlist()

Get command property of container test:

>>> print rpc.GetProperty('test', 'command')
>>> print container.GetProperty('command')  # the same

Get all properties of container:

>>> print container.GetProperties()

List containers:

>>> print rpc.List()

Destroy container test:

>>> rpc.Destroy('test')

Close connection:

>>> rpc.disconnect()

Project details


Release history Release notifications

This version
History Node

2.11.1

History Node

2.11

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
portopy-2.11.1.tar.gz (12.8 kB) Copy SHA256 hash SHA256 Source None Oct 3, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page