Skip to content

DDevine/ufaas-dockerapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

uFaaS Docker API

Status: pre-alpha

An asyncio/aiohttp based Docker API.

In contrast to some other client libraries this one aims to offer:

  • Async API.
  • Configuration objects rather than JSON.
    • No camelcase keys.
    • Development environment friendly.
    • Makes usage more obvious.
  • Object API in addition to a raw low-level Docker API.
  • Python type hinting.
  • Exec support, with WebSocket attachment.

Support for other parts of the Docker API such as Networking and Docker Swarm support will be performed as uFaaS (eventually) requires them, or if patches are submitted.

Basic Usage

from ufaas_dockerapi.client import DockerClient, default_transport
from asyncio import get_event_loop

loop = get_event_loop()
client = DockerClient(default_transport())

# View Docker system version info.
loop.run_until_complete(client.system.version())

# Pull alpine:3.8 from Docker Hub.
loop.run_until_complete(client.image.pull("alpine", tag="3.8"))

Running Tests

Tests depend on the current environment allowing connection to the Docker socket, and being allowed to manage Docker.

$ pip install tox
$ tox

About

Mirror of https://gitlab.com/unisonaf/ufaas-dockerapi - A Docker API client targeted at MicroFaaS use-cases.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages