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.0
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.0.tar.gz | 2.1 MB | Details |
Built distributions (wheels)
Total release size: 166.4 MB
Release files / apexbase-1.36.0.tar.gz
| Download URL | apexbase-1.36.0.tar.gz |
|---|---|
| Size | 2.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc04358a7bdc33c1af02f73ed370285e0e6d03801bc49443850418bd6d0e2f74
|
|
BLAKE2b-256 checksum How to use checksums |
5cc89c84241c4270c867acdeaccd71b87c7fd4a375811bd285abc1c93399d067
|
| 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.0-cp313-cp313-win_amd64.whl
| Download URL | apexbase-1.36.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 11.6 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
0f52b9ff4b6c6e0435d354acbe814eaeff45bb63459bb89f66dba08637e6257f
|
|
BLAKE2b-256 checksum How to use checksums |
595b51c916422f8a8280d1b1f7cc7f8e9f4a4ced024e5100885c9d33b7e2d87a
|
| 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.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | apexbase-1.36.0-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 |
da4fd5cccdf8b2e3dbf5ce91db9179dcf29854432580196cf59a1fdfc909ad61
|
|
BLAKE2b-256 checksum How to use checksums |
33ce89d1579c76d281c66255a0ad2e906caaa36848ff6e591b1fa1ded31dfd43
|
| 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.0-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | apexbase-1.36.0-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 |
3200f5ca4995ede2244b455cc86943dd9ec24b33846f70b6f4f8c5b8ce4c2399
|
|
BLAKE2b-256 checksum How to use checksums |
5fd2c07dc48c2fae0b9d69b4a33489d47aa1c1937f6f8f492d36a2ebc0d511e9
|
| 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.0-cp312-cp312-win_amd64.whl
| Download URL | apexbase-1.36.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 11.6 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
7b3c63b0d545118bd1a3fe7acb8b64dd07224b52d623e00a5b7cd10a9ffa0853
|
|
BLAKE2b-256 checksum How to use checksums |
8a759b4c8123e94ed48658d3946119aab0ce233da016ac128edba1ef6bc1c282
|
| 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.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | apexbase-1.36.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 11.2 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
2ef806ed694f4dd0ded4d7a54e5aaf425ab859690d04888f7d19edb99454e6a4
|
|
BLAKE2b-256 checksum How to use checksums |
3065001315801274c7160e0c267c3303c13fbe30b682ba6d17e2f46954919a59
|
| 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.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | apexbase-1.36.0-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 |
0b2ce9fb6d38554071099f23539d1cee15761309ffc1707fec1ee4a653ce7ed8
|
|
BLAKE2b-256 checksum How to use checksums |
2699da89e7550c805ce01e0ea77294054fefe0aa46f7220be8b65d7feb22e128
|
| 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.0-cp311-cp311-win_amd64.whl
| Download URL | apexbase-1.36.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 11.6 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
f99510dc394eb198ea7cd4a6ecff7ba527109662bbfe558434e7c1727c1384ec
|
|
BLAKE2b-256 checksum How to use checksums |
4ebc35a38663e2551356d7183cb1985c01e3bc22719bb346d1763a4c52347a5e
|
| 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.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | apexbase-1.36.0-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 |
a6d61ce4ac9c15948127bb4a7eed2f0acf388f31a660900ef926cda3a06d4cec
|
|
BLAKE2b-256 checksum How to use checksums |
3d8bfd5983e224282bc76ec401f3a97d44ff4095e83629477f8fce0fe6dbe3f8
|
| 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.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | apexbase-1.36.0-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 |
1f5d30c8f24ac5a897ef0309d3caff1c4df9cfd1dfae872634c8245fa87e729e
|
|
BLAKE2b-256 checksum How to use checksums |
6e4b53885bd2e231c605c2eec9b4e55ee53b63e5a27a1fbdd0df35dcb97cd76b
|
| 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.0-cp310-cp310-win_amd64.whl
| Download URL | apexbase-1.36.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 11.6 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
f66501965194fba613eb8a1996b71b269c5954f54361ecfe9a0eded4c895afd7
|
|
BLAKE2b-256 checksum How to use checksums |
c388101aa0a8c8ca7d7bd90d03a314d069f3478ace9dde9ffb1d0796755ab37e
|
| 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.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | apexbase-1.36.0-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 |
cde6d2ff60154db337a5398619936149526b629ee2719506aeebe60f4f3e5e31
|
|
BLAKE2b-256 checksum How to use checksums |
740a2075cd44fa567e7c5599e5a2688c30a3a014b2104621c9664c4f4582930e
|
| 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.0-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | apexbase-1.36.0-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 |
48e08b0bfeea1b45751452f8dd75f2cfc12c19dae7494ca3bc39044973f28662
|
|
BLAKE2b-256 checksum How to use checksums |
a97e23e7fd58db11245e161d4a844669647e9785f2767c9dde4feffc625a662e
|
| 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.0-cp39-cp39-win_amd64.whl
| Download URL | apexbase-1.36.0-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 11.6 MB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
0d6365dcc83800abfc1fab9e6327646552d211ef668b092a1abe436384fdbcf2
|
|
BLAKE2b-256 checksum How to use checksums |
e2fe97e355a253e8dfa232b9b2f4417c87fcd9cdf45f26c4f238e3f3da0ee608
|
| 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.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | apexbase-1.36.0-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 |
31cd79d74e0007c3e383c39345059b2a63a59b993e22274a3052f13fd75cb670
|
|
BLAKE2b-256 checksum How to use checksums |
566ab5f6e04e01ece569e7068d500bfa2a53177b319e0491d3689ebd4fc7139a
|
| 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.0-cp39-cp39-macosx_11_0_arm64.whl
| Download URL | apexbase-1.36.0-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 |
9d5dc20d79467974a12d30da8d808d7f5a8f984ae2f911ffe2216b8e3d3adcc1
|
|
BLAKE2b-256 checksum How to use checksums |
f3ce50fa741fe84545c0e5e20259a11307427c20f0d798c116428021ef65f5ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|