Installation
Requirements
Python 3.10+ (including Python 3.13 and 3.14)
Rust 1.70+ (for building from source)
Installing from PyPI
The easiest way to install rapsqlite is using pip:
pip install rapsqlite
Building from Source
To build rapsqlite from source, you’ll need Rust installed:
Install Rust (if not already installed):
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Install maturin (Python-Rust build tool):
pip install maturin
Clone the repository:
git clone https://github.com/eddiethedean/rapsqlite.git cd rapsqlite
Build and install in development mode:
maturin developOr install in production mode:
maturin build pip install target/wheels/rapsqlite-*.whl
Platform-Specific Notes
macOS: Works on both Intel and Apple Silicon (arm64).
Linux: Works on x86_64 and aarch64 architectures.
Windows: Supported on x86_64 and aarch64.
Verifying Installation
After installation, verify that rapsqlite is working:
import asyncio
from rapsqlite import connect
async def test():
async with connect(":memory:") as conn:
await conn.execute("CREATE TABLE test (id INTEGER)")
await conn.execute("INSERT INTO test VALUES (1)")
rows = await conn.fetch_all("SELECT * FROM test")
print(rows)
asyncio.run(test())
Output:
[[1]]
If this runs without errors, rapsqlite is installed correctly!