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

Download files

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

Source Distribution

portopy-2.11.1.tar.gz (12.8 kB view hashes)

Uploaded source

Supported by

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