A straight forward tool to get information from docker command line and try to parse into json format as far as possible.
Project description
Docker-cli
A straight forward tool to get information from docker command line and try to parse into json format as far as possible.
Why not docker api?
- The api schema might change and response data might change so often.
- Docker-cli uses docker cli to get response and try to format them into json format
Installation
pip install docker-cli
Main methods
is_docker_set()
to verify docker installation and availability
docker_cli.is_docker_set()
- To run docker commands
Request: docker_cli.docker("ps")
Response Structure:
DockerResponse(command='docker ps', status='SUCCESS', type='JSON', data=[<JSON Data>])
- To run docker commands
Request: docker_cli.docker_compose("up -d")
Response Structure:
Similar as that of docker commands
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
docker-cli-1.0.2.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for docker_cli-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de43229f4d565773bfa52ef566bd76145a57da12650eedd406b34b1620e72228 |
|
MD5 | 52b81270d53882883068f9d45379ff73 |
|
BLAKE2b-256 | 303e5f7a34ee9c35e7bbe366371237234b92a53c3537ce04bb16ede8b0b17c7a |