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.

Metadata

Release files for wickra-timemachine 0.2.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 wickra-timemachine 0.2.0
File Size Uploaded
wickra_timemachine-0.2.0.tar.gz 49.0 kB Details

Built distributions (wheels)

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

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

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

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

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

Download URL wickra_timemachine-0.2.0-cp39-abi3-win_amd64.whl
Size 660.6 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
5c11d30f60c7fa9d607ecbdbecf9c9d20c4481eadc11fe48ed1fe4182da3a0e0
BLAKE2b-256 checksum
How to use checksums
6ee29809ef904cf2f395ac5a5bdad70f207278119cec73577b7e683409690b9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

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

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

Download URL wickra_timemachine-0.2.0-cp39-abi3-musllinux_1_2_aarch64.whl
Size 888.2 kB
Tags CPython 3.9 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
5bc927e8dc4140bd05d2ec1310c0dfa886284b40f0ca9bc66620e997be6ef8f8
BLAKE2b-256 checksum
How to use checksums
170fd0421d85f53eaf9e3c60591d5edc0a08e1064ddd2b3dbca48987ffd5bb61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

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

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

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

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

Download URL wickra_timemachine-0.2.0-cp39-abi3-macosx_11_0_arm64.whl
Size 653.6 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a8eb669f93af9f8252d9790a1653202cf3923ecc709b5dc8620bf5869eaf8104
BLAKE2b-256 checksum
How to use checksums
147ab2db002a4e0bfbb44cffc2da93934c65bfbfb546b5eb6f3b600080491dab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

Download URL wickra_timemachine-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 745.0 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
393d4a0c7e2bcf7561493f2d163f4a785b089ea00d02ce13efb70b85bd7733a9
BLAKE2b-256 checksum
How to use checksums
bbfe05847c2a522bef3b536c6a78f39faafcb8036d1a050eadba9f9633bed740
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.2.0 This release

9 release files

0.1.5

9 release files

0.1.4

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