Skip to main content

A python module to interact with ha-dockermon.

Project description

A python module to interact with ha-dockermon.


This has been tested with python 3.6
This module require a Cloudflare username and API key.
This module uses these external libararies:

  • requests


pip install pydockermon


from pydockermon import Dockermon

dm = Dockermon()
host = ''
port = 8126 #Optional
exclude = ['MyFirstContainer', 'MySecondContainer'] #Optional

containers = dm.listContainers(host)
print(containers) #Returns a list of all containers with state, or False if it fails.
containerstate = dm.getContainerState('MyContainer', host, port)
print(containerstate) #Returns the container state, or False if it fails.
containerstats = dm.getContainerStats('MyContainer', host, port)
print(containerstats) #Returns stats about the container, or False if it fails.
stopcontainer = dm.stopContainer('MyContainer', host, port)
print(stopcontainer) #Returns True/false.
startcontariner = dm.startContainer('MyContainer', host, port)
print(startcontariner) #Returns True/False.

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

pydockermon-0.0.1.tar.gz (1.9 kB view hashes)

Uploaded source

Built Distribution

pydockermon-0.0.1-py3-none-any.whl (2.3 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page