Skip to main content

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


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)

Uploaded Source

Built Distribution

docker_cli-1.0.2-py3-none-any.whl (2.6 kB view hashes)

Uploaded Python 3

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