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.0.tar.gz (93.1 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.0-py3-none-any.whl (82.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pbg_emitters-0.2.0.tar.gz
  • Upload date:
  • Size: 93.1 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.0.tar.gz
Algorithm Hash digest
SHA256 4ddf03b04480e120ae933d5c73122969116412702c87fd95a2bbf06eaa4d4fd4
MD5 265dae8e0e19ede08607aa9de6929333
BLAKE2b-256 80b5176600e587a147fd0c3f18168b3fc1f2203282cafd509372a731b5b9bf1f

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pbg_emitters-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 82.7 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a750b61dd017ecf6c6dd36919897f825291a036cdc9b566d06835b0d8cd8a885
MD5 4d82f9db74686575defe41df427c5af7
BLAKE2b-256 9d4f0720bdbdb63d25bc5e8c9b8780f5e534d0ae13f994201b435d0d053d4270

See more details on using hashes here.

Provenance

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