Skip to main content

Common tools for disco simulation engine.

Project description

🧾 disco-tools

Common tools for disco simulation engine.

PyPI License: Apache-2.0 Build Tests


🧭 Overview

disco-tools is a collection of reusable Python utilities supporting simulation, analytics, and data-driven decision systems.
It provides modular building blocks for working with metadata, scheduling, simulation orchestration, and system integration.

Each tool is designed to be:

  • Lightweight — minimal dependencies
  • Composable — works as a standalone library or inside larger systems
  • Fast — optimized for high-throughput, data-heavy environments

Documentation for individual modules is available in the docs/ folder.


✨ Features

  • ⚙️ Label Selector — Fast rule engine for qualifying and filtering metadata.
    Read documentation ›

  • ⚙️ Multi-Process Logging — Safe, queue-based logging across worker processes using Python's QueueHandler + QueueListener.
    Read documentation ›

  • 🪤 errsnap — Capture full post-mortem exception snapshots — including arbitrary runtime state — to a self-contained .errsnap file for offline inspection.
    Read documentation ›


🚀 Installation

pip install disco-tools

🧰 Development Setup

Clone and install in editable mode:

git clone https://github.com/michielmj/disco-tools.git
cd disco-tools
pip install -e .[dev]

Run all tests:

pytest -q

📚 Documentation

  • Label Selector — fast, composable rule engine for key–value metadata
  • Multi-Process Logging — process-safe logging via queue-based architecture
  • errsnap — post-mortem exception snapshots with state capture

Additional module docs will be added under the docs/ directory as the toolkit evolves.


🧪 Example Usage

from disco_tools.label_selector import Label, qualifies

rule = (Label("env") == "prod") + Label("version").gte(10)
meta = {"env": "prod", "version": 12}

if qualifies(meta, rule):
    print("Match!")

🧾 License

Apache 2.0 License © 2025 — part of the disco-tools project.

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_tools-0.1.8.tar.gz (45.7 kB view details)

Uploaded Source

Built Distribution

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

disco_tools-0.1.8-py3-none-any.whl (24.9 kB view details)

Uploaded Python 3

File details

Details for the file disco_tools-0.1.8.tar.gz.

File metadata

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

File hashes

Hashes for disco_tools-0.1.8.tar.gz
Algorithm Hash digest
SHA256 4eea63e259c03b15ca02d6e61a34aa438469cca4a3980707de11a0ef62c1b154
MD5 f47a33396e447f8c44979e7986bbb8c2
BLAKE2b-256 a4e9f82c2d6aa79d498e0be580405a50ab25d2ba04d217d9998a8ae775b35b12

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_tools-0.1.8.tar.gz:

Publisher: release-publish.yml on michielmj/disco-tools

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_tools-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: disco_tools-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 24.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for disco_tools-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 ac13f0df1e8fdf6f4a8c5f1a1f90971c1a51b3d8ec68d30e1c7a5a36756ecae2
MD5 c16b2f1115e91e4de58c3b600279497a
BLAKE2b-256 f65fecf27a9b7a0031c5842d5837a50a4a769c85e1595787613ac571348deba7

See more details on using hashes here.

Provenance

The following attestation bundles were made for disco_tools-0.1.8-py3-none-any.whl:

Publisher: release-publish.yml on michielmj/disco-tools

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