Skip to main content

rand-engine

Synthetic data, very fast, from a declarative RandSpec — for batch and streaming, on any platform. The core is Python + NumPy; Spark is supported, never required, and Faker composes on top.

PyPI Python License Tests

Install

pip install rand-engine
pip install "rand-engine[faker]"  # optional: Faker pools

30-second example

A spec maps each column to a method and its kwargs; the seed makes it reproducible.

from rand_engine import DataGenerator

spec = {
    "user_id": {"method": "int_zfilled", "kwargs": {"length": 8}},
    "age": {"method": "integers", "kwargs": {"min": 18, "max": 80}},
    "plan": {"method": "distincts_prop", "kwargs": {"distincts": {"free": 8, "pro": 2}}},
    "signup": {"method": "dates", "kwargs": {"start": "2024-01-01", "end": "2024-12-31"}},
}

df = DataGenerator(spec, seed=42).size(1_000).get_df()
assert df.shape == (1_000, 4) and df["age"].between(18, 80).all()

When to use it

  • Test data for pipelines, with nulls and anomalies on demand.
  • Related tables whose pk and fk keys stay consistent across batches, streams and files.
  • Event streams and files for queues, lakes, databases or Spark, at NumPy speed.

Get-started starters

rand-engine list prints six starters. Five are runnable examples: rand-engine get-started <slug> writes <slug>-example.py (also python -m rand_engine get-started <slug>, with --out DIR to choose the folder).

  • test-data: a DataFrame for pipeline tests with null_rate and anomaly_rate.
  • lake: pk/fk related tables written to a Parquet lake.
  • kafka: an event stream for Kafka, JSON lines to stdout by default.
  • databricks: a Spark/Databricks notebook on native SparkGenerator.
  • faker: Faker pools sampled at NumPy speed through RandSpecs.faker_pool.

The optional agent starter writes AGENTS.md with package-use context for an existing project:

rand-engine get-started agent --out PROJECT

It begins in 0.8.0 and does not overwrite an existing PROJECT/AGENTS.md; review and merge it with the project's own instructions.

Documentation and support

Full guides and the method reference live on the docs site. Start with compatibility, migration and recovery when choosing Python or Spark, and use the rand-engine skill or the Agent context starter for an AI agent.

Contributions use CONTRIBUTING.md; questions and ordinary bugs belong in GitHub Issues. Potential vulnerabilities use the private route in SECURITY.md.

Metadata

Release files for rand-engine 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rand-engine 0.8.0
File Size Uploaded Provenance Actions
rand_engine-0.8.0.tar.gz 53.8 kB With provenance Details for rand_engine-0.8.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rand-engine 0.8.0
File Interpreter ABI Platform Actions
rand_engine-0.8.0-py3-none-any.whl Python 3 none any Details for rand_engine-0.8.0-py3-none-any.whl

Total release size: 122.6 kB

Release files / rand_engine-0.8.0.tar.gz

Download URL rand_engine-0.8.0.tar.gz
Size 53.8 kB
Tags Source
SHA-256 checksum
How to use checksums
87976f9ef68a26c693b9351f34003ffbaa15fcecb78b873eda3990c2335cfea6
BLAKE2b-256 checksum
How to use checksums
0c2657fcc8befd5e253bd7663fd82480646858338a1224b9b6d2c71cb6305d7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Release files / rand_engine-0.8.0-py3-none-any.whl

Download URL rand_engine-0.8.0-py3-none-any.whl
Size 68.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db4422a43a20605babb369ac223d526e5607f6539f5056c5d277ead22ad173ba
BLAKE2b-256 checksum
How to use checksums
aa20e06be813e7a0a8d5695322a27721489718a64c5785e4f0d5321272b34583
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Security for rand-engine 0.8.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for rand_engine-0.8.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page