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 details)
Built Distribution
File details
Details for the file fleetpy-0.2.0.tar.gz
.
File metadata
- Download URL: fleetpy-0.2.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
f02727e2aea696dd92adeda25cd105d1328481e84cbabe739f8cf728adfc0f73
|
|
MD5 |
f9b91f6b136ba81250af2afd27f3672d
|
|
BLAKE2b-256 |
0cfab4124c740398c730c2fd13fd183f86240158388e7f362df8639b3fc5b1aa
|
File details
Details for the file fleetpy-0.2.0-py2.py3-none-any.whl
.
File metadata
- Download URL: fleetpy-0.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
78f53d7cf0bbea1fbf37c6b5219cfb393e6f380b8f9556b7d7992bd3a1377122
|
|
MD5 |
aec78f1f00a172caa7a4f7badb29ea79
|
|
BLAKE2b-256 |
a995e01f65769c002a17b90ea5ff9ff81413a37b444e9d11f20074921bd388a4
|