ApexBase is a high-performance embedded HTAP database with a Rust core and a Python-first API.
Install it, write local .apex table files, run analytical SQL, import/export DataFrames, and optionally expose the same 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, vectorized execution, SQL aggregations, joins, CTEs, windows, and indexes |
| Low-friction Python workflows | ApexClient, Pandas / Polars / PyArrow conversion, file table functions, and simple local persistence |
| 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.
Performance At A Glance
Latest local snapshot (2026-08-15): ApexBase 1.29.0, 1M-row tabular dataset, 1M-vector dataset, Apple arm, Python 3.12.
| Area | Snapshot |
|---|---|
| Fair OLAP + OLTP comparison | 102 public tabular metrics tracked; ApexBase wins 87 / 102 in the benchmark harness. The remaining losses are the DDL gaps vs SQLite (Table DROP, Table CREATE+DROP cycle, ALTER TABLE ADD COLUMN, 1.3x–2.0x) and a dozen advanced-SQL metrics vs DuckDB at 1.2x–2.0x, plus NOT filter (4.6x) and ORDER BY LENGTH(...) (3.9x) as the two remaining larger gaps — down from the 1.5x–75x these metrics previously showed. |
| GROUP BY city | 2.0x faster than DuckDB in the representative snapshot |
| FTS search | 5.6x faster than SQLite in the representative snapshot |
| Batch vector TopK cosine | 7.1x faster than DuckDB in the representative snapshot |
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.
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.31.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.31.1.tar.gz | 1.6 MB | Details |
Built distributions (wheels)
Total release size: 157.9 MB
Release files / apexbase-1.31.1.tar.gz
| Download URL | apexbase-1.31.1.tar.gz |
|---|---|
| Size | 1.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
735b7661ab9a29d6a4ffda9686bad49caa23e277818c4afbd3dd734e84da3f1d
|
|
BLAKE2b-256 checksum How to use checksums |
7fc5e4ecd7bb86bc2e5a50a0c672032834120e126a71ddf3f633b415389ea780
|
| 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.31.1-cp313-cp313-win_amd64.whl
| Download URL | apexbase-1.31.1-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 11.1 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
35f80a08ea7b8c94513454a627d817f3744485108028c416322b96190f492351
|
|
BLAKE2b-256 checksum How to use checksums |
2c0f07f5e798963d128e1cc306970a4fff6e3807d2830dd2eb9f8f3746a5510d
|
| 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.31.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | apexbase-1.31.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 10.7 MB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
748721de8745e63fefacfd771ed90423ac5539636c4f0d72ca7436907344b1d8
|
|
BLAKE2b-256 checksum How to use checksums |
2b008186945945be471ac4c3ed4909659d252cf94ba64d5c8f6af17fa9e2ab5e
|
| 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.31.1-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | apexbase-1.31.1-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 9.5 MB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
56aa295a265b6798a271b8f392cf88e1472b60e40b953e41808ce197a1d3511c
|
|
BLAKE2b-256 checksum How to use checksums |
a30d5b21f87a00a5935d8382e648275c5e7b5be613e6f3fc066f6408e5673473
|
| 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.31.1-cp312-cp312-win_amd64.whl
| Download URL | apexbase-1.31.1-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 11.1 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
328e3f11b39c13a2e893419a90b4a5ae252e06f9c8444e96a88459ae1fa4ae89
|
|
BLAKE2b-256 checksum How to use checksums |
39407515f74ebdf897aa5db030572dcd6e9968ca391bb505843387dfd9960a37
|
| 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.31.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | apexbase-1.31.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 10.7 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
5d37a55e8a4bd919076e4f56ab84d4c1a3bcd2eea46ac0d8b3464c1e2c4d51bd
|
|
BLAKE2b-256 checksum How to use checksums |
48c9f83d7d0e0ee77540baff66663b038154ccd79bf4fb98efcceca7503c08c0
|
| 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.31.1-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | apexbase-1.31.1-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 9.5 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
33564216aab01abac7cc15ea2c68dec20c29fee6562622332b8224f6b9405341
|
|
BLAKE2b-256 checksum How to use checksums |
6418dc86464be409b0ce864420f8e3485509306367aef3c697dce5adb04e9dcf
|
| 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.31.1-cp311-cp311-win_amd64.whl
| Download URL | apexbase-1.31.1-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 11.1 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
0647fbabd8b5226b8b0f8a94b3474da360df4591b449d9090acebf81d81bd407
|
|
BLAKE2b-256 checksum How to use checksums |
cb648d9b9372704d042692a3ab1d5a369bba900201a072b56ed4ae1125e35e26
|
| 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.31.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | apexbase-1.31.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 10.7 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
fd8f6ee7fb862da5286ae05004648212fa1b5b8e0556acafcb46f48c2eba8f86
|
|
BLAKE2b-256 checksum How to use checksums |
978255518179608ffcbf19455e2f92f6e8372525e27526f7eca7dbd0df02c90d
|
| 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.31.1-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | apexbase-1.31.1-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 9.5 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
21badeecc49e3dc96143620f190e909ee3d6bfcf71359126fac40810ea0fa834
|
|
BLAKE2b-256 checksum How to use checksums |
a9eb49978468600105977cb1c8f449f1a2cfd2ac87b7f763247f41c93c35236d
|
| 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.31.1-cp310-cp310-win_amd64.whl
| Download URL | apexbase-1.31.1-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 11.1 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
57b6f42a7955b2e82b39a5807b0ffb1ae918317dc5705380a4b3c153fcbfe7c0
|
|
BLAKE2b-256 checksum How to use checksums |
ddeaedaa4c330f1212ae05452b6f2ded2ebf7d41c5975d22f5fad3f800129253
|
| 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.31.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | apexbase-1.31.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 10.7 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
991de11ab37040c604949c81ec5afc0e03285c627a9f438123ec8ab4ce3c6ede
|
|
BLAKE2b-256 checksum How to use checksums |
72cf4249dbb690ea103bbeabc2a9b00a8ba26c0ee4288302a037e568572d5735
|
| 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.31.1-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | apexbase-1.31.1-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 9.5 MB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
07d848944e7b2c0bf1b05ebefccad715f9769b56e63b3e7a3d2cb0fa3d8e333a
|
|
BLAKE2b-256 checksum How to use checksums |
98241d40adae19b308d79273900d57c29ff26459c14038f7ff7a47f210a94cef
|
| 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.31.1-cp39-cp39-win_amd64.whl
| Download URL | apexbase-1.31.1-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 11.1 MB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
c3d0a76fd1546a96edbbeecc6c13e04025846e2354cbddd81c0171a7e8ce974a
|
|
BLAKE2b-256 checksum How to use checksums |
04ca166b73ec77f6df442739d5e61e3c840a2a04a1c410affc2a4ce7da145b85
|
| 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.31.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | apexbase-1.31.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 10.7 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
c95cbb62526e9c800f859da8868e6c2e99bb75dde966663fd56c01ca764e940a
|
|
BLAKE2b-256 checksum How to use checksums |
62d49a63abebbe452e8566e84e52ded4a2540b24b468800d703335edb9a90830
|
| 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.31.1-cp39-cp39-macosx_11_0_arm64.whl
| Download URL | apexbase-1.31.1-cp39-cp39-macosx_11_0_arm64.whl |
|---|---|
| Size | 9.5 MB |
| Tags | CPython 3.9 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
de9d55a22eb9c5b2be81eb0c5e7d87db6e08ac04fa0475a047fa6b68003d7071
|
|
BLAKE2b-256 checksum How to use checksums |
ef1675251904c111804526e8c3bb23e5d52234968656fd717df2daa61ee92aec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|