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

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

Built distributions (wheels)

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

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

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

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

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

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

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

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

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

Download URL wickra_timemachine-0.1.3-cp39-abi3-musllinux_1_2_aarch64.whl
Size 897.2 kB
Tags CPython 3.9 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
1de7192e3db6de0c25d41a6981c925aacb2b3c1ac4ae7a7e603292d32fc395d0
BLAKE2b-256 checksum
How to use checksums
7382e60d8b498f47fc57520d0a09bc1817a27533baf2f27876af3e9cd2f68f7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

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

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

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

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

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

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

Download URL wickra_timemachine-0.1.3-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
f2c0601b524b1179ac7040e0e7de5c6723b7bee5d35d627075fdeadba867bd60
BLAKE2b-256 checksum
How to use checksums
aac6fcd92b544450b303e6334fbc8fe845dfc08c7f39b76b57550032ebb1ca7e
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

This release

0.1.3 This release

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