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.0.tar.gz
(4.3 kB
view hashes)
Built Distribution
Close
Hashes for fleetpy-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78f53d7cf0bbea1fbf37c6b5219cfb393e6f380b8f9556b7d7992bd3a1377122 |
|
MD5 | aec78f1f00a172caa7a4f7badb29ea79 |
|
BLAKE2b-256 | a995e01f65769c002a17b90ea5ff9ff81413a37b444e9d11f20074921bd388a4 |