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.3.tar.gz
(4.3 kB
view hashes)
Built Distribution
Close
Hashes for fleetpy-0.2.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16e1f1287d760ba26875c1ebbb063913a41ab254c825dc4cb1e0370f1e67adf3 |
|
MD5 | 3a3f7c8c33ff2f530fff98a8df3d32cb |
|
BLAKE2b-256 | 14b9b297547c65363064316a4cb015de89247b241a108aba970b9d6797fd6dde |