A python module to interact with ha-dockermon.
Project description
A python module to interact with ha-dockermon.
Notes
This has been tested with python 3.6
This module require a Cloudflare username and API key.
This module uses these external libararies:
- requests
Install
pip install pydockermon
Usage:
from pydockermon import Dockermon
dm = Dockermon()
host = '192.168.1.3'
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for pydockermon-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75f8da7a20f817d4349aa4ff036416b5ce3d72d9360b541eb922ada4abf93855 |
|
MD5 | f3900f9ee7499385e642ffd0b077fb2f |
|
BLAKE2b-256 | 75bf8449f50cd8b20d62b25a7854200f73132e92ea4bbc3114955b3a222cb7d9 |