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 | RSS feed
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)