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.2

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.2
File Size Uploaded
wickra_timemachine-0.1.2.tar.gz 48.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for wickra-timemachine 0.1.2
File
wickra_timemachine-0.1.2-cp39-abi3-win_arm64.whl CPython 3.9 abi3 Windows ARM64 Details
wickra_timemachine-0.1.2-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
wickra_timemachine-0.1.2-cp39-abi3-musllinux_1_2_x86_64.whl CPython 3.9 abi3 Linux musl 1.2+ x86-64 Details
wickra_timemachine-0.1.2-cp39-abi3-musllinux_1_2_aarch64.whl CPython 3.9 abi3 Linux musl 1.2+ ARM64 Details
wickra_timemachine-0.1.2-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.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details
wickra_timemachine-0.1.2-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
wickra_timemachine-0.1.2-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.2.tar.gz

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

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

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

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

Download URL wickra_timemachine-0.1.2-cp39-abi3-win_amd64.whl
Size 663.5 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
355eeadbe8e66102ea4ebfca64dd2482290f1126da0a40d281a6592829d4cefd
BLAKE2b-256 checksum
How to use checksums
7ced4d1d5b552ff61444b6099f3b5e2c4ed56e55b5baa1764c1729d4f91066cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

Download URL wickra_timemachine-0.1.2-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
358bed04958442d66922e4e2a480a9a743c5a2f7762d0edeff3312f6684b90ce
BLAKE2b-256 checksum
How to use checksums
b5910e6c5a24d669bf3bc585acee13e6df3ab9012ffd53bea046361735bd4f8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

Download URL wickra_timemachine-0.1.2-cp39-abi3-musllinux_1_2_aarch64.whl
Size 897.6 kB
Tags CPython 3.9 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
6975f80850f409e3196b7600c393db6cc05bc5dfdfee1bf4cf45f5f72809752d
BLAKE2b-256 checksum
How to use checksums
fefadb14f86a3a66408d6ad283b8857d3f060181d9a5f35eb4e7506135c57cda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

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

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

Download URL wickra_timemachine-0.1.2-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
4708c2e36afb6c2bdfbfa969df2e1caf40f0fdf79e2f94dd4d2d5eddc2532415
BLAKE2b-256 checksum
How to use checksums
c3884cc5fe8785d01eef12be5f76ad96c534f6017e5669877aa77d10ff343aee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

Download URL wickra_timemachine-0.1.2-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
f280fb1d0c4a24aa3992142e5b85e608535f3bc2a684d2718abb672757f0c3b6
BLAKE2b-256 checksum
How to use checksums
bbe806147fc98d3c4d9fed943015f20a28fe63ffe1939db1431b1f20a29a5b3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

Download URL wickra_timemachine-0.1.2-cp39-abi3-macosx_10_12_x86_64.whl
Size 749.7 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
5421cfbb4484d1cbbc6cb6714c63478d3560565cbd509d550d0fe4845fb6c66e
BLAKE2b-256 checksum
How to use checksums
bacba1eefae7fd5fdc0b411a9b622b72861e9133f239973ba5d87c3884f1fe59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release history Release notifications | RSS feed

0.1.4

9 release files

0.1.3

9 release files

This release

0.1.2 This release

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