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.3.tar.gz (32.2 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.3-cp313-cp313-win_amd64.whl (860.2 kB view details)

Uploaded CPython 3.13Windows x86-64

disco_data_logger-0.1.3-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.3-cp313-cp313-macosx_11_0_arm64.whl (755.5 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

disco_data_logger-0.1.3-cp313-cp313-macosx_10_13_x86_64.whl (958.7 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

disco_data_logger-0.1.3-cp312-cp312-win_amd64.whl (860.2 kB view details)

Uploaded CPython 3.12Windows x86-64

disco_data_logger-0.1.3-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.3-cp312-cp312-macosx_11_0_arm64.whl (755.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

disco_data_logger-0.1.3-cp312-cp312-macosx_10_13_x86_64.whl (958.6 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

disco_data_logger-0.1.3-cp311-cp311-win_amd64.whl (859.1 kB view details)

Uploaded CPython 3.11Windows x86-64

disco_data_logger-0.1.3-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.3-cp311-cp311-macosx_11_0_arm64.whl (754.8 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

disco_data_logger-0.1.3-cp311-cp311-macosx_10_9_x86_64.whl (954.7 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: disco_data_logger-0.1.3.tar.gz
  • Upload date:
  • Size: 32.2 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.3.tar.gz
Algorithm Hash digest
SHA256 c2b7efa32452945fa1bb93fae9db562c19c66c926f3ec441b353832e3424bc89
MD5 496a3af46b557da9968ad8b42542ab35
BLAKE2b-256 503d18f81ada8f823f8a9b33573e0497224965a7e1eb8603bf7cf8217f639d12

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.3.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.3-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b21cca8cb8c43a0c08f44e33a4d9c68a3ec1eb27e72e6d3fb59819c094e782d5
MD5 9ba62bdf486652a6506c44a86f110830
BLAKE2b-256 69fb7c22df42c04edd4c516888739429e31beffb2610274bca624ace9b791fde

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.3-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.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2440e7d702d575169f0ea963a494dab5ad219ee8fb862689a4439f3906a8e46c
MD5 a0252bcc993b04a654330f12f815e9b3
BLAKE2b-256 260afab252db14d946f9aa0ef9902d4b0fab55e34066f30ca7cc45fb1c268882

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.3-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.3-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 722f353682c853aa63ae6b5df7be00a0c8b883e80ff673fe0d67d2fde5ebbe07
MD5 4a7da0439770826e225070e8b3f0cec0
BLAKE2b-256 691a3526e1787233f27d534d5e8e7e933a4d13da74845d3d6fb743f5cf19b328

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.3-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.3-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.3-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 8e9f989778bcf2e03eb5837256b2d82a736a159d948b44fe07f3567ff3181e03
MD5 5b8612d0ae7dd423fb4650ffa2d9cc4f
BLAKE2b-256 708a521cf2ee6ee9b4d4094f8f326fc0148161ac4b2ca4ba2bc3e7f6f1701d68

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.3-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.3-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ac020db8013197e0be3cd6eafe43e3095c72f3211cc983f87089d6760685b776
MD5 4f60f3d1ac58c3b2ce5fc37aa453aac5
BLAKE2b-256 a61899e1645b9f46374321bdeb32bb92900ee4481393bb0f57966df60d85cbfe

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.3-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.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 51422cc8f20622cf5854b8eb527b67355ca7c0b0aa4fac21eacb25bf08869823
MD5 4bdada91ce45521477b96863a7efa9b3
BLAKE2b-256 ab31bccb32b02ac1e286542870e9a0a095f6291ec13559312af0ada8739599f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.3-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.3-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4fbb6aeda3057ea791fdbfdeaeb90e41b51d1b1add5bb708585c87bd1b34c29c
MD5 6e6fc7ee7f33d428c048842bb173cd86
BLAKE2b-256 cad2c4900900ac50b23a91d623a5dd518ecc235770964bd7fca48e695d664637

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.3-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.3-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.3-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 af281c5db82431607943aa02eb0e209b99ff1eb47760ca71d502ffb15ab6ae43
MD5 2ecae5fd103b3cde0d8e9ac57519bbaf
BLAKE2b-256 63968003ed4c5c3b862e4ccd29872c76a1e72b6d4b0de70fbe9dafd8ac9d7c08

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.3-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.3-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 50467992cf18c6e009b32302e8164370d3d274989c2687ab3fefd1b9254a9776
MD5 7868b94c2402d019ffe7955d83b3c21f
BLAKE2b-256 2cd4e71d9c7b8db66185ba9426ad7e713812955c0ea0ac1c42efff991304c36e

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.3-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.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ab3676af73298efe71ac6fe7e7bf354a0a39a34e79c4359cbd89a7ce25a1de58
MD5 a3f3b2c18e9fc2c5de37c1ca44ea04df
BLAKE2b-256 723f1b700c93bb0745bdca8b99adf1199e39b3e83bedc2fc5e44ef4ac4b28926

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.3-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.3-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1f2fd37e8553b9ad37445cecc70db72542e683794324b4c94d0a253831e563a4
MD5 16dee3eaead900418268053cfed16a1d
BLAKE2b-256 bbcdcba8d5986141ce85673b1fcebc5b0e209057fa9cd25e3a5eeb3e7459a548

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.3-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.3-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for disco_data_logger-0.1.3-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f5d1e3b7e7d2407e01b8c50cbe947d643365644b2f996dfc2f37cff5bcea00d4
MD5 eee1a503fa79010edd5c7297722ae54b
BLAKE2b-256 fe8ea210d586af96a896c7d0bf612fd340fdcf2de067ec547932f474ac4156d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_data_logger-0.1.3-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