Skip to main content

Focused emitter library for process-bigraph composites — SQLite, Parquet, and beyond

Project description

pbg-emitters

Focused emitter library for process-bigraph composites. Hosts the heavy-dependency emitters out-of-tree so the process-bigraph core stays lean.

The zero-dependency built-ins — RAMEmitter, ConsoleEmitter, JSONEmitter — continue to live in process_bigraph.emitter. This package adds:

Emitter Extra What it does
SQLiteEmitter [sqlite] One row per tick into a single .db file (stdlib).
ParquetEmitter [parquet] Hive-partitioned Parquet dataset, batched writes.

Install

pip install 'pbg-emitters[sqlite]'        # SQLiteEmitter only
pip install 'pbg-emitters[parquet]'       # ParquetEmitter only
pip install 'pbg-emitters[sqlite,parquet]'  # both

The [sqlite] extra is empty (Python's stdlib sqlite3 is enough); it exists for symmetry. The [parquet] extra pulls in duckdb, polars, pyarrow, fsspec, and tqdm.

Usage

from pbg_emitters import SQLiteEmitter, ParquetEmitter

# Wire either as a step inside a process-bigraph Composite, e.g. via the
# usual emitter_from_wires helper:
#
#   from process_bigraph.emitter import emitter_from_wires
#   spec = emitter_from_wires(wires, address='local:SQLiteEmitter')

Reader helpers for the Parquet datasets (create_duckdb_conn, read_stacked_columns, named_idx, ndidx_to_duckdb_expr, ...) are also re-exported from the top-level package.

Tests

pip install -e '.[parquet,dev]'
pytest

License

MIT. See LICENSE.

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

pbg_emitters-0.1.0.tar.gz (83.9 kB view details)

Uploaded Source

Built Distribution

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

pbg_emitters-0.1.0-py3-none-any.whl (76.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pbg_emitters-0.1.0.tar.gz
  • Upload date:
  • Size: 83.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pbg_emitters-0.1.0.tar.gz
Algorithm Hash digest
SHA256 66467794014e18164e86670bdcfa2d3f1a623da16edf04965705181cf2f2e320
MD5 2b5c725364baf38139d07b9757d78077
BLAKE2b-256 0c1c1063f6960ff3e8370f80377435fb8cbdaf3c6d3839982318a68235f2091c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pbg_emitters-0.1.0.tar.gz:

Publisher: release.yml on vivarium-collective/pbg-emitters

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

File details

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

File metadata

  • Download URL: pbg_emitters-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 76.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pbg_emitters-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bf715f3c14a12ef2e1d3d22655b5a89e9f28da2e800bd776cec45f13bf24ddaf
MD5 333ea5f82145034db3c206b84df3f213
BLAKE2b-256 c370ed636028647867cf7734c997ff253f51cbd6eb7bdcd0fbdd0c5d0386f2d4

See more details on using hashes here.

Provenance

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

Publisher: release.yml on vivarium-collective/pbg-emitters

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