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.35.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.35.0
File Size Uploaded
apexbase-1.35.0.tar.gz 1.9 MB Details

Built distributions (wheels)

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

Total release size: 165.6 MB

Release files / apexbase-1.35.0.tar.gz

Download URL apexbase-1.35.0.tar.gz
Size 1.9 MB
Tags Source
SHA-256 checksum
How to use checksums
815130609af05493b1eefc3cdeef688d286dec019e05ecf3f4782626b01b1f12
BLAKE2b-256 checksum
How to use checksums
e7090a563ca4516f88cb526771920eb210cfab05c26826abe9448b19126ecc07
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.35.0-cp313-cp313-win_amd64.whl

Download URL apexbase-1.35.0-cp313-cp313-win_amd64.whl
Size 11.6 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
9bf12a15f79475066440c819e3e0bcc0e462c03dba71353b489e0ddbee51f1ad
BLAKE2b-256 checksum
How to use checksums
6abadf3c564631fbe30fe97fdc75865a396d5b6ee1df69061a0514ba4e9bdb2c
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.35.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.35.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
9309d0ea992cf5da9df6195354435edb9645d6eff1d75d91f24ceb0df9831fed
BLAKE2b-256 checksum
How to use checksums
4ddfad0be3e5b888eafd748f678dccee8bfa196149b1d5fc2ca01eed920b448f
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.35.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL apexbase-1.35.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
0f3fc5a2509c5484164755032bb5215ff04cea23581ff5039a0ba02f6b686885
BLAKE2b-256 checksum
How to use checksums
edf969c225a82b8259bfdb71e2b33304e4b1577c5b90f7adc3bffd39e7f799ad
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.35.0-cp312-cp312-win_amd64.whl

Download URL apexbase-1.35.0-cp312-cp312-win_amd64.whl
Size 11.6 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
c792931275852703a981383cdda2d676319ebfaaa713e6641105f45666a90128
BLAKE2b-256 checksum
How to use checksums
064cf70683344f800b4d86781c224afc6807dbfda85999a3afb16f64a1b0ed94
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.35.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.35.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
cad70b564710b9f574742b705811051a04db5807fdbb6f940ff689daa3287b00
BLAKE2b-256 checksum
How to use checksums
0e44fc6111959c29e40e4d3441113139b59d63f375657c3188140d47e4f532f8
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.35.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL apexbase-1.35.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
1e3b309132b2b294fad4323500834981210fc102472ee31bb783deef6e732d0f
BLAKE2b-256 checksum
How to use checksums
c5998b75f9909f2b631447da5430d968d8d8c00503edeacc3a5e0334904d3bfc
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.35.0-cp311-cp311-win_amd64.whl

Download URL apexbase-1.35.0-cp311-cp311-win_amd64.whl
Size 11.6 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
2983c114abbdc9e91e763e4959538d26dbe679dc4277777c42ccfc98b8e7149f
BLAKE2b-256 checksum
How to use checksums
ba7653ef094dd8739d2ac0fd636caf88392d76f45105c5b7018642ed848dcbbb
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.35.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.35.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
0ba3847e49a1df4921c4ecd5894f159c278a10d58a67c32e5ba636ff84c0ef44
BLAKE2b-256 checksum
How to use checksums
568b9d472446f65390f61c057b68a0d48decb050fc13c7b21936a4086f4a1d4f
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.35.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL apexbase-1.35.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
880ed5f0eeeb664eae957f2c569193027cafc850178b9e5dc8111c6b345de672
BLAKE2b-256 checksum
How to use checksums
05206de025f34351b80aa7e9f2b7131bccf7fac832095b34ed6460b173224e92
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.35.0-cp310-cp310-win_amd64.whl

Download URL apexbase-1.35.0-cp310-cp310-win_amd64.whl
Size 11.6 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
538647ea87a7c9b951aada4c2f4ded90a102e93f3651490c226fef1c468941d7
BLAKE2b-256 checksum
How to use checksums
33be78b962182d89e2b3ebfb06fecaf979effbe7951c8f75c0c55539421bc0aa
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.35.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.35.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
f539f6a1a29fcb7ef11060312a0e45f802a9b16a313802a73a3316b67e277af1
BLAKE2b-256 checksum
How to use checksums
379ec90cd5a9a6bcfe2100d014ebdfa8c60e3f3b869dc5d0624228d756035e2c
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.35.0-cp310-cp310-macosx_11_0_arm64.whl

Download URL apexbase-1.35.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
fd9bf2448e90a4da02dece10204f254bde9c3d6be65efcb45d0c1a04be9cc0e0
BLAKE2b-256 checksum
How to use checksums
ff884b81ff1549b2fad2d6609ff8e113cd696bf070539693353fc367a73d2868
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.35.0-cp39-cp39-win_amd64.whl

Download URL apexbase-1.35.0-cp39-cp39-win_amd64.whl
Size 11.6 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
e8e5f86936c3d7df3242936a71680b8fc28a6dbb080633e00e61be9a2c140e76
BLAKE2b-256 checksum
How to use checksums
1146a7c397fdc9faa468f944880611007e76ee02991de9add3ca685cba39c4e4
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.35.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.35.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
54217fd4f6d3457760a010df9cdcda409feff834339f1a3c9742c78da5abc949
BLAKE2b-256 checksum
How to use checksums
dec076bb524b093dd8f9c4d1def1c6132b40313e0f46342b4d437c32a15d3050
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.35.0-cp39-cp39-macosx_11_0_arm64.whl

Download URL apexbase-1.35.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
29cafe8a6d6867636141f37d16c96c55496a14bb46e3d6e85fc5151ca796d6df
BLAKE2b-256 checksum
How to use checksums
c2e1ec69137f615ad73af4cede41f1637a15ce0205ae3e214a8306ba5eb80edb
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.35.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