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.2.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file skarv-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: skarv-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.0 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6dca9a8af2f05dc8d1b968fea6a19bcd2f1cb907eb8624595e49d43e868e63e2
MD5 402d0f6b7584e25bed3df8a7b0315e41
BLAKE2b-256 9d8c9ba9198de4b3325031e9b09908d1ed191e276ffa77bb71b6d044b3dfbfec

See more details on using hashes here.

Provenance

The following attestation bundles were made for skarv-0.2.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