Python client for the Serf orchestration tool
Project description
AioSerf is an async Python interface to Serf, the decentralised solution for service discovery and orchestration.
It uses anyio <https://github.com/agronholm/anyio>, thus should work with asyncio, trio, and curio. Hopefully.
Installation
aioserf requires a running Serf agent. See Serf’s agent documentation for instructions.
To install aioserf, run the following command:
$ pip install aioserf
or alternatively (you really should be using pip though):
$ easy_install aioserf
or from source:
$ python setup.py install
Getting Started
from aioserf import serf_client
async with serf_client() as client:
await client.event('foo', 'bar')
Stream usage:
from aioserf import serf_client
async with serf_client() as client:
async for response in client.stream('*'):
print(response)
Development
aioserf requires a running Serf agent. See Serf’s agent documentation for instructions.
You can run the tests using the following commands:
$ serf agent --tag foo=bar & # start serf agent
$ python3 -mpytest tests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aioserf-0.1.0.tar.gz
(13.3 kB
view hashes)