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.1.tar.gz
(4.3 kB
view hashes)
Built Distribution
Close
Hashes for fleetpy-0.2.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6250358a91e5022c776ac17a9a1cfe9bba5cacc20aedbdfbc0b1e22d1dcbacb |
|
MD5 | 08de2830fc0fe0fa801be67a7f01f920 |
|
BLAKE2b-256 | 38e3278d358ddd5fa8a7f3b90b31ccf9b2cb19b90b8bd2a568c29accc9f6aedc |