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.2.1.tar.gz (94.4 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.2.1-py3-none-any.whl (83.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pbg_emitters-0.2.1.tar.gz
  • Upload date:
  • Size: 94.4 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.2.1.tar.gz
Algorithm Hash digest
SHA256 32eee4871745440044667ae2bb94f8d69d09e649503d2cb4dd27cc836dfa4fe5
MD5 88ab9d62ee2df0eccc3f97a417b03446
BLAKE2b-256 9eacc7e8a52facc4a73ca57ce918e4a4b38e1fe9205da65048160c98c06a0822

See more details on using hashes here.

Provenance

The following attestation bundles were made for pbg_emitters-0.2.1.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.2.1-py3-none-any.whl.

File metadata

  • Download URL: pbg_emitters-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 83.6 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.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fa72e0269c7278e5a9f5a01a4bc7cb502109cff1007b8258c58d48a1322cf01e
MD5 0aa82fcf16086e695c5dafd75417c6a2
BLAKE2b-256 89cb7543a7d38fe7ce30019cd0d1616bd2dc249adad02b6a360ce079b8b90800

See more details on using hashes here.

Provenance

The following attestation bundles were made for pbg_emitters-0.2.1-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