GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - orchardup/python-orchard: Orchard Python client

BranchesTags
Open more actions menu

Latest commit

 

History

87 Commits
87 Commits

Folders and files

NameName
Last commit message
Last commit date
orchard
orchard
 
 
script
script
 
 
.gitignore
.gitignore
 
 
CHANGES.md
CHANGES.md
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
MANIFEST.in
MANIFEST.in
 
 
README.md
README.md
 
 
setup.cfg
setup.cfg
 
 
setup.py
setup.py
 
 

Repository files navigation

Orchard Python client

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

$ pip install orchard

Authenticating

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

>>> 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:

>>> 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():

>>> 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.

About

Orchard Python client

orchardup.com

Resources

Readme
Apache-2.0 license
Activity
Custom properties

Stars

9 stars

Watchers

4 watching

Forks

4 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.