Skip to main content

stbass

License: MIT

Formal concurrency primitives for the agentic era. Too many bass players? Now they're in tune.

Named after Spinal Tap's infamous revolving door of bass players -- each one meeting a more absurd fate than the last. Like an uncoordinated parallel system, nobody knew who was playing bass at any given time. stbass brings order to that chaos.

Why

stbass is a process algebra library inspired by Occam-2's CSP (Communicating Sequential Processes) concurrency model. CSP, originally formalized by Tony Hoare, models concurrent systems as independent processes that communicate exclusively through typed channels -- no shared mutable state, no locks, no data races.

Occam-2 brought CSP to hardware with constructs like PAR, SEQ, ALT, and channel-based communication. stbass brings these same formally-verified concurrency primitives to Python's async ecosystem, purpose-built for orchestrating agentic workflows.

Quick Start

from stbass import PAR, SEQ, Chan, Process

# Define typed channels
input_chan = Chan[str]("input")
output_chan = Chan[str]("output")

# Compose processes with PAR and SEQ
pipeline = SEQ(
    fetch_data(input_chan),
    PAR(
        analyze(input_chan, output_chan),
        summarize(input_chan, output_chan),
    ),
    report(output_chan),
)

result = await pipeline.run()

Installation

pip install stbass

License

MIT License - see LICENSE for details.

Metadata

Release files for stbass 0.1.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 stbass 0.1.1
File Size Uploaded
stbass-0.1.1.tar.gz 44.4 kB Details

Built distribution (wheel)

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

Total release size: 66.2 kB

Release files / stbass-0.1.1.tar.gz

Download URL stbass-0.1.1.tar.gz
Size 44.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a506d543a417323601abeba5a4c4b666db52248b16ae5208f6b5437bdc4b2861
BLAKE2b-256 checksum
How to use checksums
8e3a19cb0bbe08b59f0938c38fe4fa5800c5e42c0bd36b51d6a8119ca6075b8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / stbass-0.1.1-py3-none-any.whl

Download URL stbass-0.1.1-py3-none-any.whl
Size 21.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
697b8809cc0a61259319dde237275898a6cb8e083c4c8f606c7fcf47f81a02c9
BLAKE2b-256 checksum
How to use checksums
2d44036b9efa4f94b035ba9d91845b222379d15ba44d8028d6519c3ee543c5a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

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