Skip to main content

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

Project description

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.

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

stbass-0.1.0.tar.gz (44.3 kB view details)

Uploaded Source

Built Distribution

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

stbass-0.1.0-py3-none-any.whl (21.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stbass-0.1.0.tar.gz
  • Upload date:
  • Size: 44.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for stbass-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9b5df2e11340ad5bb561b1b65d26b33dd1500dc750beebe5eac6d92ddbdc404a
MD5 43c9cc7aad1b177cf377403b5f920a4a
BLAKE2b-256 3a1a4977da03a897fc1d28ae09710216ce9687f45eb1af8cb3c61f93a78a3777

See more details on using hashes here.

File details

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

File metadata

  • Download URL: stbass-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for stbass-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8b83b299289658e799619e8289197d9ff1283cf3467e29a44c40b680300a1bc7
MD5 78da0c8d0724ad081edbf4a210d6541c
BLAKE2b-256 2c4f831a29e84cfddebe559901d68615ec8224a2c290c6759451ea864b6e527f

See more details on using hashes here.

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