A single process, in-memory message queue written in python.
Project description
skarv
skarv is a Swedish noun that refers to the point where two things are joined together. Translations to English includes joint, splice, connection and similar words. Interestingly, it is also the swedish word for cormorant (the bird).
What?
A simple, synchronous, thread-safe, single process, in-memory message "broker" written in python.
Why?
Because I wanted the most simplistic API (subjectively) I could possibly think of for processing real-time data from multiple sources to multiple sinks via any intermediate processing setup.
How ?
By re-using the concept of Key Expressions from Zenoh and utilizing in-memory storage for a very simplistic implementation of a message "broker" that supports the following operations:
- Putting data to the broker
- Subscribing to data from the broker
- Getting the latest data from the broker
Usage
import skarv
@skarv.subscribe("any/**")
def _(sample: skarv.Sample):
print(sample.key_expr)
print(sample.value)
skarv.put("any/thing", 42)
samples = skarv.get("any/**")
print(samples)
Installation
pip install skarv
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 Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file skarv-0.1.0-py3-none-any.whl.
File metadata
- Download URL: skarv-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1429630d08962aacba8e0463e77da0039063f5df0b7adca8fa57762b7545e0d
|
|
| MD5 |
a0feafe49cc5bc05f0e7f47d9e06d974
|
|
| BLAKE2b-256 |
5325f095e0b86438e1fc1066d78c5d76d5a9e295db20d9b8c67d29538d383e8d
|
Provenance
The following attestation bundles were made for skarv-0.1.0-py3-none-any.whl:
Publisher:
release.yml on freol35241/skarv
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
skarv-0.1.0-py3-none-any.whl -
Subject digest:
f1429630d08962aacba8e0463e77da0039063f5df0b7adca8fa57762b7545e0d - Sigstore transparency entry: 230074014
- Sigstore integration time:
-
Permalink:
freol35241/skarv@36683c5edf21b07a4efdebb68e719bc31a614877 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/freol35241
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@36683c5edf21b07a4efdebb68e719bc31a614877 -
Trigger Event:
release
-
Statement type: