Skip to main content

Dataset preparation library with Python bindings for sliding window tensors

Project description

Rindle for Python

Rindle turns collections of per-ticker CSV files into contiguous sliding-window tensors that are ready for deep learning workflows. The Python extension wraps the C++20 data preparation engine behind a small, NumPy-friendly API so you can configure builds, materialize datasets, and recover fitted scalers directly from notebooks or training scripts.

Highlights

  • Deterministic dataset builds – declare the window geometry, scaler, and input schema with rindle.create_config and let the engine emit consistent results across runs.
  • Multi-threaded – both build_dataset and get_dataset parallelize work across tickers and windows using a C++ thread pool. An optional thread_count parameter (default 0 = auto) gives explicit control. The Python GIL is released during these calls so other threads stay responsive.
  • Manifest-driven reloads – rehydrate tensors on demand with rindle.get_dataset using the in-memory manifest returned by a build or a saved manifest.json file.
  • NumPy integration – feature (Dataset.X) and target (Dataset.Y) tensors are exposed as NumPy arrays with shape (windows, sequence_length, features) and float32 precision for direct use with frameworks such as PyTorch or TensorFlow.
  • Scaler introspection – fetch the fitted scaler for any ticker/feature pair to invert predictions or understand the normalization that was applied.

Installation

The package ships with pre-built wheels when possible and can also be compiled locally with a C++20 toolchain.

pip install rindle

Building from source requires a compiler with C++20 support, CMake 3.18+, and Python 3.9 or newer. When working from a clone of the repository:

python -m pip install --upgrade pip
python -m pip install build
python -m build
python -m pip install dist/rindle-*.whl

Quickstart

from pathlib import Path
import rindle

config = rindle.create_config(
    input_dir=Path("data/raw_prices"),
    output_dir=Path("data/processed"),
    feature_columns=["Open", "High", "Low", "Close", "Volume"],
    seq_length=64,
    future_horizon=8,
    target_column="Close",
    time_mode=rindle.TimeMode.UTC_NS,
    row_major=False,
    scaler_kind=rindle.ScalerKind.Standard,
)

manifest = rindle.build_dataset(config)  # parallelized across tickers

# Load full dataset (default)
dataset = rindle.get_dataset(manifest)  # parallelized tensor fill

# Load a random 10% sample (maintains ticker distribution)
dataset_small = rindle.get_dataset(manifest, percentage=0.1)

# Explicit thread count (0 = auto-detect)
dataset = rindle.get_dataset(manifest, thread_count=4)

X = dataset.X  # NumPy array: (windows, seq_length, n_features), dtype=float32
Y = dataset.Y  # NumPy array aligned with X when targets are enabled
meta = dataset.meta  # List of WindowMeta objects with ticker provenance
print("total windows:", dataset.n_windows())

The manifest stores the configuration, aggregate statistics, and ticker-level metadata. A copy is written to <output_dir>/manifest.json during the build so you can reload tensors later without repeating the pipeline:

from pathlib import Path

manifest_path = Path(config.output_dir) / "manifest.json"
reloaded = rindle.get_dataset(manifest_path)

Inspecting manifests and scalers

Each ManifestContent instance exposes the fields captured during the build, including feature_columns, total_windows, and ticker_stats. The helper method find_stats("AAPL") returns the TickerStats record for a ticker, and build_ticker_index() can be called if you mutate ticker_stats manually.

To invert normalized values or apply identical scaling elsewhere:

scaler = rindle.get_feature_scaler(manifest, ticker="AAPL", feature="Close")
original_value = rindle.inverse_transform_value(scaler, value=0.42)

The returned FittedScaler exposes transform and inverse_transform methods as well as a params property that includes summary statistics (mean, standard deviation, quartiles, and min/max bounds).

Data layout

  • Dataset.X and Dataset.Y are three-dimensional NumPy arrays backed by the underlying C++ tensors (float32). When row_major=False (the default), the layout is [window][time][feature] with contiguous storage, making it ideal for training recurrent and convolutional models.
  • Dataset.meta is a list of WindowMeta objects describing where each window originated. Fields include ticker, start_row, end_row, and optional target_start / target_end indices.

