Skip to main content

Wickra Time Machine — scrub the whole crypto market like a video

CI codecov PyPI License: MIT OR Apache-2.0

Wickra Time Machine — Python


Part of the Wickra ecosystem: — for Python. pip install wickra-timemachine — prebuilt wheels for Linux, macOS and Windows, nothing to compile.

Python bindings for the Wickra Time Machine, built with PyO3 and maturin. A TimeMachine handle is driven over a JSON boundary, so seeking a recorded feed to a timestamp yields the byte-identical snapshot as every other Wickra Time Machine binding.

Install

pip install wickra-timemachine

Pre-built wheels ship for Linux, macOS and Windows — there is nothing to compile and no C library to track down.

Quick start

import json
from wickra_timemachine import TimeMachine

feed = "\n".join(json.dumps(line) for line in [
    {"ts": 10, "symbol": "BTC-USDT", "feed": {"kind": "market", "type": "trade",
     "symbol": {"base": "BTC", "quote": "USDT"}, "price": "100", "quantity": "1",
     "aggressor": "Buy", "timestamp": 10}},
    {"ts": 20, "symbol": "BTC-USDT", "feed": {"kind": "market", "type": "trade",
     "symbol": {"base": "BTC", "quote": "USDT"}, "price": "110", "quantity": "2",
     "aggressor": "Sell", "timestamp": 20}},
])

tm = TimeMachine("{}")
tm.command(json.dumps({"cmd": "load", "data": feed}))
snapshot = json.loads(tm.command(json.dumps({"cmd": "seek", "ts": 20})))
print(snapshot["symbols"]["BTC-USDT"]["last"])  # 110.0

Surface

  • TimeMachine(spec_json) — construct a handle from a TimelineSpec JSON ("{}" uses the default spec). Raises ValueError on an invalid spec.
  • TimeMachine.command(cmd_json) — apply a command envelope ({"cmd":"...", ...}) and return the response JSON. Commands: load, seek, state_at, play, version. Raises RuntimeError on a command failure.
  • TimeMachine.version() — the library version.

Determinism

The re-fold lives only in the Rust core; this binding forwards the command string verbatim, so seeking to a given timestamp produces the byte-identical snapshot here and in every other binding — the exact cross-language golden invariant.

Benchmark

Every binding forwards to the same data-driven Rust core, so what this one adds is the call overhead of PyO3, not a different result. The core's throughput is measured by the repository's benchmark suite and the nightly bench.yml run; the numbers, the machine and how to reproduce them are in the repository BENCHMARKS.md.

Documentation

The full guide, the spec reference and the API documentation live in the main repository and the documentation site:

