Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

skarv-0.1.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

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

Hashes for skarv-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f1429630d08962aacba8e0463e77da0039063f5df0b7adca8fa57762b7545e0d
MD5 a0feafe49cc5bc05f0e7f47d9e06d974
BLAKE2b-256 5325f095e0b86438e1fc1066d78c5d76d5a9e295db20d9b8c67d29538d383e8d

See more details on using hashes here.

Provenance

The following attestation bundles were made for skarv-0.1.0-py3-none-any.whl:

Publisher: release.yml on freol35241/skarv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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