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.4.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.4-cp313-cp313-win_amd64.whl (864.7 kB view details)

Uploaded CPython 3.13Windows x86-64

disco_data_logger-0.1.4-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.4-cp313-cp313-macosx_11_0_arm64.whl (762.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

disco_data_logger-0.1.4-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.4-cp312-cp312-win_amd64.whl (864.8 kB view details)

Uploaded CPython 3.12Windows x86-64

disco_data_logger-0.1.4-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.4-cp312-cp312-macosx_11_0_arm64.whl (762.7 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

disco_data_logger-0.1.4-cp312-cp312-macosx_10_13_x86_64.whl (966.0 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

disco_data_logger-0.1.4-cp311-cp311-win_amd64.whl (862.8 kB view details)

Uploaded CPython 3.11Windows x86-64

disco_data_logger-0.1.4-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.4-cp311-cp311-macosx_11_0_arm64.whl (761.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

disco_data_logger-0.1.4-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.4.tar.gz.

File metadata

  • Download URL: disco_data_logger-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 2e2c3604d3a9a46729a72a579006cdfa84cf3b98b4857df4bdf156a230d6f427
MD5 008e11d56f279cd16142757db2a33be8
BLAKE2b-256 26579304d99daee465d861e623292bdd00152f7223d1730d167b2d1d69a6a20e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for disco_data_logger-0.1.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8f97ed491986c8c6c5afabe2d2d108d3b75511054313bf0882b6b472336388fe
MD5 f4f2869dae77e09a5e5f6d4c48798920
BLAKE2b-256 55f5291b4bbcbcbc06b03d08965970cc392c942cb43c88782d4774160cf506b8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for disco_data_logger-0.1.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 aa78ad5b3d8260c1ccc90401890c3c513007316e3dd5c646e18243580f729962
MD5 949ee9226b50b4b2aebeed70b6259d6c
BLAKE2b-256 62bd263e66dfbd23f25a6cf537f5c9c8b1ea3e3fc33ef7baf9de54772a00b59e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for disco_data_logger-0.1.4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7a99c52c687962f9f229bda433514f00b6e8a3cfe184958b6fb40f0bbc741947
MD5 3997d5d86281ce093df16b8295abca13
BLAKE2b-256 e02467a125ed2c88e84f8a1191eb2e9c1e51db2c35d9d70d10ed060c88bf028a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for disco_data_logger-0.1.4-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 2577680bdba8394a190fb3b90bd81ec9479b1547a1f922ca95bf6c274f7e48b4
MD5 715ae4ace63ddd78f2810faffb4466f6
BLAKE2b-256 7da8853c55f8c11c9c69aa5eb73a3f46863b2408fd7d8bf975a5dfeac796db4d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for disco_data_logger-0.1.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 6630a478b5f36c909120d81752d89a7f2ae44ed9d344d24106a280f4e4488200
MD5 31ad03c6779341e97a2b66dac820593b
BLAKE2b-256 cea94b1ba8658688b6e213d871e5825002fbb5ac8e99359bc6041f7a4e111466

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for disco_data_logger-0.1.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 af85d76bb6112a1e0b1d61d22e6f08a6792ec3ad8c470f5a2bcb9118d4faf33c
MD5 35f0ec888096391338d7349a563eadc7
BLAKE2b-256 38eb3546e69d83ea30f3f928fa0b698388a47c2f2b51eef92004d89eff17722a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for disco_data_logger-0.1.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 402b2928bc05d40c886d1e77f9142fb7711046634e8c44b8c4e48e39ccdaa18a
MD5 abcb27b0f19820464a2b80cdb367f847
BLAKE2b-256 07512fa0e16b730aaefc67472522d900416167df81ae91fc6c36bd53c19d0dd9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for disco_data_logger-0.1.4-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 1160074303defb9a3f5192ed247b4b40750c07a8477b92733864bee70ded331c
MD5 0454f5faa80268d9af6d01587ee56ea5
BLAKE2b-256 d63f5c8e5127594607690c643ed7e88d2fa3b18d0aa21c2e34b153a4a3ad5a32

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for disco_data_logger-0.1.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c2fea3196fe18e8764157808088de26d86ceb320c9b18642a11f0b131fb4158d
MD5 4807a4f441afee8ea87119343b745abe
BLAKE2b-256 233d2b9c582df9704e667734b137b8a6bda55e2e6fd94c190c0a601b92ad4192

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for disco_data_logger-0.1.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ea8a61c342a530e80ce4ee7cde5b9511b6c4563a297972893e0db01a6effa09a
MD5 801ac48b9678f7bbe74ed7e6538a0cbb
BLAKE2b-256 3bc4b89823c98ecf8fa90a663bb15436ae6a59be89438259831a14bdc0492b8d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for disco_data_logger-0.1.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b27a3f0d03963da6a336a947220b1751e2265349747e178db7ee5e47f2c4ef01
MD5 19a47503ffd88b3777a277fe86da2404
BLAKE2b-256 c5d55b18c679fb91c8ccec73c454bc941bc1d53fb1e78efea152d7452393d9cc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for disco_data_logger-0.1.4-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ec4f4e446802a129bbe9494030a444f2196a4df58c1fa77fbb35362f8ac4bf28
MD5 aaad066b426dd84164bf4890c4937838
BLAKE2b-256 f1d6565e9a74fbf13381f1019b8c3a5a009416e0b20c129da11a3243cc604cf9

See more details on using hashes here.

Provenance

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