Wickra Time Machine ships native bindings for Python, Node.js, WASM and Rust, plus a C ABI hub that any C-capable language (C, C++, C#, Go, Java, R) links against — all forwarding to the same data-driven, unsafe-forbidden Rust core.

Security

Found a security issue? Please don't open a public issue. Report it privately via the repository's Security tab ("Report a vulnerability") or email support@wickra.org with a subject line starting [wickra security]. Full policy: https://github.com/wickra-lib/wickra-timemachine/blob/main/SECURITY.md.

Disclaimer

Wickra Time Machine is a research tool, provided "as is" without warranty of any kind. It reconstructs recorded market microstructure for analysis; nothing here is financial advice, and trading carries risk of loss.

License

Licensed under either of Apache-2.0 or MIT at your option.

Release files for wickra-timemachine 0.1.4

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

Source distribution (sdist)

Source distribution for wickra-timemachine 0.1.4
File Size Uploaded
wickra_timemachine-0.1.4.tar.gz 48.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for wickra-timemachine 0.1.4
File
wickra_timemachine-0.1.4-cp39-abi3-win_arm64.whl CPython 3.9 abi3 Windows ARM64 Details
wickra_timemachine-0.1.4-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
wickra_timemachine-0.1.4-cp39-abi3-musllinux_1_2_x86_64.whl CPython 3.9 abi3 Linux musl 1.2+ x86-64 Details
wickra_timemachine-0.1.4-cp39-abi3-musllinux_1_2_aarch64.whl CPython 3.9 abi3 Linux musl 1.2+ ARM64 Details
wickra_timemachine-0.1.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details
wickra_timemachine-0.1.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details
wickra_timemachine-0.1.4-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
wickra_timemachine-0.1.4-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 6.1 MB

Release files / wickra_timemachine-0.1.4.tar.gz

Download URL wickra_timemachine-0.1.4.tar.gz
Size 48.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6e7f8f8458e481c3d073168cd2fa87c650e0526be560e8a86a6e6448ab932f37
BLAKE2b-256 checksum
How to use checksums
9e67bfba120c0b595b40e8ed982a760117599fb436c7077ab8d5a7a5f6591d95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / wickra_timemachine-0.1.4-cp39-abi3-win_arm64.whl

Download URL wickra_timemachine-0.1.4-cp39-abi3-win_arm64.whl
Size 586.2 kB
Tags CPython 3.9 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
f01f4266b9a67c11849883a7a7f7fb6eaf0d7867725057fa9510e3ac7ffa8355
BLAKE2b-256 checksum
How to use checksums
1b23d3f79895143d98633be5125e6e332bd685db681f8838e58c6727c44c494d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / wickra_timemachine-0.1.4-cp39-abi3-win_amd64.whl

Download URL wickra_timemachine-0.1.4-cp39-abi3-win_amd64.whl
Size 663.4 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
f8110fe7572200532763bec2279ca4e41d05143c8faa3dae962db310815b769b
BLAKE2b-256 checksum
How to use checksums
04f1c683c6773bff4c47145dedef3b505a4f7dbe928d427406902d17f7bb73f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / wickra_timemachine-0.1.4-cp39-abi3-musllinux_1_2_x86_64.whl

Download URL wickra_timemachine-0.1.4-cp39-abi3-musllinux_1_2_x86_64.whl
Size 1.0 MB
Tags CPython 3.9 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
a4036af3052e985f0bf7132a7ab4f908218417b572e5a6b753d9ebca9ae159dd
BLAKE2b-256 checksum
How to use checksums
645582156aecde548ef639b6f25692863e8834f3dc5c35028bd39cba0c920b51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / wickra_timemachine-0.1.4-cp39-abi3-musllinux_1_2_aarch64.whl

Download URL wickra_timemachine-0.1.4-cp39-abi3-musllinux_1_2_aarch64.whl
Size 897.1 kB
Tags CPython 3.9 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
6c911f47b45009ff5a660d738c3cae1819e403bef6403e0d53009cb5462e5962
BLAKE2b-256 checksum
How to use checksums
5564f8201b73ac5fff0552ada0268aaec0635268ce4129b95844a58dce9aa112
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / wickra_timemachine-0.1.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL wickra_timemachine-0.1.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 794.9 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
3ee5f5be4eb206bd40e7de3d2d543ba530dd366d065f067731288084cc5c5194
BLAKE2b-256 checksum
How to use checksums
2998c1b3249a0b90bd36d0c06595032e85cf2c0e3871693140bfcad71d9d6b54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / wickra_timemachine-0.1.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL wickra_timemachine-0.1.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 719.4 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
36aa81c3c49c124dce9dc9b681db1005cabeaf684f9b04aea8b32a89238ad75b
BLAKE2b-256 checksum
How to use checksums
5d2f12e68340fb05d27e3dad71cd485e5325888d0a90eee8632b1c8d0534a96c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / wickra_timemachine-0.1.4-cp39-abi3-macosx_11_0_arm64.whl

Download URL wickra_timemachine-0.1.4-cp39-abi3-macosx_11_0_arm64.whl
Size 652.0 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
52baf36e3a53641593f483a9e6a2e2585a4cb38db5c4e51d8acc9ae4a1aa5d21
BLAKE2b-256 checksum
How to use checksums
5a0bb4afa8c5e610e131fcb20b337d4168419ada849651e96cb882ed1cf6d4f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / wickra_timemachine-0.1.4-cp39-abi3-macosx_10_12_x86_64.whl

Download URL wickra_timemachine-0.1.4-cp39-abi3-macosx_10_12_x86_64.whl
Size 749.8 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
51406b5d086ae1557efef1dd35fdb4f5ddfe9adef24ce5693396b5692401fd0d
BLAKE2b-256 checksum
How to use checksums
853bc3af4127da4dcc146bad20cef920249a76fb58badebfad0cce936d7af634
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release history Release notifications | RSS feed

This release

0.1.4 This release

9 release files

0.1.3

9 release files

0.1.2

9 release files

0.1.1

9 release files

0.1.0

9 release files

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