Skip to main content

Data logger for Disco simulations

Project description

🧾 disco-data-logger

High-performance, C++/NumPy-backed data logger
for Disco discrete-event and Monte Carlo simulation programs.

PyPI License: MIT Build Tests


Overview

disco-data-logger provides a fast, compressed, and lightweight data recording layer
for large-scale Disco simulations and other computational experiments.

It is optimized for capturing sparse numerical state updates and accumulators during simulation runs,
and writing them efficiently to disk as Zstandard-compressed segment files.
Each simulation entity or measurement can log its data independently through labeled streams.

It combines:

  • A C++/pybind11 core for high-throughput buffering and compression.
  • Python API for easy stream registration and control.
  • Built-in Parquet export for analysis and aggregation after runs.

✨ Features

  • Sparse vector logging powered by graphblas.Vector.
  • Fixed-point quantization for compact and deterministic encoding.
  • Buffered, lock-free write path (ring buffer + writer thread).
  • Zstandard compression (vendored, no external dependencies).
  • Segment rotation for large simulation outputs.
  • JSON metadata for each stream (organisation, model, experiment, …).
  • Periodic vector streams that emit state snapshots or accumulator sums once per period.
  • Integrated Parquet export for post-run analytics.
  • Arrow-based collector to filter finished loggers and emit RecordBatches directly.
  • MIT-licensed and designed for in-cluster (on-disk/in-memory) use.

🚀 Installation

pip install disco-data-logger

pyarrow ships with the package, so Parquet export works out of the box.


📚 Documentation

  • Collector – decode completed loggers, filter streams with label_selector, and write Arrow RecordBatch outputs efficiently.
  • Periodic vector stream logging – step-by-step guide for configuring periodicity, choosing between state and accumulator modes, and verifying the emitted sparse data.
  • ENGINEERING_SPEC.md – project history, motivation, and architectural overview.

🛠️ Development

Set up a virtual environment (for example, python -m venv .venv && source .venv/bin/activate), then install the project in editable mode with its development extras:

pip install -e '.[dev]'

[!NOTE] The tools namespace is provided by the separate disco-tools dependency. After installing it for the first time you must deactivate and reactivate your environment (e.g., deactivate followed by source .venv/bin/activate) so that pytest can discover the package properly.

Once the environment is ready, run the unit tests with:

pytest

License

This project is licensed under the Apache License, Version 2.0.

You are free to use, modify, and distribute this software, including for commercial purposes, subject to the terms of the license.

Contributions

By contributing to this project, you agree that your contributions will be licensed under the Apache License 2.0 and that you have the right to submit the work under those terms.

This project uses a Contributor License Agreement (CLA) to ensure clarity of intellectual property and patent rights.

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

disco_data_logger-0.1.5.tar.gz (32.3 kB view details)

Uploaded Source

Built Distributions

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

disco_data_logger-0.1.5-cp313-cp313-win_amd64.whl (864.8 kB view details)

Uploaded CPython 3.13Windows x86-64

disco_data_logger-0.1.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