API reference snapshot

Function Description
rindle.create_config(...) Validate paths, choose feature columns, configure window geometry and scaling. Returns a DatasetConfig.
rindle.build_dataset(config, thread_count=0) Run discovery → scaling → windowing in parallel and return a ManifestContent.
rindle.get_dataset(manifest_or_path, percentage=1.0, thread_count=0) Load feature/target tensors in parallel. Optional percentage (0.0 < p <= 1.0) loads a random subset of windows per ticker.
rindle.get_feature_scaler(manifest_or_path, ticker, feature) Retrieve the fitted scaler for a ticker/feature pair to apply or invert scaling.
rindle.inverse_transform_value(scaler, value) Convenience helper to undo scaling with a FittedScaler.

Additional classes such as DatasetConfig, ManifestContent, Dataset, and TickerStats expose their fields as Python attributes for straightforward inspection or serialization.

Project resources

Although the core engine is implemented in C++, the Python package provides a self-contained workflow for assembling time-series datasets without leaving the Python ecosystem.

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

rindle-1.0.1.tar.gz (597.3 kB view details)

Uploaded Source

Built Distributions

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

rindle-1.0.1-cp313-cp313-win_amd64.whl (268.1 kB view details)

Uploaded CPython 3.13Windows x86-64

rindle-1.0.1-cp313-cp313-musllinux_1_2_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

