ApexBase is a high-performance embedded HTAP database with a Rust core and a Python-first API.
Install it, choose persistent .apex files or a true process-local in-memory database, run analytical SQL, import/export DataFrames, and optionally expose persistent data through PostgreSQL Wire or Arrow Flight. No separate database service is required.
Why ApexBase
| What you need | What ApexBase gives you |
|---|---|
| Fast local analytics | Columnar storage, shared scan/selection operators, vectorized execution, SQL aggregations, joins, CTEs, windows, and indexes |
| Low-friction Python workflows | ApexClient, apexbase.execute, Pandas / Polars / PyArrow conversion, file table functions, and local or in-memory storage |
| One engine for mixed workloads | HTAP design: fast writes, point lookups, analytical scans, transactions, and MVCC |
| Search built in | Full-text search, vector TopK, Float16/BFloat16/Int8/UInt8/1Bit/TurboQuant storage, and exact reranking from a retained source vector |
| Tool compatibility | PostgreSQL Wire for database clients and Arrow Flight for fast columnar transfer |
Install
pip install apexbase
Build from source:
python -m pip install maturin
maturin develop --release
30-Second Example: FTS + SQL + Vector Search In One Local File
from apexbase import ApexClient
with ApexClient("./rag-data") as client:
client.execute("""
CREATE TABLE articles (
title TEXT,
body TEXT,
category TEXT,
views INT,
embedding FLOAT16_VECTOR
)
""")
client.use_table("articles")
client.store([
{
"title": "Rust-powered local analytics",
"body": "A columnar embedded database for fast SQL and search.",
"category": "database",
"views": 4200,
"embedding": [0.10, 0.82, 0.20],
},
{
"title": "Hybrid retrieval for RAG",
"body": "Combine full-text recall, SQL filters, and semantic vector ranking.",
"category": "ai",
"views": 6100,
"embedding": [0.16, 0.74, 0.58],
},
{
"title": "SQLite migration notes",
"body": "Move local applications to an analytical embedded store.",
"category": "database",
"views": 2600,
"embedding": [0.80, 0.12, 0.10],
},
])
client.execute("CREATE FTS INDEX ON articles(title, body)")
# FTS recall + structured SQL guardrails + pgvector-style semantic rerank.
df = client.execute("""
SELECT
title,
category,
views,
cosine_distance(embedding, [0.12, 0.78, 0.25]) AS semantic_dist
FROM articles
WHERE MATCH('database')
AND category = 'database'
AND views > 3000
ORDER BY semantic_dist
LIMIT 5
""").to_pandas()
print(df)
ApexBase gives you pgvector-style semantic search, SQL filters, and full-text search in the same embedded database file. It is the kind of stack you would otherwise assemble from SQLite/DuckDB + FTS + pgvector, but without a server process or a separate search/vector service; results still convert directly to Pandas, Polars, or Arrow.
For scratch work, tests, and short-lived analytics, use the same API without creating database, catalog, WAL, delta, or index files:
from apexbase import ApexClient
with ApexClient(":memory:") as client:
client.execute("CREATE TABLE metrics (name TEXT, value DOUBLE)")
client.execute("INSERT INTO metrics VALUES ('latency_ms', 2.4)")
print(client.execute("SELECT AVG(value) AS average FROM metrics").scalar())
For the smallest SQL-only scripts, apexbase.execute(...) uses one lazily
created process-local in-memory connection shared by later module-level calls.
Performance At A Glance
The latest retained complete public snapshot uses 1,000,000 tabular rows and 1,000,000 vectors x 128 dimensions on Apple arm64 with Python 3.12.
| Area | Snapshot |
|---|---|
| Public coverage | 102 tabular metrics, 6 exact-vector metrics, and 8 ApexBase quantized-vector precision rows |
| Comparable results | ApexBase wins 111 / 114 rows with a direct competitor in the retained complete snapshot |
| Exact vector search | All 6 single/batch Float32 TopK rows beat the compared engines and match brute-force exact top-k row sets |
| Reproducibility | Fixed data sizes, 2 warmups, 5 timed iterations, dependency metadata, and a retained JSON report |
Benchmarks are workload-sensitive. The default benchmark command tracks this public scoreboard; extended diagnostics live in benchmarks/bench_vs_sqlite_duckdb_extended.py. See the full reproducible setup in the Performance documentation.
Starting with 1.33, filtered grouped queries can use a shared physical scan
protocol across persisted base data and delta/overlay state. The protocol
keeps predicate selection, grouping, HAVING, and ordered TopK as composable
operators with a generic fallback for unsupported or inexact predicate forms.
See Scan & Physical Execution.
Documentation
Start here: https://birchkwok.github.io/apexbase/
| Goal | Page |
|---|---|
| Get running quickly | Installation and Quick Start |
| Understand the model | Core Concepts |
| Use the Python API | Python Client Guide and API Reference |
| Write SQL | SQL Guide |
| Import files and DataFrames | Data Import |
| Use database tools or Arrow clients | Server Protocols |
| Search text or vectors | Full-Text Search, Float16 Vectors, and Vector Quantization |
| Embed from Rust | Rust Embedded API |
Interfaces
# Embedded Python
python -c "from apexbase import ApexClient; print(ApexClient)"
# PostgreSQL Wire + Arrow Flight together
apexbase-serve --dir ./data
# Individual protocol servers
apexbase-server --dir ./data --port 5432
apexbase-flight --dir ./data --port 50051
Lance Interop
from apexbase import ApexClient
with ApexClient("./data") as client:
client.use_table("articles")
client.to_lance("./articles.lance")
with ApexClient("./imported") as client:
client.from_lance("./articles.lance", table_name="articles")
Lance conversion uses Arrow tables as the handoff path. This keeps the in-process conversion lean and Arrow-native, while each format still writes its own on-disk layout.
License
Apache-2.0
Metadata
Release files for apexbase 1.33.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| apexbase-1.33.1.tar.gz | 1.7 MB | Details |
Built distributions (wheels)
Total release size: 163.3 MB
Release files / apexbase-1.33.1.tar.gz
| Download URL | apexbase-1.33.1.tar.gz |
|---|---|
| Size | 1.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d287d85284e7a48d62c9af2e32ce5c2582c2d29cbe3ab0e2a6347affaf6b510
|
|
BLAKE2b-256 checksum How to use checksums |
18bc274b01cd86148215292ce9567b8f91c663449bdef22c12f4903a550163bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / apexbase-1.33.1-cp313-cp313-win_amd64.whl
| Download URL | apexbase-1.33.1-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 11.4 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
5b1cf0a833a346d1e47cc1baca59657ba71b8278132b7b02c198cf9462639190
|
|
BLAKE2b-256 checksum How to use checksums |
b6ca5c76397b9da031150a19a88557c9051f5a8d24c5e3f83ec51f2f2f5bd6be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / apexbase-1.33.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | apexbase-1.33.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 11.1 MB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
86d2370c3972a4ced823e0e2c8c72e4b878e335dd382e87100da70dbe3d5ebbe
|
|
BLAKE2b-256 checksum How to use checksums |
880d3b5b8225cab0bf56cbdabf96fc6343799f399662614035d293300fbdf4b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / apexbase-1.33.1-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | apexbase-1.33.1-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 9.8 MB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7221a7ba8e7e9545df27d7336ecb00867cbe058cf0aa65ff4ec21857a1753d0d
|
|
BLAKE2b-256 checksum How to use checksums |
5d67c7a64f2582e57a80fd30c443425a5fe80b23580f2c3c963a6d84d33eff1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / apexbase-1.33.1-cp312-cp312-win_amd64.whl
| Download URL | apexbase-1.33.1-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 11.4 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
f2398a875a262162ce3d2e4974ac9936f179d20e36ae5515c8adb43b95d29aa5
|
|
BLAKE2b-256 checksum How to use checksums |
abc30b9ed6fa824aed6295ed096c7a602fed4ee60c16855832fadfd5be72c140
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / apexbase-1.33.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | apexbase-1.33.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 11.1 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
5ea3a1df6cc42d108b7325021eb8396ba8cf22492548c898db61d7ea800c8b8d
|
|
BLAKE2b-256 checksum How to use checksums |
93c2f7719ca6877aba31144f3b0d98c42adf63b94126039c3ad7d57108c3577f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / apexbase-1.33.1-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | apexbase-1.33.1-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 9.9 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
23e7ef5b4446f17a10b7b55e7055b2c108e07ea53fd41a33a5f45a4c11bb9903
|
|
BLAKE2b-256 checksum How to use checksums |
bfe69b3fd975ea4429f7ff809a3b54d3293c3f22d6671f4967f9a692e2094a8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / apexbase-1.33.1-cp311-cp311-win_amd64.whl
| Download URL | apexbase-1.33.1-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 11.4 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
4aa3f71ad469cf9b7d10db992563b2b65cd014bb47131d4c75339c2885be2e38
|
|
BLAKE2b-256 checksum How to use checksums |
97ba926decb396d240d3dd4e8ddbaaddf0e8686ef6d8e8bdbcb0653303c774fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / apexbase-1.33.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | apexbase-1.33.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 11.1 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
e38c29e5ce6f6099ea1307d1773b584a044688595c8c5e30d15895a9606b116e
|
|
BLAKE2b-256 checksum How to use checksums |
bd4d1b0349c2753e580d2e027527f18aa5eeda74b0227e7086f0f49fee1025ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / apexbase-1.33.1-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | apexbase-1.33.1-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 9.8 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a3be2702e44d6be6ccbfe766caa8f4126196b0e92507b783718659f9d4e773d3
|
|
BLAKE2b-256 checksum How to use checksums |
c4b61fcadcb6a3d81c6088dd829f3647911508de7df2c516e4377cfb1c551854
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / apexbase-1.33.1-cp310-cp310-win_amd64.whl
| Download URL | apexbase-1.33.1-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 11.4 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
1e78644d3567506e0ccba8e24a2e058c67f622f28110e8ae1372c952675d44b9
|
|
BLAKE2b-256 checksum How to use checksums |
acb76ccef1dceb96cffcab940533514dbfad1f95c33c43e33930424dbea507ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / apexbase-1.33.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | apexbase-1.33.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 11.1 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
94228cf79a1b2afa7c83b8c38296fb31a8647207457b4fe002a01522d30dfacf
|
|
BLAKE2b-256 checksum How to use checksums |
68d8fc6420e550380d036bc5fe81b675c88caa84b2525e1ea8bb7634f421fcdd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / apexbase-1.33.1-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | apexbase-1.33.1-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 9.8 MB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
0f857113a7e07bc187e574fd21815b2657149ff30c0fe16019343d8de900dfd9
|
|
BLAKE2b-256 checksum How to use checksums |
5af0c6bd8b6e1db8956add10f4186dc6c2e47776d775fb2a6adb39bc8e97ac98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / apexbase-1.33.1-cp39-cp39-win_amd64.whl
| Download URL | apexbase-1.33.1-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 11.4 MB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
8cf81a0417998d6de165709d2d4ea65faab2a21da8a585d1de75fd0bfbf2b07e
|
|
BLAKE2b-256 checksum How to use checksums |
e86b53712a4a800405922dec68be817cccd2024b33cf522f7bfb407c164d40f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / apexbase-1.33.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | apexbase-1.33.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 11.1 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
fd574838bd810b52ae9b41e5a20cef38b4433c722a07c04aa7e6a032b11c7910
|
|
BLAKE2b-256 checksum How to use checksums |
02fffe1dc4855316122a0043381b89f0d8d9b5a98114fbd6f15ad9fe8917d1ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / apexbase-1.33.1-cp39-cp39-macosx_11_0_arm64.whl
| Download URL | apexbase-1.33.1-cp39-cp39-macosx_11_0_arm64.whl |
|---|---|
| Size | 9.8 MB |
| Tags | CPython 3.9 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
1d67ca69cf7622edf167f5d9e559698da1c4f70c4c4dccff0fe6a9c929f39b10
|
|
BLAKE2b-256 checksum How to use checksums |
7f3476402a347392d2fb62fa57309e8865d6f31723bcec6b568d86635367c58d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|