disco_data_logger-0.1.5-cp313-cp313-macosx_11_0_arm64.whl (762.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

disco_data_logger-0.1.5-cp313-cp313-macosx_10_13_x86_64.whl (966.0 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

disco_data_logger-0.1.5-cp312-cp312-win_amd64.whl (864.7 kB view details)

Uploaded CPython 3.12Windows x86-64

disco_data_logger-0.1.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

disco_data_logger-0.1.5-cp312-cp312-macosx_11_0_arm64.whl (762.7 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

disco_data_logger-0.1.5-cp312-cp312-macosx_10_13_x86_64.whl (965.9 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

disco_data_logger-0.1.5-cp311-cp311-win_amd64.whl (862.9 kB view details)

Uploaded CPython 3.11Windows x86-64

disco_data_logger-0.1.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

disco_data_logger-0.1.5-cp311-cp311-macosx_11_0_arm64.whl (761.0 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

disco_data_logger-0.1.5-cp311-cp311-macosx_10_9_x86_64.whl (962.6 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

File details

Details for the file disco_data_logger-0.1.5.tar.gz.

File metadata

  • Download URL: disco_data_logger-0.1.5.tar.gz
  • Upload date:
  • Size: 32.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for disco_data_logger-0.1.5.tar.gz
Algorithm Hash digest
SHA256 1cad6ef51b91e47fbf4bfecd95a9eb02489222294f326b1dd63a932dfe33588b
MD5 cbde898b8cb3058307408e064c737f47
BLAKE2b-256 1f1260564e893f5cd22dae7c29c51ba0a370336489c150789580df519dc30c9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.5.tar.gz:

Publisher: release-publish.yml on michielmj/disco-data-logger

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

File details

Details for the file disco_data_logger-0.1.5-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d7d59e0e850ab082f94e21d7c1018c7c22719ac769bbcfa1c7f35c2e30ac53c6
MD5 30f2d449813f93ef44b9ff37769d6a3e
BLAKE2b-256 e49513afeb50ae9ee0ce5a2a27319867208bd4062d419f0904fba28237f78267

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.5-cp313-cp313-win_amd64.whl:

Publisher: release-publish.yml on michielmj/disco-data-logger

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

File details

Details for the file disco_data_logger-0.1.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2a043ce901e4aa628de57644cfdb2a8ab078fd01dccdfcccd35deda3fbee75d9
MD5 168c70fcdfffc45053ec97f5e15994bc
BLAKE2b-256 432e242ef6f3015f207b2cbcf31c04f534fc569103e78caeb64bb0377b91288b

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release-publish.yml on michielmj/disco-data-logger

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

File details

Details for the file disco_data_logger-0.1.5-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.5-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 223e7e5eacebb75ed05c636f1cd14763a2df04c08c6ae5c512d08672b2748e00
MD5 2c5574173b879e30ce9bf8a7e63dabab
BLAKE2b-256 44d1d06ad6f70eb30c0433d96dd57142427b7788fa276fd71d6361f5f3e80088

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.5-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: release-publish.yml on michielmj/disco-data-logger

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

File details

Details for the file disco_data_logger-0.1.5-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.5-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 94efe19aec76c91132585a9de03aa5057b7af3b151c8b400c1a0cc9e402ce6ba
MD5 05f3238f0707bd3f2d078af1264429fc
BLAKE2b-256 d6530aed9d67f856148bb37bcc3c8fb9c66fd535c3e02164409db05d2b545c33

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.5-cp313-cp313-macosx_10_13_x86_64.whl:

Publisher: release-publish.yml on michielmj/disco-data-logger

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

File details

Details for the file disco_data_logger-0.1.5-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5539861a61b4c9a01aa15e415e3c9acb70bdedd2c5cbfdd45681c9f012987561
MD5 7c7f31332b5fad33c13e16e4c60f89da
BLAKE2b-256 cda5104e9508ea441bdc249c9f9c16d22cc4a82122dc04ccb43fb6a5dcee3c17

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.5-cp312-cp312-win_amd64.whl:

Publisher: release-publish.yml on michielmj/disco-data-logger

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

File details

Details for the file disco_data_logger-0.1.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2be55cab81648140fcb6d48ff85ec650c0b76a6acec8bdedb2e0f917d88d9ec0
MD5 eb9d41a3e6c4f3aa57061c38dc0dd65a
BLAKE2b-256 4fee718a8e7afebd9863721fb9b5010464866287d3be78a854a15bfdc183a0a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release-publish.yml on michielmj/disco-data-logger

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

File details

Details for the file disco_data_logger-0.1.5-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e8f0a2fa8ab6e37c4230938e9ce7d080a23a1b8868e2cd44897c41b620714c9d
MD5 f65fc8e38f7773a08e9af1c38bac9793
BLAKE2b-256 2f9e23191a31c598d80431514c2c4c809a6b7c0a3ff955d4b8fb6b04dc9a2fcf

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.5-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: release-publish.yml on michielmj/disco-data-logger

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

File details

Details for the file disco_data_logger-0.1.5-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.5-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 09b5bcffb0ac4c3644088abcc503eceeaee2f6ff4e76a717945ef8942e176f52
MD5 0bd9ee87e2050c0a1374feecd6707396
BLAKE2b-256 b23160ba38ba8943f2a6fffc7e772378c22ad96d326f7b16adf662f2c8a01200

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.5-cp312-cp312-macosx_10_13_x86_64.whl:

Publisher: release-publish.yml on michielmj/disco-data-logger

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

File details

Details for the file disco_data_logger-0.1.5-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 40a5b68e2e591deb27909c4eb38a9407363d66e03ac0cb225af12ec0787590ac
MD5 c53c1ed1f0098223c5dc1f0fd99ddb93
BLAKE2b-256 cda872a309fb6d2467eed157ed99ccc51f773dee52b1130e899c354bdc526695

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.5-cp311-cp311-win_amd64.whl:

Publisher: release-publish.yml on michielmj/disco-data-logger

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

File details

Details for the file disco_data_logger-0.1.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d7ba2c07d31417c0f847e20e68f9e0b3084a771e47d3a07445500e2a854f6772
MD5 804c420b5626b8e470365c9c7e4f3525
BLAKE2b-256 532617263831669f8c371780803cc36f216421ab363dbf29e220e91db9190c7e

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release-publish.yml on michielmj/disco-data-logger

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

File details

Details for the file disco_data_logger-0.1.5-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a999114c2fd5b43eb0ffd8c512241e774cb58e78e7788e4e9f083bb79bd515b8
MD5 df2d90dbe52c53682f013a6cc0840498
BLAKE2b-256 55821732d45258067b6acfc8888eee80a7b0307325e3fc4d788536e02bb33bd6

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.5-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: release-publish.yml on michielmj/disco-data-logger

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

File details

Details for the file disco_data_logger-0.1.5-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.5-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2c45a4074fb7a912f427e60f00645e54486075c342386a7752dbf1f992981a7d
MD5 b7b9fd88f152f810b252538458ad7ea6
BLAKE2b-256 50574b184dfd7bb8a5c2d0327b981f557dde2af647621665fa75f3f72ce7de45

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.5-cp311-cp311-macosx_10_9_x86_64.whl:

Publisher: release-publish.yml on michielmj/disco-data-logger

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