pilotr (Python)
Python implementation of pilotr. It simulates experimental and behavioural data from a portable JSON design specification.
This is the feature-parity twin of the R package of
the same name. The two share the design specification and the random-number generator, so the
same specification and seed produce identical data in either language, bit for bit apart from a
documented tolerance of a few units in the last place where an unrounded response family applies
exp() or log() to the linear predictor. See the
project README for the full toolkit (the no-code
app, the R package and the specification format).
Install
pip install pilotr # core engine (pure Python, dependency-free)
pip install "pilotr[power]" # + scipy, for the simulation-based power demo
pip install "pilotr[mixed]" # + scipy, statsmodels and pandas, for crossed mixed-effects power
Requires Python 3.9 or later. The generative core has no dependencies.
For development, install from a checkout of the repository instead. Clone
https://github.com/pablobernabeu/pilotr and run pip install . (or pip install ".[dev]")
from the python directory.
Quick start
A design specification is an ordinary dictionary, so the shortest example needs nothing beyond the package itself.
from pilotr import simulate
spec = {
"name": "two_group", "seed": 2024,
"units": {"subject": {"n": 64}},
"factors": [{"name": "group", "levels": ["control", "treatment"],
"contrasts": {"effect": [-0.5, 0.5]}, "between": "subject"}],
"fixed": {"intercept": 100, "coefficients": {"effect": 5}},
"response": {"family": "gaussian", "name": "score", "sigma": 10},
}
data = simulate(spec) # 64 rows
Given the same specification and seed, this reproduces the data generated by the R package to full floating-point precision.
Try it without installing
A serverless build runs entirely in your browser, with no installation required and no data uploaded. It is available as a no-code app.
Learn more
The Python documentation site walks through the quick start, the response families, power and design analysis, the specification format and the API reference. The full repository, including the R package and the no-code app, is at https://github.com/pablobernabeu/pilotr.
Citation
If pilotr contributes to published work, please cite it.
Bernabeu, P. (2026). pilotr: Simulate experimental and behavioural data from a portable design specification (R and Python package version 0.3.0). https://doi.org/10.5281/zenodo.21266313
The About page carries the same citation
with a BibTeX entry, and a short note on the developer. The repository also ships
CITATION.cff, which is what
GitHub's Cite this repository button reads.
Licence
MIT. See LICENSE.
Contributing
Issues and pull requests are welcome. The contributing guide describes the development setup and the conventions the package follows, and everyone taking part is asked to honour the Code of Conduct.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pilotr-0.3.0.tar.gz.
File metadata
- Download URL: pilotr-0.3.0.tar.gz
- Upload date:
- Size: 48.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14a16f3521b76c9b0a8210d004636f5ff1c450ad792b822e3213c89eff24f653
|
|
| MD5 |
7cd4c27641614fe0bdb07273182bc158
|
|
| BLAKE2b-256 |
e85b55684bd7f9bb403a8f574054a446ea7163919f30c955044c8e75488f82ea
|
Provenance
The following attestation bundles were made for pilotr-0.3.0.tar.gz:
Publisher:
publish.yml on pablobernabeu/pilotr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pilotr-0.3.0.tar.gz -
Subject digest:
14a16f3521b76c9b0a8210d004636f5ff1c450ad792b822e3213c89eff24f653 - Sigstore transparency entry: 2615864131
- Sigstore integration time:
-
Permalink:
pablobernabeu/pilotr@dfc1f54f0bdab61d7f0f25910509c19183c4c87b -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/pablobernabeu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@dfc1f54f0bdab61d7f0f25910509c19183c4c87b -
Trigger Event:
release
-
Statement type:
File details
Details for the file pilotr-0.3.0-py3-none-any.whl.
File metadata
- Download URL: pilotr-0.3.0-py3-none-any.whl
- Upload date:
- Size: 42.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49cec8a76c03420dade1370136cfe32e45acb98271580d9589b046d88630da14
|
|
| MD5 |
1598cd78139a356bf6f50a49d774ae86
|
|
| BLAKE2b-256 |
31976e773f64c2e4b184cd43eb8fdfc188a7c1ffc995ae7813bbacc8fd06ff68
|
Provenance
The following attestation bundles were made for pilotr-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on pablobernabeu/pilotr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pilotr-0.3.0-py3-none-any.whl -
Subject digest:
49cec8a76c03420dade1370136cfe32e45acb98271580d9589b046d88630da14 - Sigstore transparency entry: 2615864230
- Sigstore integration time:
-
Permalink:
pablobernabeu/pilotr@dfc1f54f0bdab61d7f0f25910509c19183c4c87b -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/pablobernabeu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@dfc1f54f0bdab61d7f0f25910509c19183c4c87b -
Trigger Event:
release
-
Statement type: