High-performance HTAP embedded database with Rust core and Python API
Project description
ApexBase
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, fuzzy matching, vector TopK search, and float16 embedding storage |
| 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: ApexBase 1.19.0, 200k-row tabular dataset, 200k-vector dataset, Apple arm, Python 3.12.
| Area | Snapshot |
|---|---|
| Fair OLAP + OLTP comparison | 38 / 38 wins against SQLite and DuckDB in the benchmark harness |
| GROUP BY | 40.0x faster than DuckDB in the representative snapshot |
| FTS search | 35.6x faster than SQLite in the representative snapshot |
| Batch vector TopK cosine | 13.9x faster than DuckDB in the representative snapshot |
Benchmarks are workload-sensitive. 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 and Float16 Vectors |
| 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
License
Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file apexbase-1.19.0.tar.gz.
File metadata
- Download URL: apexbase-1.19.0.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c85901d85482fba88139e538c49ccda38ad37aaf7e41071e9d55155ae6c7ac5a
|
|
| MD5 |
a0ea955515b473b017c3a94786f91967
|
|
| BLAKE2b-256 |
e02b69f53dabf8e01191b4616dec141c8fb8db8e957651efe3f5f0d41e5159ac
|
File details
Details for the file apexbase-1.19.0-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: apexbase-1.19.0-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 9.5 MB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3292fcfe16cdaca4625708eaec1eeefc54e2168d08502063c0dc7073a407450e
|
|
| MD5 |
b6956c5568fdb39dd4f4d7a1df8899a1
|
|
| BLAKE2b-256 |
09928d2f22f81016e82fe7cec4ec19f1673c0ae58d6747a0ee13c4d68152bec0
|
File details
Details for the file apexbase-1.19.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: apexbase-1.19.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 9.3 MB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a825dd4260bf57ad0190fd98c83fad2e26357615eeb602250fbf1755f84aa05d
|
|
| MD5 |
ccba28bf538804255581d4c15f063dde
|
|
| BLAKE2b-256 |
82c17d1ac89f7a74857561d9e4b918a78a206b2365d3a419b1042173e9d0dc03
|
File details
Details for the file apexbase-1.19.0-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: apexbase-1.19.0-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 8.2 MB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50d04dd587ff6f9443f7f56a0b16c5a804b60fc73eaa909e89b1f74e1b4f35a2
|
|
| MD5 |
4b5b9d9e48ef05a44d3cc4dbe82b183f
|
|
| BLAKE2b-256 |
fc7311c5cafc0625545cddd23d43493741c9f89f84b7ef38f26ece37fdee1782
|
File details
Details for the file apexbase-1.19.0-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: apexbase-1.19.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 9.5 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b63b6bc12e257d128b1852f08db5720ccd5cb74b3679e96147e09ee505278b8
|
|
| MD5 |
e2bca5f7fb7ba6fd679a29071bcfc9dd
|
|
| BLAKE2b-256 |
ef1dc8a0fea89a0e62f9fca83121064f7aeb88e0edcacd8a26efac27bb83ba5e
|
File details
Details for the file apexbase-1.19.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: apexbase-1.19.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 9.3 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c58538284650254aa5ae518290e41ff16e1f38c5043dc4061efa24b803f88b36
|
|
| MD5 |
986816c8a1bd16d44fa5e5461946fc97
|
|
| BLAKE2b-256 |
64c23fb85b4c7cf5683834ec00e97513e4d1ae638d2bf7b0ac53b30706080b27
|
File details
Details for the file apexbase-1.19.0-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: apexbase-1.19.0-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 8.2 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1360ec1e083b4e9ca2137194f2d284cd5104a343b19250823da1e21aa0b0ebe5
|
|
| MD5 |
41a43186936244680c06b5e486bd783c
|
|
| BLAKE2b-256 |
f7556eabe23a2ceb89fb0cecf1227caca8a880c3820e5bab27bbf717ba56f6fc
|
File details
Details for the file apexbase-1.19.0-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: apexbase-1.19.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 9.5 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9031ccf8192cf2c7ac9c4dd6afc42163774796dc6decaee27f979784572b975d
|
|
| MD5 |
f02b51c6441c4ee6bb2eef23a06df6b8
|
|
| BLAKE2b-256 |
9f583998363da1e3484d0b80153362af2cbd2efbd9d02bb71f590f33588416a2
|
File details
Details for the file apexbase-1.19.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: apexbase-1.19.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 9.3 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
094e1c2c266f92aa72324c30e3f0758f3fa552c6950a9b62f498f93aba85ef98
|
|
| MD5 |
38fa2fc8846891a10b5f5400e2b9f8a5
|
|
| BLAKE2b-256 |
1eeff4d775c4597b935b3d53ba16e2e2353b0ec7bd958d6f8efdd024cd9cbbe3
|
File details
Details for the file apexbase-1.19.0-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: apexbase-1.19.0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 8.2 MB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
784cb42352cccffb21d6a7eab4ee59af55f02c91cde2b0b36803f21717f808ad
|
|
| MD5 |
fbdd309321271af81037604a74c20303
|
|
| BLAKE2b-256 |
66258b5fb2b996236ac9eb44b791eaf99bbb397cad41be93522ed62679dbd59e
|
File details
Details for the file apexbase-1.19.0-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: apexbase-1.19.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 9.5 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6ec5618b1f25b9d968afec72e9411cb90297f673e74f75bcf8850008ddb9d49
|
|
| MD5 |
0bb81031d60ba2a347506a32c14f8cb9
|
|
| BLAKE2b-256 |
98d59f5fec1e0ba1f4454a03836937f2cfb5d7d9f6cad8ac36b08120b980be4c
|
File details
Details for the file apexbase-1.19.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: apexbase-1.19.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 9.3 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d07dacf9ca5facf6a9410a68cc486b3bf1d16ceef86421ee40f79bb8a9f768f6
|
|
| MD5 |
229e86446519058a8f3ad0b303e7079c
|
|
| BLAKE2b-256 |
7f8568ee9474a28f4443e8d7026891bb993c97b220d8ea744540f4953fff6fea
|
File details
Details for the file apexbase-1.19.0-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: apexbase-1.19.0-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 8.2 MB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59169cde029c4c68eb5ae366779c551054dcb24d2c4353ac8e27f14f73eed712
|
|
| MD5 |
82a68a3a9b8eb53985b32c0a35dcb458
|
|
| BLAKE2b-256 |
c448ed7097dd071910b7aeb51c293d899002e9e431a5b0120fb407adc96948e3
|
File details
Details for the file apexbase-1.19.0-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: apexbase-1.19.0-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 9.5 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ccf94b2c5c498b5a55d1e09f21316569f4742ac5d87646cc229e066ed8f0d83
|
|
| MD5 |
0ba89b10d765730745669fb544288b64
|
|
| BLAKE2b-256 |
044d9001bb509495a5bd26a497b0c81fc31b9feca599032cd64656f1b08705a1
|
File details
Details for the file apexbase-1.19.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: apexbase-1.19.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 9.3 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b652906a1d61f582ed6a0a9958d4f6d94341c513bc2bda1f45b16f67700f4dae
|
|
| MD5 |
17b4a2e45772338dfaa09333b35939b3
|
|
| BLAKE2b-256 |
9a5481372483dc9f4b8df6f08fd7216697d18bf26307ffb2e24388609c96ce35
|
File details
Details for the file apexbase-1.19.0-cp39-cp39-macosx_11_0_arm64.whl.
File metadata
- Download URL: apexbase-1.19.0-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 8.2 MB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd7e3c5555d70c4dc828787eac8a09451ca2d9f43b540137a150c55072621396
|
|
| MD5 |
e1031369eeb85ce1bc39f1ba32a141e3
|
|
| BLAKE2b-256 |
8948ce5760d049dcb7b93a803c20e615a1f5b433ed7e43df25672c8ec460654d
|