Skip to main content

UNKNOWN

Project description

This package provides Python bindings for [Orchard], letting you manage Docker hosts for a particular account and interact with an individual host using [docker-py].

Install

`bash $ pip install orchard `

Authenticating

The orchard package provides two methods for instantiating an API client:

`python >>> import orchard >>> orchard.with_token(my_token) <orchard.client.Client object at 0x101de0d10> >>> orchard.with_username_and_password(my_username, my_password) <orchard.client.Client object at 0x102244e10> `

Managing hosts

Once you’ve instaniated a Client object, the hosts property lets you list, create and delete hosts:

`python >>> client.hosts [<Host: default>, <Host: host2>] >>> client.hosts[0] <Host: default> >>> client.hosts["host2"] <Host: host2> >>> host3 = client.hosts.create({"name": "host3"}) >>> host3 <Host: host3> >>> host3.delete() `

Interacting with Docker

To get a [docker-py] instance for a host, call host.docker():

`python >>> docker = client.hosts["default"].docker() >>> docker.containers() [] >>> c = docker.create_container("ubuntu", "date") >>> docker.start(c['Id']) >>> docker.wait(c['Id']) 0 >>> docker.logs(c['Id']) 'Mon Oct 28 15:42:56 UTC 2013\n' >>> docker.remove_container(c['Id']) `

See the [docker-py] README for a full list of methods.

[Orchard]: https://www.orchardup.com [docker-py]: https://github.com/dotcloud/docker-py [CLI docs]: https://www.orchardup.com/docs/cli [Orchard API docs]: https://www.orchardup.com/docs/api

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

orchard-2.0.2.tar.gz (17.8 kB view details)

Uploaded Source

File details

Details for the file orchard-2.0.2.tar.gz.

File metadata

  • Download URL: orchard-2.0.2.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for orchard-2.0.2.tar.gz
Algorithm Hash digest
SHA256 a09ffdd6821b0993d10d703e84a3e0f69a8d323383f12428fb03bd4568f63a65
MD5 d897a1bc1b69e8d7da329f753a08cd17
BLAKE2b-256 4b3e78d74eb0048d895dd8f41243adb48cd8c02d391a0aefe9854f84cc258a29

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 Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page