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.

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 102 tabular metrics, 6 exact-vector metrics, and 8 ApexBase quantized-vector precision rows
Comparable results ApexBase wins 111 / 114 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. See Scan & Physical Execution.

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.33.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.33.0
File Size Uploaded
apexbase-1.33.0.tar.gz 1.7 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for apexbase 1.33.0
File
apexbase-1.33.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
apexbase-1.33.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.33.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
apexbase-1.33.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
apexbase-1.33.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.33.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
apexbase-1.33.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
apexbase-1.33.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.33.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
apexbase-1.33.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
apexbase-1.33.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.33.0-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
apexbase-1.33.0-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
apexbase-1.33.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.33.0-cp39-cp39-macosx_11_0_arm64.whl CPython 3.9 CPython 3.9 macOS 11.0+ ARM64 Details

Total release size: 161.7 MB

Release files / apexbase-1.33.0.tar.gz

Download URL apexbase-1.33.0.tar.gz
Size 1.7 MB
Tags Source
SHA-256 checksum
How to use checksums
2f97d47e38107ce4389076e0c9654678fafb1bf5f6c3ab8a515a1cac694dcebb
BLAKE2b-256 checksum
How to use checksums
3c8388d51e49c7ec328814107267d69329a089a0067cb95d57e5c6b0683ea045
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.33.0-cp313-cp313-win_amd64.whl

Download URL apexbase-1.33.0-cp313-cp313-win_amd64.whl
Size 11.3 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
ef433a09e278a66fdd5d5d27935e3b7a6f8c9d1d235d6bee1a3d0bf105880e51
BLAKE2b-256 checksum
How to use checksums
b6c63599003c135e4f2763152960b1198124cfe85d4d3fe98316e0a29fd53cf4
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.33.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.33.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 10.9 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
012211adefb22644f74f7ec71d16953922668582e04d3acc79a2c3cb32916e51
BLAKE2b-256 checksum
How to use checksums
0eed2039b661efe16fa62b1c3a574e4e31cdb3e13fcab376a58a7c6d51f42186
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.33.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL apexbase-1.33.0-cp313-cp313-macosx_11_0_arm64.whl
Size 9.8 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
65fcc037c13e5b3f21a3a3acbfe7a62420f0c08a22461c61d52521b06992e879
BLAKE2b-256 checksum
How to use checksums
edcc9bfa719c4fb6ce6add7e961a062ddc136f202a0cd322099b66552ffc9780
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.33.0-cp312-cp312-win_amd64.whl

Download URL apexbase-1.33.0-cp312-cp312-win_amd64.whl
Size 11.3 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
d510e17bb045834e3962dc03d5ac32ec88239d17e5316aa576b20a91c0404c66
BLAKE2b-256 checksum
How to use checksums
c15e3abca54a4a348783d53aaeaed39b65ad4223345a953c60ade1e1767b33d4
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.33.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.33.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 10.9 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
706df0a99f0a94486cd74cedd550b71244f1fdb30c5020deaca76911a3fc5bfc
BLAKE2b-256 checksum
How to use checksums
720a8078fa3fe36c5609ee8ceaceccbdd8eaac003f8b3f6271e70b38a9201b06
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.33.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL apexbase-1.33.0-cp312-cp312-macosx_11_0_arm64.whl
Size 9.8 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6db50b76fa803a8c2ea7648039ac5de11696c51570cff637045aaf110695ee06
BLAKE2b-256 checksum
How to use checksums
a98173379ccdec6addb9753a6d0d8da33228d652aa8dda1f318e9c0e96a404ae
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.33.0-cp311-cp311-win_amd64.whl

Download URL apexbase-1.33.0-cp311-cp311-win_amd64.whl
Size 11.3 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
b8dc04318bd7c4b05dd128af75f8b2c623d47dab6bbf629dbd43d6194d6c2073
BLAKE2b-256 checksum
How to use checksums
d52044b8c19f805ab10b9679567e6c915827dd9b048bcd5f1b2d4bd574a46f60
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.33.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.33.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 10.9 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
298645f315f580fd46519921200fc34c7a6e2e6785e22183e0bad7ba52634399
BLAKE2b-256 checksum
How to use checksums
e5833a04b5daebbbe31301ebc587ae511507062b2d3ed8d3cc40091ea36e7b51
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.33.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL apexbase-1.33.0-cp311-cp311-macosx_11_0_arm64.whl
Size 9.8 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a1450b1e4ca189054f625c3b0b746890554ce911c36f6e433131e2347ad5adf1
BLAKE2b-256 checksum
How to use checksums
87e528bb1d9dce95c1fd2cd95ce0d24c6eb6a4a91c6887550e80bad46fe21c85
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.33.0-cp310-cp310-win_amd64.whl

Download URL apexbase-1.33.0-cp310-cp310-win_amd64.whl
Size 11.3 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
6b3fe3344d64f5eb35b7ba8406c2c4d4f8ff2e3ac41eed9fee8c04a6ae7d18ce
BLAKE2b-256 checksum
How to use checksums
14a204b96fc7332d3de916493e4eb82df864387be35c6e95835458a42fe17278
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.33.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.33.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 10.9 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
1ad336b9be6b78e1b60bc6c71a4323375ac18344365964856e276139fa3eefdb
BLAKE2b-256 checksum
How to use checksums
be3be89e5e7ad974620ed66507ac17153b0a7950ba69aeaa26fb58496444c0b8
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.33.0-cp310-cp310-macosx_11_0_arm64.whl

Download URL apexbase-1.33.0-cp310-cp310-macosx_11_0_arm64.whl
Size 9.8 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
5ff56ccc9c2bcc9f644e47a07ec4832ba2528a7c451f7a9bc44162b427530305
BLAKE2b-256 checksum
How to use checksums
afb80a4512727f8af727759a47851db0c74f98710aacadc1dc7b4f0fb14222fd
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.33.0-cp39-cp39-win_amd64.whl

Download URL apexbase-1.33.0-cp39-cp39-win_amd64.whl
Size 11.3 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
405617665fd83dc4960bb0b5a1d7311db4be4b586c03396efbb9ce551867b8bd
BLAKE2b-256 checksum
How to use checksums
13515addfaa68ad872bbaa6af1ea5fa21fbf2bb015b66b225e54969d9e5989c0
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.33.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.33.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 10.9 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
3c94c71327125a20dce2faf8bd75131382f7c19f36cb54d67b0095cd9888bc2e
BLAKE2b-256 checksum
How to use checksums
dd81fb7b674044d9de8e0ecbcff5a0ef49d05323e46c50dc3b33b30acdc0661d
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.33.0-cp39-cp39-macosx_11_0_arm64.whl

Download URL apexbase-1.33.0-cp39-cp39-macosx_11_0_arm64.whl
Size 9.8 MB
Tags CPython 3.9 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
62d63736106c813cacb9c4434f1c2eae3dc4079bd3c990aedf41d8279ed23be4
BLAKE2b-256 checksum
How to use checksums
c8218a300175e481e311effc6a15506ae5c09b6a49735c4cfb9a84ccdffd17e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.16

Release history Release notifications | RSS feed

This release

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