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.

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

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.36.1
File Size Uploaded
apexbase-1.36.1.tar.gz 2.1 MB Details

Built distributions (wheels)

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

Total release size: 166.5 MB

Release files / apexbase-1.36.1.tar.gz

Download URL apexbase-1.36.1.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
3b13242f1658b1440aa3c8e7b4fc76f18885b4feab19f866579ecaa535645ea4
BLAKE2b-256 checksum
How to use checksums
c996843457110037144373cae861635a29e8fc20d76a22b841608d7df9b34ff5
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.1-cp313-cp313-win_amd64.whl

Download URL apexbase-1.36.1-cp313-cp313-win_amd64.whl
Size 11.6 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
3006eaab7c36b775743190d928388aff5aad41c29a4ae79aeb424e9b4611f73d
BLAKE2b-256 checksum
How to use checksums
d90c08e2d2ea61b51e0bf04517b1ed8aa57d556b760e2b75b22ce9bf9eeda608
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.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.36.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.3 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
99993b1d5a3251765224a3574aeefa1c17ffaa448e8db4263560c2464064b437
BLAKE2b-256 checksum
How to use checksums
0b893c1a54be0899871ec194a6c7d994b65af67720f8c24de0122070e00fad41
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.1-cp313-cp313-macosx_11_0_arm64.whl

Download URL apexbase-1.36.1-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
20470596ae504990dc2578ee133866ab54467911492af436a8d3b972e88e2f23
BLAKE2b-256 checksum
How to use checksums
eb848d1474ae83d95c80e8d8a41d34306f135e65467c6fc2477352c59feb514c
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.1-cp312-cp312-win_amd64.whl

Download URL apexbase-1.36.1-cp312-cp312-win_amd64.whl
Size 11.6 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
62a9e5bb9dcf9e56c15ca654af69fb5a25fd39ef6ceee05fd3466eb40191cac1
BLAKE2b-256 checksum
How to use checksums
a3db389399e99d335aaf551de963e8659f1fab1cda7e405af8f17df214330a75
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.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.36.1-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
857268867ace760d8cf50c525ec9cb144470ca853c538c5314d3769e0a47e1ca
BLAKE2b-256 checksum
How to use checksums
0485e252b411238f1dca740ca7330d1990be5b20f2cbeee76b0a4c11810ae905
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.1-cp312-cp312-macosx_11_0_arm64.whl

Download URL apexbase-1.36.1-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
e8eae1c7b5f9522ab4d8a3ae8f4e333f0f2ba03f6189be1ace9e39f5f43db9f2
BLAKE2b-256 checksum
How to use checksums
1b47feff3be7cdba9717b901eb57ede8950f986a5ef3a8fdedc63d94b511061d
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.1-cp311-cp311-win_amd64.whl

Download URL apexbase-1.36.1-cp311-cp311-win_amd64.whl
Size 11.6 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
906600d4bcf7a92941a7154a3bb79a212cba8cb24a4f37a8d772d041a6d81dd0
BLAKE2b-256 checksum
How to use checksums
7016580955b3a465f8641fc32cf1d602d039865b04f68900028b98ccab4864ef
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.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.36.1-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
189e6807dccd3ff4d9d181fb871b1fcb9fa802b965919c83387a611d0abef3ad
BLAKE2b-256 checksum
How to use checksums
2205607a792920490b900e1d40d2eea6324ab89614f075c2171e59a93dbae43a
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.1-cp311-cp311-macosx_11_0_arm64.whl

Download URL apexbase-1.36.1-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
1c3402acb8e88f3327b33f5ead5e7439fd05922496af79ea3a10ec4fa95618d1
BLAKE2b-256 checksum
How to use checksums
1012af72b649cb7436fb72cadb9e403e458d1427fd60f66debe60604d3702744
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.1-cp310-cp310-win_amd64.whl

Download URL apexbase-1.36.1-cp310-cp310-win_amd64.whl
Size 11.6 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
b10ec5a6497c76e64572755fe57779eb7c6007b344b5c2d1ca4ee597fad1fd5a
BLAKE2b-256 checksum
How to use checksums
c05dfe66109d262fde45cd2f6a68309c5fef29e235fe2209cf8358d76297754c
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.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.36.1-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
1c04f34b6ebf1f7939b1552903a41b5dda13f29eed8d4442fa0a9a7dcf0ce7ff
BLAKE2b-256 checksum
How to use checksums
d4216e00651cd166b53b043e3b3555375c2c779f51956e3f5854c7b9ccc6d966
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.1-cp310-cp310-macosx_11_0_arm64.whl

Download URL apexbase-1.36.1-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
9c20f47c8b7b1fe99d0ba613fbb3d4ef10a87692a629d6724ab8a909299e1de6
BLAKE2b-256 checksum
How to use checksums
cfe905958b759cfd6c8759e062bd7b905ed8933c1488888a05f92c262b01abb3
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.1-cp39-cp39-win_amd64.whl

Download URL apexbase-1.36.1-cp39-cp39-win_amd64.whl
Size 11.6 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
0de45b49c40e7effdd3e6415a555424f91c4a1e00b4995d8c6cd6f4af2f1f987
BLAKE2b-256 checksum
How to use checksums
dc03835af502b47cec349ed9c13ab38b5813ed5722bf08040b8e078e70aa2000
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.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.36.1-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
9a6c5e84b567713609e3a7494d243d23a5312ea8fbf1c5cd828b34316e6415b8
BLAKE2b-256 checksum
How to use checksums
1e0c37f4250475572ac264ccbc6d5753dadcb78c87ddd291a0694d23e7a4b142
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.1-cp39-cp39-macosx_11_0_arm64.whl

Download URL apexbase-1.36.1-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
7f0292c387f33cb1e5922896799e49b3b19201a32d22f0aa4f11e6395fce5ddd
BLAKE2b-256 checksum
How to use checksums
ac09d9dd00015ce93f233c01126f6a07b15f48f24d9267afd429e15c297c481b
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.36.1 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