Skip to main content

asyncserf

asyncserf is an async Python interface to Serf, the decentralised solution for service discovery and orchestration.

It uses anyio <https://github.com/agronholm/anyio> as its underlying async framework.

PyPI latest version badge Code coverage badge

Installation

asyncserf requires a running Serf agent. See Serf’s agent documentation for instructions.

To install asyncserf, run the following command:

$ pip install asyncserf

or alternatively (you really should be using pip though):

$ easy_install asyncserf

or from source:

$ python setup.py install

Getting Started

These examples require a running async loop. Trio <https://github.com/python-trio/trio> is recommended, though asyncio works too.

Sending a message is easy:

from asyncserf import serf_client

async with serf_client() as client:
    await client.event('foo', b'bar')

So is receiving:

.. code-block:: python

from asyncserf import serf_client

async with serf_client() as client:
async with client.stream(‘foo’) as stream:
async for resp in stream:

print(resp.payload)

Development

You can run the tests using the following commands:

$ serf agent --tag foo=bar & # start serf agent
$ python3 -mpytest tests

Metadata

Release files for asyncserf 0.21.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asyncserf 0.21.1
File Size Uploaded Provenance Actions
asyncserf-0.21.1.tar.gz 32.5 kB Without provenance Details for asyncserf-0.21.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for asyncserf 0.21.1
File Interpreter ABI Platform Actions
asyncserf-0.21.1-py3-none-any.whl Python 3 none any Details for asyncserf-0.21.1-py3-none-any.whl

Total release size: 48.6 kB

Release files / asyncserf-0.21.1.tar.gz

Download URL asyncserf-0.21.1.tar.gz
Size 32.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2f9144ded79ca73f63cfe20a5df370f903ef9c2472e8c267711ae4fb25479b38
BLAKE2b-256 checksum
How to use checksums
b1cb00b39bbe11de3af13e110475a64b72149fdabc6b057ffa0edb69133d8127
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.8.2 requests/2.25.1 setuptools/65.5.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.10.9

Release files / asyncserf-0.21.1-py3-none-any.whl

Download URL asyncserf-0.21.1-py3-none-any.whl
Size 16.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b18de8e1e04f472d6a159aa7e05a1a72ba8434d192290a4fc5da532437575c1
BLAKE2b-256 checksum
How to use checksums
66a5afdf5d3be8ccabea2a257e7a77f69aa441d6226ac4091de2b3339ea521ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.8.2 requests/2.25.1 setuptools/65.5.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.10.9

Security for asyncserf 0.21.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page