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;
create a table before running table-scoped queries.
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 | 103 tabular metrics, 6 exact-vector metrics, and 8 ApexBase quantized-vector precision rows |
| Comparable results | ApexBase wins 115 / 115 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.
v1.34.0 adds a serial row-group pipeline, bounded parallel scan/fold execution,
streaming overlay reads, and a per-query aggregation memory budget on top of it.
See Scan & Physical Execution
and Resource Ownership.
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.36.2
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.36.2.tar.gz | 2.1 MB | Details |
Built distributions (wheels)
Total release size: 166.5 MB
Release files / apexbase-1.36.2.tar.gz
| Download URL | apexbase-1.36.2.tar.gz |
|---|---|
| Size | 2.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
03d9404ea14eb0d1899e7206c9b1cee466f0310f1c3ff927df735bdf643f2036
|
|
BLAKE2b-256 checksum How to use checksums |
e7a622529a774e4886296fcf29938770e33de131c3bd1821e843de74bc310341
|
| 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.36.2-cp313-cp313-win_amd64.whl
| Download URL | apexbase-1.36.2-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 11.6 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
8d34b17bd33866a4578b9f51a803ca4eb9263ef324b4617056e43b5e39cb13e7
|
|
BLAKE2b-256 checksum How to use checksums |
dde4d4f059a3d6c2abd85d1ced42ea8d4a3eed0983b356471fb23451786a137a
|
| 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.36.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | apexbase-1.36.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 11.2 MB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
9eeea39779c88159a1495c6f100ee6f2b51717d69cc8f754c7de3fa96795233c
|
|
BLAKE2b-256 checksum How to use checksums |
17ed7585818e3734355637cb42b270baa3c783a1538b7ba9a2639a4202a31386
|
| 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.36.2-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | apexbase-1.36.2-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 10.0 MB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
2543e1b99d6d36e2f2ed5c28feacde0f5fb188257164ba2c45e8f5af71c3abc7
|
|
BLAKE2b-256 checksum How to use checksums |
791880a89ee2f38ae936dc345fe936b9713e42e906f677ece2a77b7af33fc6a5
|
| 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.36.2-cp312-cp312-win_amd64.whl
| Download URL | apexbase-1.36.2-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 11.6 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
a4e859552e58aa71da34e47f5d1b89a810e4eb6079d39fc7c865583737aad7b0
|
|
BLAKE2b-256 checksum How to use checksums |
bba5cff88c2f45757f8d306f81657029e396cb36e436b635c42e65ee51fcf37e
|
| 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.36.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | apexbase-1.36.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 11.3 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
47ad375b0bf79ffba31fdd5591300ba7be829aa812e6269e24a3eca7ceddde63
|
|
BLAKE2b-256 checksum How to use checksums |
dac5013561b6cc03ff52fb777ff2d6bf7ebfb0c8f1d1ee01416ce2cbe60e0cb4
|
| 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.36.2-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | apexbase-1.36.2-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 10.0 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
81a40fae1f47d6e76916035ca589b5dec72a166fa87a892815fbc5a4fca18f2f
|
|
BLAKE2b-256 checksum How to use checksums |
a17ce82834e165c42bfa067182d0ff254545396455db3a9c26dba52e1caf3a5e
|
| 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.36.2-cp311-cp311-win_amd64.whl
| Download URL | apexbase-1.36.2-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 11.6 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
166408644d0d9ec9dd1e439b3c6a7055f7568a445061f0a94b574149a248463f
|
|
BLAKE2b-256 checksum How to use checksums |
fa9931a39456f774564a25668925488af689239dc2ade1584c33dba3feae49c9
|
| 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.36.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | apexbase-1.36.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 11.2 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
b9c6939ce0a7830ca3f1207629e7ab63b55f88a7fe973bc33a5bd12abf8f3bed
|
|
BLAKE2b-256 checksum How to use checksums |
886cafec6a18bd26df4043fb1c62d1c94bc1172e6fac53751d7bf6240d93a5da
|
| 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.36.2-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | apexbase-1.36.2-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 10.0 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
470f96fb2c2fa2919680693a8e6f45b03119f903e0bca3c546c633671ebee205
|
|
BLAKE2b-256 checksum How to use checksums |
3284a8d1d18edf4f8293f800adc02a850bc1f73c32064e706367b4ff5107ed87
|
| 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.36.2-cp310-cp310-win_amd64.whl
| Download URL | apexbase-1.36.2-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 11.6 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
116a369e53e87a3f0b5682086c936c59a1301df9bdc7a3837dd702f07aff7d5d
|
|
BLAKE2b-256 checksum How to use checksums |
0362311b47ced8aabdfa92d9adb5404e9f37251965fc90d14350df7822a38bdf
|
| 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.36.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | apexbase-1.36.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 11.2 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
ac25fc5ea0e248ada3cc703ea077c4c6b7f39659dcadb0802eb5ef2f3d4f0a4c
|
|
BLAKE2b-256 checksum How to use checksums |
cb0af7bb0819a8b292d17fda84a080d170642dce3c37bf0a98a283b5b973f271
|
| 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.36.2-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | apexbase-1.36.2-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 10.0 MB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
2c1d7384b249d1b825e12a1c531b451e0af4ecf1ceb1489d565530390a4a66d8
|
|
BLAKE2b-256 checksum How to use checksums |
f35063258866b1f128f98ccb014626d28ff067aee4239ecc66939a37ec0c1081
|
| 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.36.2-cp39-cp39-win_amd64.whl
| Download URL | apexbase-1.36.2-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 11.6 MB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
78f7edff470b8e8c6a74fc653a22c1588a49d5025686cc8b0fe9d3834ab4c173
|
|
BLAKE2b-256 checksum How to use checksums |
16f80f9db2030f6d5723dc69edab71e323ab2e6bc1913113100ed538c746c392
|
| 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.36.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | apexbase-1.36.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 11.2 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
3a89aad4e204ccb74051c24cd1afe91342a5437b655aa9a4c257fb665f686b24
|
|
BLAKE2b-256 checksum How to use checksums |
f6e82f4ca38346d88749d07edd3ff80a22e85faee51669fb68849ef3f68aba58
|
| 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.36.2-cp39-cp39-macosx_11_0_arm64.whl
| Download URL | apexbase-1.36.2-cp39-cp39-macosx_11_0_arm64.whl |
|---|---|
| Size | 10.0 MB |
| Tags | CPython 3.9 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
5a93a8d469f1f2f02909c9c66469ed90aa872d5bacba46e0071907a8f10c0794
|
|
BLAKE2b-256 checksum How to use checksums |
d5a0c81521015abc5fdaa4da072be684ec998312563debde0bd6eb71b4795219
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|