Skip to main content

ApexBase



PyPI Python License

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.

v1.37.0 is the V5 architecture preview release. Files may declare format version 5 and carry V5-only column encodings, _id ranges are reserved against a shared on-disk high-water mark so several processes can write one table, and new read lanes cover direct point reads, executor index lookups, full-text row-selection pushdown, and distance TopK. V5 builds read V4 files; to keep a file readable by a pre-V5 build, set APEX_WIDTH_FIDELITY=0 to write the V4 layout. The format may still gain encodings before V5 is declared stable, so treat it as a preview and see the release notes and Storage Architecture for the compatibility rules.

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.37.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apexbase 1.37.0
File Size Uploaded
apexbase-1.37.0.tar.gz 2.4 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for apexbase 1.37.0
File
apexbase-1.37.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
apexbase-1.37.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details
apexbase-1.37.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
apexbase-1.37.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
apexbase-1.37.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
apexbase-1.37.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
apexbase-1.37.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
apexbase-1.37.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
apexbase-1.37.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
apexbase-1.37.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
apexbase-1.37.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
apexbase-1.37.0-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
apexbase-1.37.0-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
apexbase-1.37.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details
apexbase-1.37.0-cp39-cp39-macosx_11_0_arm64.whl CPython 3.9 CPython 3.9 macOS 11.0+ ARM64 Details

Total release size: 169.2 MB

Release files / apexbase-1.37.0.tar.gz

Download URL apexbase-1.37.0.tar.gz
Size 2.4 MB
Tags Source
SHA-256 checksum
How to use checksums
195dd0d1ecef72f5dd26e8f44a17753b6acd7eebc614b72ee7e255a3473d1741
BLAKE2b-256 checksum
How to use checksums
620675649bf087128fd21c708f8e18ca22b7d1fa37cc95fb8ca1eb87235395a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.37.0-cp313-cp313-win_amd64.whl

Download URL apexbase-1.37.0-cp313-cp313-win_amd64.whl
Size 11.8 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
5cd14882e03320279e4e20527fb1b86db340d45cbedcc170e45d5d97eb511fea
BLAKE2b-256 checksum
How to use checksums
978223f3aab30b77f44cdd4acd21b684f4388cc022579ae6f041a0d0010176f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.37.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.37.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.4 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
ca6a338512097100a27f7d23e8a99be3f7e67cbab16aa42e9a114966f5a57df2
BLAKE2b-256 checksum
How to use checksums
9e8a540934ac736017fb7ad739871e972bf7f4bdb2f46b76631c52d469b1af74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.37.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL apexbase-1.37.0-cp313-cp313-macosx_11_0_arm64.whl
Size 10.2 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d245e2ae020cb3f25ed3e8d50a42e6465ab363238f03406a2c95eaac40be7e8d
BLAKE2b-256 checksum
How to use checksums
2ad065b8f2a8a0ce3b7cce636c7b334c32ee871ba4ee927c055e5edde2284ca0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.37.0-cp312-cp312-win_amd64.whl

Download URL apexbase-1.37.0-cp312-cp312-win_amd64.whl
Size 11.8 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
1034fb373d6ff0860f3d0272c9b916e2ad47f2a5cc03f183992db61c054b8c1a
BLAKE2b-256 checksum
How to use checksums
5b262ebe77a01c25378908f39e05281574db73e254e34dd04e5a53a1a3909dc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.37.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.37.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.4 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
9f88f71f37b69e6c49c782a83b11e1e1f9b9f15161ac4ba45360fab9b753dbfa
BLAKE2b-256 checksum
How to use checksums
281937a4645b4a6d20fc18ec33285c0e34885db0e00de56e7a269dc05416f353
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.37.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL apexbase-1.37.0-cp312-cp312-macosx_11_0_arm64.whl
Size 10.2 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a5cf24a296f7563049106063743168f98d2b8e0767374ea9bbf58915a437fb3a
BLAKE2b-256 checksum
How to use checksums
270f533baed9543b53385889feb8af31bdc83fea26dd959390829dc4302c147c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.37.0-cp311-cp311-win_amd64.whl

