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

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.5
File Size Uploaded
wickra_timemachine-0.1.5.tar.gz 48.9 kB Details

Built distributions (wheels)

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

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

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

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

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

Download URL wickra_timemachine-0.1.5-cp39-abi3-win_amd64.whl
Size 663.7 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
497461ed9ff4c5e24fc60e95e8c6e372bb4128331c2073b89feec5a1cdc12acf
BLAKE2b-256 checksum
How to use checksums
222cdeb6d817821bca6e3733503637e2915fa0bc106c4090f508e586cd4902de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

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

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

Download URL wickra_timemachine-0.1.5-cp39-abi3-musllinux_1_2_aarch64.whl
Size 897.4 kB
Tags CPython 3.9 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
64e0f565714aeeb4f5ec897af964d8f9e589e544bb551b3e3fcd640cd876313d
BLAKE2b-256 checksum
How to use checksums
0bf151f212e2aee53fd6b32ddfd74b0808523589f2ae536fe80ed065ea2881bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

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

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

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

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

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

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

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

Release history Release notifications | RSS feed

0.2.0

9 release files

This release

0.1.5 This release

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