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 details)

Uploaded Source

File details

Details for the file portopy-2.11.1.tar.gz.

File metadata

  • Download URL: portopy-2.11.1.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for portopy-2.11.1.tar.gz
Algorithm Hash digest
SHA256 7a4d5d58c4a67510e10fa4b92f19cd2c158c7e96ddc196d76131f6ec0f66f468
MD5 68ec35f1230da7feb38dace8082f6362
BLAKE2b-256 d84103496311deb38ffae64d89e889316ca3d222eba567cb3054cb0b9e742869

See more details on using hashes here.

Supported by

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