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.1.0.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for fleetpy-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 489c89152772987399e9ae0d1311229fd03a979c7efe24656123dbce5439132a |
|
MD5 | 31e637f2583e073a4c38a5ac6bde03de |
|
BLAKE2b-256 | e20f07447ecd348590a925c59607d2e47709474f2f411f94ea01e1b4f42ebfed |