An opinionated fleet API client for Python
Project description
An opinionated fleet API client for Python.
Usage
import fleetpy
client = fleetpy.Client('https://fleet.myenv.com')
unit = client.unit('consul', from_file='consul.service')
# Submit the unit, but keep it inactive
unit.submit()
# Start the unit
unit.start()
# Stop the unit
unit.stop()
# List the state of all units
state = client.state()
# List the machines
machines = client.machines()
# List the units
units = client.units()
# Get the state of a remote unit
unit = client.unit('remote.service')
unit.refresh()
print(unit.state)
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
fleetpy-0.2.2.tar.gz
(4.3 kB
view hashes)
Built Distribution
Close
Hashes for fleetpy-0.2.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab9527083c5986c2dda60ff872ff7004015e6590b0e09d25432161fa8895214d |
|
MD5 | a671bb7bf73abd8e3c0e558c5b3ef251 |
|
BLAKE2b-256 | a8f9cae8228fdb8bafce28c21871e94512eb274c542267e5ca537f415dd325e4 |