Skip to main content

Stateful rpc for Python

Project description

A stored event queue solution for building event based systems easily. Fountainhead will essentially do two things store events sequentially by topic and notify any subscriber in real time. This is meant to be used as the unique source of truth feeding data to arbitrary number of dependant systems (database, datalake, monitoring dashboard, data cube, etc...) in highly reliable way.

One can easily subscribe to those topics to process events starting from any point in time and receive new events from then onward. This allows any subscriber to catch up from where it previously stopped. It is safe by desgin thanks to its append only nature (think Git), although can still rewrite the past if need be.

How to use it

One can save events as follows.

with create_sync_client(server_host, server_port, name="producer") as client:
        topic = "uploads/client_1"
        payload = {"value": 1}
        time_stamp = client.write_event(topic, payload)

This will save the payload under uploads/client_1 topic. Events can be read starting from any point in time.

with create_sync_client(server_host, server_port, name="consumer") as client:
    with client.read_events("uploads/client_1") as events:
        for time_stamp, value in events:
            print(time_stamp, value)

This will display all the events saved under uploads/client_1 topic from the beginning then will return newly saved ones. You can specify the beginning and the end of the iteration using start and end arguments.

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

rmy-0.1.0.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

rmy-0.1.0-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

Details for the file rmy-0.1.0.tar.gz.

File metadata

  • Download URL: rmy-0.1.0.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.2 Darwin/22.4.0

File hashes

Hashes for rmy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7619c2baabed8c55dcd9d13b30a13ef5febe5d68a8fbbca247efeef872dbe7b2
MD5 2ddc76e030903b55c2799710346dba3e
BLAKE2b-256 c40c44841506c0f91214ef71f0ff5c655e2b764cfa102ae8658e39f7a354b532

See more details on using hashes here.

File details

Details for the file rmy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: rmy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.2 Darwin/22.4.0

File hashes

Hashes for rmy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b11c03664e4bff4f8a7fc51c7be2ec23bd7babbf62e11210164fdcb7435167dc
MD5 d992b2b492a4f8721c3c20b3ad3b1b1f
BLAKE2b-256 5cbb59d5aa413bb1b0f80f86f66ccf6fa03df16e60cca0a0de05396e61731e9f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page