Skip to main content

UNKNOWN

Project description

This package provides both a command-line and Python client for [Orchard]. Both provide functionality for managing Orchard apps under an account and for interacting with an individual app’s Docker instance using [docker-py].

Install

`bash $ pip install orchard `

Upgrading to the latest version

`bash $ pip install -U orchard `

Command-line client

For help on using Orchard from the command-line, run orchard –help or see the [CLI docs] on the website.

Authenticating

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

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

Managing apps

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

`python >>> client.apps [<App: app1>, <App: app2>] >>> client.apps[0] <App: app1> >>> client.apps["app2"] <App: app2> >>> app3 = client.apps.create({"name": "app3"}) >>> app3 <App: app3> >>> app3.delete() `

Interacting with Docker

To get a [docker-py] instance for an app, call client.docker(app_name):

`python >>> docker = client.docker("app1") >>> 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']) `

Consult the [docker-py] README for a full list of methods. Orchard does not currently support all of the methods that Docker supports though. See the [Orchard API docs] for a list of what is not supported.

[Orchard]: https://orchardup.com [docker-py]: https://github.com/dotcloud/docker-py [CLI docs]: https://orchardup.com/docs/cli [Orchard API docs]: https://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-1.0.8.tar.gz (14.7 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for orchard-1.0.8.tar.gz
Algorithm Hash digest
SHA256 af7ecef27b185323f18e8abf9d6c6033171b6a6a709fb2d3359b62ab6f383187
MD5 c0d350529d4a21bbd6ee01668aa71c6b
BLAKE2b-256 42cb64b0d94f6c7bb63a735b97125e0da8ea3eb72d613cf2ab14ab09585ecc66

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