Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

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


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 AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page