rindle-1.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (514.2 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

rindle-1.0.1-cp313-cp313-macosx_11_0_arm64.whl (257.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

rindle-1.0.1-cp312-cp312-win_amd64.whl (268.0 kB view details)

Uploaded CPython 3.12Windows x86-64

rindle-1.0.1-cp312-cp312-musllinux_1_2_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

rindle-1.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (514.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

rindle-1.0.1-cp312-cp312-macosx_11_0_arm64.whl (257.7 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

rindle-1.0.1-cp311-cp311-win_amd64.whl (267.3 kB view details)

Uploaded CPython 3.11Windows x86-64

rindle-1.0.1-cp311-cp311-musllinux_1_2_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

rindle-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (515.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

rindle-1.0.1-cp311-cp311-macosx_11_0_arm64.whl (257.3 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

rindle-1.0.1-cp310-cp310-win_amd64.whl (266.6 kB view details)

Uploaded CPython 3.10Windows x86-64

rindle-1.0.1-cp310-cp310-musllinux_1_2_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

rindle-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (514.3 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

rindle-1.0.1-cp310-cp310-macosx_11_0_arm64.whl (255.7 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file rindle-1.0.1.tar.gz.

File metadata

  • Download URL: rindle-1.0.1.tar.gz
  • Upload date:
  • Size: 597.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rindle-1.0.1.tar.gz
Algorithm Hash digest
SHA256 35183b67f31898497d6bcc1899f0e8c59a477d80cffec1b6761e509deb40f49d
MD5 3ea67d7d8a37a93c177c22df8ed6cef3
BLAKE2b-256 d45756e155edfe0d12787f234c1d1579f08e66c2c9738848e410e76bc2393d59

See more details on using hashes here.

Provenance

The following attestation bundles were made for rindle-1.0.1.tar.gz:

Publisher: release.yml on EricGilerson/rindle

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

File details

Details for the file rindle-1.0.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: rindle-1.0.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 268.1 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rindle-1.0.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8676f06eda229e381e0ab9d38797656f3f644de1e92385251a79284a42874984
MD5 44fc0638c2463d08704627b93e4545f5
BLAKE2b-256 2fe7e39f4e8592e47c8a9c4e3b5a0c7a11b439b3dca7bb0def6c7b70b3d5420e

See more details on using hashes here.

Provenance

The following attestation bundles were made for rindle-1.0.1-cp313-cp313-win_amd64.whl:

Publisher: release.yml on EricGilerson/rindle

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

File details

Details for the file rindle-1.0.1-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rindle-1.0.1-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a2d74c1cd1f59ecee075ad9aeddaaa25a26f8a61803d02e414f0c80470bbb390
MD5 135c320d55bae2ed7e3d70916e62c547
BLAKE2b-256 1f6c7a11cddc7b7d08ebacfb8b4425a126c7c519413be01d2d6202daf59cdbe2

See more details on using hashes here.

Provenance

The following attestation bundles were made for rindle-1.0.1-cp313-cp313-musllinux_1_2_x86_64.whl:

Publisher: release.yml on EricGilerson/rindle

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

File details

Details for the file rindle-1.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rindle-1.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b91fe45825795002cc43f020d1384214f18cc586a48dc04556ebc169b35ed8d2
MD5 f2805d27d6a2dc30c2e7fd723d3f19f5
BLAKE2b-256 35cfb1180735c53083fbac03d6f7210f1782c02eaf96e77851fb6cabbf70e084

See more details on using hashes here.

Provenance

The following attestation bundles were made for rindle-1.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on EricGilerson/rindle

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

File details

Details for the file rindle-1.0.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rindle-1.0.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7b41011459c2a2f0df8282da9161314ec74703f72c24177f04e30287070e6f94
MD5 a2693962cf35e3741c79ccdf42c2da61
BLAKE2b-256 dd1b37088f2e84e00c5b123fa0691c1ea6db0984d1eebf3a081f418de770d3f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for rindle-1.0.1-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: release.yml on EricGilerson/rindle

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

File details

Details for the file rindle-1.0.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: rindle-1.0.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 268.0 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rindle-1.0.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 861b087f39412be2af607ae82e1bd0838833054ac44db2f69dad637dcbefcc52
MD5 8df5779d822469d386c38393b44af537
BLAKE2b-256 2e6eb2526b9c5f7bd6dea622aea01272eca29527328c47d77b35fd4defdd1eca

See more details on using hashes here.

Provenance

The following attestation bundles were made for rindle-1.0.1-cp312-cp312-win_amd64.whl:

Publisher: release.yml on EricGilerson/rindle

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

File details

Details for the file rindle-1.0.1-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rindle-1.0.1-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 85e7406f1b215e9dc1072ee76773f3e78899e720b28f273a520c6b10820969c0
MD5 9c54e4709949eb0f4be30ca20e70dcb6
BLAKE2b-256 ee92d1e1faa76c990bc0dbb685d6dd57fac34325bfd194b1c45a16d437359dcb

See more details on using hashes here.

Provenance

The following attestation bundles were made for rindle-1.0.1-cp312-cp312-musllinux_1_2_x86_64.whl:

Publisher: release.yml on EricGilerson/rindle

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

File details

Details for the file rindle-1.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rindle-1.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 27f96d3634de1ac2e4c16964907db741e3021f25a39b9c18faa3c756137395ba
MD5 48de85d6d07b75a78a1b84ddd4aa8709
BLAKE2b-256 3d07415ee6987a86a9cb0f9140da54a63ffe2443dd74bd6cdadab3cad5aa0006

See more details on using hashes here.

Provenance

The following attestation bundles were made for rindle-1.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on EricGilerson/rindle

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

File details

Details for the file rindle-1.0.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rindle-1.0.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0989237f2f02dc4fd2fc3ba76fb64d1486f017b4e4e6813f1b1391751ee1aeea
MD5 3a0e7270e2ef3335efab6eb0d41df959
BLAKE2b-256 27df40d7d0c33823d86d0b9177767867bb441d853327e9563c2f56c98f91fe98

See more details on using hashes here.

Provenance

The following attestation bundles were made for rindle-1.0.1-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: release.yml on EricGilerson/rindle

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

File details

Details for the file rindle-1.0.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: rindle-1.0.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 267.3 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rindle-1.0.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 40378d169042b3d9a9062c6f4576d7f2ec61e98d06d7a84ffa6325cb9337730a
MD5 38e5a85109461f45800771030cb25dd0
BLAKE2b-256 726163913b2df30c29956b3ac77e1bd5b9afda63e48f2de63116be2d8b993b9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for rindle-1.0.1-cp311-cp311-win_amd64.whl:

Publisher: release.yml on EricGilerson/rindle

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

File details

Details for the file rindle-1.0.1-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rindle-1.0.1-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b0ae3dce55d97be3c7a6a7cb58540fce1ea4be035b230854b59cf03c05d03fb6
MD5 e08f5381d5c3461f146ae799584a9bb2
BLAKE2b-256 3459a2c89a7ff679c672316c406c3e43244e10b24153ed6d2065e52859279fa6

See more details on using hashes here.

Provenance

The following attestation bundles were made for rindle-1.0.1-cp311-cp311-musllinux_1_2_x86_64.whl:

Publisher: release.yml on EricGilerson/rindle

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

File details

Details for the file rindle-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rindle-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0e74fcb8fc8cee1732d9274c64004b67d51fbee058aa4248a084a83b5747b79b
MD5 e3c3df4d24d8fcbe80c1ebe23dc18521
BLAKE2b-256 3313735ec082ae96104dfbff5df0c5467512fb942f69dcc6397689311c503f18

See more details on using hashes here.

Provenance

The following attestation bundles were made for rindle-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on EricGilerson/rindle

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

File details

Details for the file rindle-1.0.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rindle-1.0.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8df22a6ab4255b1a0bdf0be2118dba48f65fc6b4a069da2c527ae66c09ed9194
MD5 3ca535a3ec41f06dde30681af75d89f9
BLAKE2b-256 4c4c6147901a770a93d7aaac701dd212f945e0095336de030144b836d2d57afc

See more details on using hashes here.

Provenance

The following attestation bundles were made for rindle-1.0.1-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: release.yml on EricGilerson/rindle

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

File details

Details for the file rindle-1.0.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: rindle-1.0.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 266.6 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rindle-1.0.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6cc626ea7dea03f298c0045c76f0d2a5f0d0402a1abde37a9f53666f45f081a3
MD5 3656f75d0712060a87d0de5b2b31aa96
BLAKE2b-256 e33883eb52cd1e2fcad05991104726c234971a472d2708d84d0c727519de62c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for rindle-1.0.1-cp310-cp310-win_amd64.whl:

Publisher: release.yml on EricGilerson/rindle

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

File details

Details for the file rindle-1.0.1-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rindle-1.0.1-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d1e1108bfb42caaa282d94f807450eb74b3a594fc058669efce631166f4d078a
MD5 07b35fc4841613fd42d28a975d4b67a0
BLAKE2b-256 cecd43bb1ea4f491cf2f501ffac4be8e17ea7a98a2364f5269c8e3731e17bc66

See more details on using hashes here.

Provenance

The following attestation bundles were made for rindle-1.0.1-cp310-cp310-musllinux_1_2_x86_64.whl:

Publisher: release.yml on EricGilerson/rindle

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

File details

Details for the file rindle-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rindle-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 af4a299f887201862d9daa642a5360315d346ad856a00e791a9f02f736d991e9
MD5 5a71438e0b4271fe9f5c9989ed304973
BLAKE2b-256 121cdcc560468d1ba78a69dbe0e7a1a7d18f14747005c59bf448c0c7012aa1b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for rindle-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on EricGilerson/rindle

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

File details

Details for the file rindle-1.0.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rindle-1.0.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 974086cef32582da8a0ee56dc2dfee5f4e5bd179f4fa90c4537920f8e993bcd6
MD5 b6746ded19687db520f062289fbee9b9
BLAKE2b-256 3b3656dfc23678d77ddfb7254c46980d64697da2fa2608ef25c9bfe83369c31a

See more details on using hashes here.

Provenance

The following attestation bundles were made for rindle-1.0.1-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: release.yml on EricGilerson/rindle

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