Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Installation

Python

Using uv (recommended):

uv pip install tiders-x402-server
import tiders_x402_server

The published Python package includes all database backends (DuckDB, PostgreSQL, ClickHouse).

Running the example:

cd examples/python
uv run duckdb_server.py

You need a virtual environment active. Use uv venv && source .venv/bin/activate

Rust

Each database backend is a separate Cargo feature. You must enable at least one:

FeatureDatabase
duckdbDuckDB
postgresqlPostgreSQL
clickhouseClickHouse

No database is included by default — this keeps compile times and binary size down when you only need one backend.

Add tiders-x402 to your Cargo.toml with the features you need:

[dependencies]
tiders-x402 = { version = "0.1.0", features = ["duckdb"] }

Or combine multiple backends:

[dependencies]
tiders-x402 = { version = "0.1.0", features = ["duckdb", "clickhouse", "postgresql"] }

Running the example:

cd examples/rust
cargo run

The Rust example (examples/rust/Cargo.toml) enables all three backends by default. Edit its features list if you only need one.

Development Setup

If you’re modifying tiders-x402-server repo locally, you probably want to build it against your local version.

Python

Build the Python binding using maturin:

cd python
maturin develop --uv   # builds the Rust extension and installs it into the active venv

Rust

Build the example with the local server:

cargo build --config 'patch.crates-io.tiders-x402="../../server"'

Persistent local development

For persistent local development, you can put this in examples/rust/Cargo.toml:

[patch.crates-io]
tiders-x402 = { path = "../../server" }

This avoids passing --config on every build command.