Skip to main content

Python wrapper for Docker Machine.

Project description

# docker-machine-py

[![Build Status](https://travis-ci.org/jgrowl/docker-machine-py.svg?branch=master)](https://travis-ci.org/jgrowl/docker-machine-py)

A Python library for the Docker Machine CLI. It does everything the docker-machine command does, but from within Python
– create machines, check status, get ip, run ssh commands, regenerate certificates, etc.

## Installation

The latest stable version is always available on PyPi.

pip install docker-py

## Documentation

[![Documentation Status](https://readthedocs.org/projects/docker-machine-py/badge/?version=latest)](https://readthedocs.org/projects/docker-machine-py/?badge=latest)

[Read the full documentation here.](http://docker-machine-py.readthedocs.org/en/latest/)

## Usage

import docker_machine
machine = Machine('my_digitalocean_machine')
if not machine.exists():
machine.create('digitalocean', access_token='my_digitalocean_access_token')

status = machine.status()
machine.rm(force=True)

### Customizing the client

docker_machine.CLIENT = docker_machine.cli.client.Client(storage_path=None, storage_path=None, tls_ca_cert=None,
tls_ca_key=None, tls_client_cert=None, tls_client_key=None, github_api_token=None, native_ssh=False,
bugsnag_api_token=None)

## Using the lower level wrapper

If you need more control or wish to interact with docker-machine exactly as you would from cli you can use the client
directly.

import docker_machine
client = Client()

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

docker-machine-py-0.2.1.tar.gz (13.2 kB view details)

Uploaded Source

File details

Details for the file docker-machine-py-0.2.1.tar.gz.

File metadata

File hashes

Hashes for docker-machine-py-0.2.1.tar.gz
Algorithm Hash digest
SHA256 5610a4a3fd58ab5d0a49e2819c4735347df9596b54df5e94735fda3915ef789c
MD5 ac4eca0914ca42c4a5350b2b67f6a2cd
BLAKE2b-256 226254eb9b2d981789ca47f6753a1dda1c71aedcb5c0c493fb8a082504675bbe

See more details on using hashes here.

Supported by

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