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 | 105 tabular metrics, 6 exact-vector metrics, and 8 ApexBase quantized-vector precision rows |
| Comparable results | ApexBase wins 105 / 105 tabular metrics against the fastest competitor in the latest complete runs; exact-vector 6 / 6 |
| 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.
v2.0.0 is the V5 GA release. Files use on-disk format version 5, which is
now the stable format for this release line. V5 builds read V4 files, and
APEX_WIDTH_FIDELITY=0 writes the V4 layout for files that must stay readable
by pre-V5 builds. Format 5 adds an optional logical-type schema section
(uuid, decimal(p,s), timestamp/timestamptz/date/time/interval,
list<T> and extension codecs), keeps one compressed frame per column for
chunked tables (set APEX_CHUNK_INDEX=0 for the flat frame expected by older
builds), and reserves _id ranges against a shared on-disk high-water mark so
several processes can write one table.
V5 also closes the SQL semantics gaps (DISTINCT *, alias uniquification,
RIGHT JOIN ordering) and unifies statement routing inside transactions and for
COPY ... FROM without a selected table. Memory is bounded by design:
APEX_QUERY_MEMORY_MB caps per-query operator memory, APEX_PROCESS_BUDGET_MB
adds a process-level admission ceiling with a bounded queue, out-of-core spill
keeps ORDER BY/GROUP BY/DISTINCT/JOIN within memory
(APEX_SPILL_DIR), and ApexClient.execute_stream() streams results batch by
batch. Extension codecs are explicit: bytes/json are built in, pickle
must be registered deliberately. The complete V5→V4 compatibility rules and
migration notes are in the
release notes and
Storage Architecture.
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 2.0.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 | Provenance | Actions |
|---|---|---|---|---|
| apexbase-2.0.0.tar.gz | 2.7 MB | Without provenance | Details for apexbase-2.0.0.tar.gz |
Built distributions (wheels)
Total release size: 175.2 MB
Release files / apexbase-2.0.0.tar.gz
| Download URL | apexbase-2.0.0.tar.gz |
|---|---|
| Size | 2.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
08c3fafa218ca6b105b3a7a63ec873ab328c972ebe57f50ad6473391a4bd0543
|
|
BLAKE2b-256 checksum How to use checksums |
2af07dd974fa770983608f4dd9ed8b09f971d3058d18ee493b29567a70629ec9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / apexbase-2.0.0-cp313-cp313-win_amd64.whl
| Download URL | apexbase-2.0.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 12.2 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
e6e94b449de864eaba30a4a2d0fefcf214f19d31252bdb436c17460d8a033b25
|
|
BLAKE2b-256 checksum How to use checksums |
a13126b9f5bc4d7648a9bbb5036df17f4d98d285ec6238d6b5130b111faf1b87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / apexbase-2.0.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | apexbase-2.0.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 11.8 MB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
44ac8c0d7aff368f0476ee744fad33b00cb331345c1b8324a14371dda68a2272
|
|
BLAKE2b-256 checksum How to use checksums |
1c3c8fb700ab458651b6fb86b7550036d559981efaec738dfdcc29c8d05d663e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / apexbase-2.0.0-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | apexbase-2.0.0-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 10.5 MB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
1f49a5d2d26d34f9063d4fe4f9ac20325514ab868c6369a4f23ef458903287f3
|
|
BLAKE2b-256 checksum How to use checksums |
faa54bf08c7963c28206257d7a1d9f5a9868b54255e201e6c2a4ba166e8ccbaa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / apexbase-2.0.0-cp312-cp312-win_amd64.whl
| Download URL | apexbase-2.0.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 12.2 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
e3c82962ea59cadf235922d40584c48696b7d2ac7baf498bcedaf33e87110a58
|
|
BLAKE2b-256 checksum How to use checksums |
9daa49d618e67ee1328554be091a146aa673f53f70adba60791778ccc0bfd7e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / apexbase-2.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | apexbase-2.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 11.8 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
675ba7c98556eab153a07ad35c0d7eb4550ba72ba645f4624a89b340d768a81b
|
|
BLAKE2b-256 checksum How to use checksums |
47fc76884b6c86dc0ac7ec41f923cdf9ab648512fe2e67bcd8f800f39d32cdcb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / apexbase-2.0.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | apexbase-2.0.0-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 10.5 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
4d0a1bb7307fddd8ff1a019837e38827a5d9a8aa85067e2ed9a3c6b1e26aef66
|
|
BLAKE2b-256 checksum How to use checksums |
effa543e364088f2c17718dbd04ef986167b55a2fca9fdeef7da8b51d7ffdf95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / apexbase-2.0.0-cp311-cp311-win_amd64.whl
| Download URL | apexbase-2.0.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 12.2 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
77e3824f26ae65098350ae8f52f6a0b22ff1c487927db896a12199130d7a3d60
|
|
BLAKE2b-256 checksum How to use checksums |
9b65725651ad6808caeaee9b7a22f4d280581fbbb7143de7d34bd98635d1ab01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / apexbase-2.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | apexbase-2.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 11.8 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
3118a17b9328cd03e1db0968152adb6bf8eafd82f25bb4fda575f026b16e3e9a
|
|
BLAKE2b-256 checksum How to use checksums |
d3cc3eb1e01d3c2e106e869c06ac3f83ae5a5d240493d6ddda1b0326df34a019
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / apexbase-2.0.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | apexbase-2.0.0-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 10.5 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
1de9368b8283fbd906b760130eaa08a8b2776a0c002ff11798ef8c436cc1d971
|
|
BLAKE2b-256 checksum How to use checksums |
5df6d2edbcd9ca16a747a3baac926d940460b053bd7b497ebacd4f2c5e3d4cbd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / apexbase-2.0.0-cp310-cp310-win_amd64.whl
| Download URL | apexbase-2.0.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 12.2 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
47631ea3797401d2fe3d30ca96caf0dc216f295d7b5a47c95919e9e92f607806
|
|
BLAKE2b-256 checksum How to use checksums |
7fd52576448cbc1c91f22611026aeae2a98b5b8f7fcdca8bb74f79f03d6db068
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / apexbase-2.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | apexbase-2.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 11.8 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
179e940a2b7d10d669e5e236709965a93b158b16aed8101b6a2825ef2151578d
|
|
BLAKE2b-256 checksum How to use checksums |
ad573236928ec56e9a83869f91a0f6e092ad086c99e9b8896aac28710810385e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / apexbase-2.0.0-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | apexbase-2.0.0-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 10.5 MB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
e42d912699953021d98ac8c7f65977eb83df0fc47e0d81ce64c02f6e7a7c1bf8
|
|
BLAKE2b-256 checksum How to use checksums |
c8eef07174570ea0e8cdf3cd24d1da38e8c02d831a4a89b14aa0913e86a822fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / apexbase-2.0.0-cp39-cp39-win_amd64.whl
| Download URL | apexbase-2.0.0-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 12.2 MB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
14eb85ec3717f7bfabe205b54c2f117c3e776ecd72d3cb7410bc1c469060e9e0
|
|
BLAKE2b-256 checksum How to use checksums |
56937bf01a2c2d14005da77aa7ffcbc248e135360658a0ae5ad122f33a3a50c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / apexbase-2.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | apexbase-2.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 11.8 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
0dedb0c57e60b997d877ef83acb838514c6e751e3d391a74ed7d318c4f028e7c
|
|
BLAKE2b-256 checksum How to use checksums |
c834f6dd08c0c3966ec3ddb2c1de7dec48c506af564b4d8b2884f5e83d8345f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / apexbase-2.0.0-cp39-cp39-macosx_11_0_arm64.whl
| Download URL | apexbase-2.0.0-cp39-cp39-macosx_11_0_arm64.whl |
|---|---|
| Size | 10.5 MB |
| Tags | CPython 3.9 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
715987c3ed518844a77b31334ef89e6f7c42781cb2ee5be0fc67b90c1dac1226
|
|
BLAKE2b-256 checksum How to use checksums |
475c96cfb7c2a57ced8a66055509453fe313559cf367e0389a83f8329539ac46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Security for apexbase 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.