1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
//! Python SDK scaffold — PyO3 bindings for AnamDB.
//!
//! This module provides the `pyanamdb` Python package that wraps the native
//! Rust client for zero-overhead Python integration.
//!
//! ## Usage (Python)
//! ```python
//! import pyanamdb
//!
//! client = pyanamdb.connect("localhost:8080")
//! result = client.query("SELECT * FROM txns WHERE fraud_prob > 0.9")
//! print(result.to_pandas())
//! ```
//!
//! ## Build
//! ```bash
//! cd crates/anamdb && maturin develop --features python
//! ```
/// Python module definition (compiled only with the `python` feature).
///
/// When PyO3 + maturin are enabled, this exposes:
/// - `pyanamdb.connect(addr)` → `PyAnamClient`
/// - `PyAnamClient.query(sql)` → `PyQueryResult`
/// - `PyAnamClient.register_table(name, path)`
/// - `PyAnamClient.register_rule(name, datalog)`
/// - `PyAnamClient.health()` → dict
/// - `PyQueryResult.to_arrow()` → PyArrow Table
/// - `PyQueryResult.to_pandas()` → Pandas DataFrame
///
/// The implementation wraps `crate::client::AnamClient` using `pyo3-asyncio`
/// for async bridging.
///
/// Marker struct for the Python SDK API surface.
///
/// The actual PyO3 implementation requires the `pyo3` and `pyo3-asyncio`
/// crates. This struct documents the intended API without adding the
/// compile-time dependency.
/// The Python query result wrapper.