Download URL apexbase-1.37.0-cp311-cp311-win_amd64.whl
Size 11.8 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
bb10d2239e84b3d3fbe82f92d000d8d8ac50e50a99b6ed4f8b829c2834d95a20
BLAKE2b-256 checksum
How to use checksums
d28bba1e25a949b1f8cea5012f6c750dba43dff0a8b4e30d0d8542f570431fc9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.37.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.37.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.4 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
8edcd4c07a5d15a1992f115741f52201a8353e228358e88328a6bf3c06e029da
BLAKE2b-256 checksum
How to use checksums
307c792a8c807d879aa8fa8fd37ed53fbe011141825ab8a97838a5825ee61a7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.37.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL apexbase-1.37.0-cp311-cp311-macosx_11_0_arm64.whl
Size 10.2 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
3f5dee5db66ab84972555e6872d5ebb7fe2e7b09b6a06bf0d960152494096fa5
BLAKE2b-256 checksum
How to use checksums
39462ae76a436e41fa1caae2871681042f09e467b05a886ac9ceabdbd44bfa5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.37.0-cp310-cp310-win_amd64.whl

Download URL apexbase-1.37.0-cp310-cp310-win_amd64.whl
Size 11.8 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
f01cd06debb0b72bc22ede26fc85cf73d6563f948735a9f933bd43e12d79a7a7
BLAKE2b-256 checksum
How to use checksums
64456d0d5282a3d5e054470f9d691cc5ea284fc8eb62fedd8af4dc9eaaf7bc5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.37.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.37.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.4 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
78d8d996e620bfe9dc049d332ac3114f2f458bb057aac50e93769eb6a452ff7e
BLAKE2b-256 checksum
How to use checksums
423de000e59c356b61a26065de1c11522281e4a15c6a2a3eb932ed5692dbe2cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.37.0-cp310-cp310-macosx_11_0_arm64.whl

Download URL apexbase-1.37.0-cp310-cp310-macosx_11_0_arm64.whl
Size 10.2 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
570f07bd912f42f504b7002670483db057011f88862ad1c28f9151a424e62bba
BLAKE2b-256 checksum
How to use checksums
bd32e3155fd2a61db42711b82bce94cdee72345f306149a8abd9c16bdfa4bab7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.37.0-cp39-cp39-win_amd64.whl

Download URL apexbase-1.37.0-cp39-cp39-win_amd64.whl
Size 11.8 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
fb7a1f1a407c07a1192c28bbf5b3dd48a1a0820bd64fde4af083d8dd74ae751a
BLAKE2b-256 checksum
How to use checksums
ca15b6e31ee59bafb06d4a9f904ad331daf545d3ddb14602ca6f36219598611d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.37.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.37.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.4 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
7eaeb338f6cb5f80431a1742cffca3ab5bda56dd7083a379ad2c569bb84599b2
BLAKE2b-256 checksum
How to use checksums
5c40736646064e4d30d2ea4b866350ee7459c34c493cd8e66e622adfad0a5201
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.37.0-cp39-cp39-macosx_11_0_arm64.whl

Download URL apexbase-1.37.0-cp39-cp39-macosx_11_0_arm64.whl
Size 10.2 MB
Tags CPython 3.9 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ede68ff6704e0d494bd56410f0edcd3667580e1b14c2aa552aa9cc1a9d8804bd
BLAKE2b-256 checksum
How to use checksums
ecaf53bd09f1b0d11cb8feac130e4ab9ce8f99b82004a28bdc97996ebcc4e900
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release history Release notifications | RSS feed

This release

1.37.0 This release

16 release files

1.9.0

16 release files

1.8.0

16 release files

1.7.0

16 release files

1.6.0

16 release files

1.5.0

16 release files

1.4.0

16 release files

1.3.0

16 release files

1.2.0

16 release files

1.1.0

16 release files

1.0.0

16 release files

0.3.0

16 release files

0.2.3

16 release files

0.2.2

12 release files

0.2.1

2 release files

0.2.0

1 release file

0.1.0

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page