Skip to main content

High-performance HTAP embedded database with Rust core and Python API

Project description

ApexBase

PyPI Python License

ApexBase is a high-performance embedded HTAP database with a Rust core and a Python-first API.

Install it, write local .apex table files, run analytical SQL, import/export DataFrames, and optionally expose the same 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, vectorized execution, SQL aggregations, joins, CTEs, windows, and indexes
Low-friction Python workflows ApexClient, Pandas / Polars / PyArrow conversion, file table functions, and simple local persistence
One engine for mixed workloads HTAP design: fast writes, point lookups, analytical scans, transactions, and MVCC
Search built in Full-text search, fuzzy matching, vector TopK search, and float16 embedding storage
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.

Performance At A Glance

Latest local snapshot: ApexBase 1.19.0, 200k-row tabular dataset, 200k-vector dataset, Apple arm, Python 3.12.

Area Snapshot
Fair OLAP + OLTP comparison 38 / 38 wins against SQLite and DuckDB in the benchmark harness
GROUP BY 40.0x faster than DuckDB in the representative snapshot
FTS search 35.6x faster than SQLite in the representative snapshot
Batch vector TopK cosine 13.9x faster than DuckDB in the representative snapshot

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.

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 and Float16 Vectors
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

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apexbase-1.20.1.tar.gz (1.2 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

apexbase-1.20.1-cp313-cp313-win_amd64.whl (9.7 MB view details)

Uploaded CPython 3.13Windows x86-64

apexbase-1.20.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

apexbase-1.20.1-cp313-cp313-macosx_11_0_arm64.whl (8.4 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

apexbase-1.20.1-cp312-cp312-win_amd64.whl (9.7 MB view details)

Uploaded CPython 3.12Windows x86-64

apexbase-1.20.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

apexbase-1.20.1-cp312-cp312-macosx_11_0_arm64.whl (8.4 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

apexbase-1.20.1-cp311-cp311-win_amd64.whl (9.7 MB view details)

Uploaded CPython 3.11Windows x86-64

apexbase-1.20.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

apexbase-1.20.1-cp311-cp311-macosx_11_0_arm64.whl (8.4 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

apexbase-1.20.1-cp310-cp310-win_amd64.whl (9.7 MB view details)

Uploaded CPython 3.10Windows x86-64

apexbase-1.20.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

apexbase-1.20.1-cp310-cp310-macosx_11_0_arm64.whl (8.4 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

apexbase-1.20.1-cp39-cp39-win_amd64.whl (9.7 MB view details)

Uploaded CPython 3.9Windows x86-64

apexbase-1.20.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.6 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

apexbase-1.20.1-cp39-cp39-macosx_11_0_arm64.whl (8.4 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file apexbase-1.20.1.tar.gz.

File metadata

  • Download URL: apexbase-1.20.1.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for apexbase-1.20.1.tar.gz
Algorithm Hash digest
SHA256 2a8d452e139fcb67fab43bc8945716f2bedcd2f3a0480a72a11e49f63aac9953
MD5 a76cfcc2ea822a9b8eda5f824a856a26
BLAKE2b-256 08b9c2d31dcb1d385fcbbaabe9b25076feaa47150dc95bc54c1fb2424e620560

See more details on using hashes here.

File details

Details for the file apexbase-1.20.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: apexbase-1.20.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 9.7 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for apexbase-1.20.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 e90add4cb23ffa4a6e34fdbbe86503b74d7601a93c005a15e82ddcb3a028e297
MD5 1f3ec4e83432f55405441f78826b2781
BLAKE2b-256 c169a071d414cf256ab431cb66816be77f383f195b6dbf0a177455925151230b

See more details on using hashes here.

File details

Details for the file apexbase-1.20.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for apexbase-1.20.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 312c486eaa4e1f3e729370257e077548770f183cdd58e7ccb426961586db8107
MD5 1396f3895facc90cea87fda0c201ebdf
BLAKE2b-256 c964f35716236ba19ee17bbcc0f338a92c92ac100748fcba5693b6d8303a60bb

See more details on using hashes here.

File details

Details for the file apexbase-1.20.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for apexbase-1.20.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8f8db2b4e129374fa4600440e6cbd5be08fc45a13a8b71de9b6dca81de91aa8a
MD5 5fac43a79f6e36aa6246ca7d05e78a4e
BLAKE2b-256 19f30d0e9146bed7fd1d8f66ee18617f2ec5d820eda461d32c22b058589bb4b2

See more details on using hashes here.

File details

Details for the file apexbase-1.20.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: apexbase-1.20.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 9.7 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for apexbase-1.20.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5f71d13cfe7b984837dc764e44b9043e8c5375a498b004e1aff069493bf9b933
MD5 79cb33e46118c27712067af27fe8fa04
BLAKE2b-256 9be7e98e5ff81631736390de4f8a93fe773ce150dff87aec890ae36ab1c2aa34

See more details on using hashes here.

File details

Details for the file apexbase-1.20.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for apexbase-1.20.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 748c1f3b8066cbc1b810e922ec46e948393e95cbc32b6aed0d3710d0412186fc
MD5 d5c4e0b19f81e920ec304e724368cd5c
BLAKE2b-256 2adc4586b44e530ee6c36c6dc7e891ac90a04c1258574afb767a50b56f0de3bb

See more details on using hashes here.

File details

Details for the file apexbase-1.20.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for apexbase-1.20.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a4d57f4cf375ce463df41b310839bf726001821c11e2eef29cec0596c531b28e
MD5 6e7ae946c7fac56cfcb620368e5a3690
BLAKE2b-256 24ff979d5d324458650934b67579bab9a9c3cd484ff7dd78f03e2ad0ebabefae

See more details on using hashes here.

File details

Details for the file apexbase-1.20.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: apexbase-1.20.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 9.7 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for apexbase-1.20.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b13bcba8e5015933f767c9ffb6c29b6ea464a45a04aa6bead76493f4311c2336
MD5 71afd0a8fbef855df097229e13234ed7
BLAKE2b-256 323206e2e8f8a918a13a928bb828fa4919220cb18dbd4af3f649f6d655d3c778

See more details on using hashes here.

File details

Details for the file apexbase-1.20.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for apexbase-1.20.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4e49131c08a499e17b64090360c36e627366bf019419eb3e4e0bb60592f7de38
MD5 66de2153d4089fac59cad58bff48f79b
BLAKE2b-256 ca5d6fc322a9bd428278bf523927f01032dfaf218cf555bdf0c72ca52abb1430

See more details on using hashes here.

File details

Details for the file apexbase-1.20.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for apexbase-1.20.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 37f31adbd57df33e081b4894010f0c64f6d8d3c58b7444634f648623d0b6fa10
MD5 21ba64ddf19d7ff39484030138793b49
BLAKE2b-256 cad6892ecbb32aad40ac2f8b50f9d920650f78cd93a009c6eb6954dae3285ea1

See more details on using hashes here.

File details

Details for the file apexbase-1.20.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: apexbase-1.20.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 9.7 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for apexbase-1.20.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e6b5d04a3f321d7748053b1c6fc0d0e4fcb13610869f90f101229f1ef9343fca
MD5 ba6774e05cb80c340ce121ae2b3b8087
BLAKE2b-256 1424a50228275296580b42cc21ceb97f4d1b8e01ef4c4db348fdc5f516bb386c

See more details on using hashes here.

File details

Details for the file apexbase-1.20.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for apexbase-1.20.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6eeea8b27bfbb5dd24f79f01423ef77816b7d300031c3e0e55be0df1236678d5
MD5 13fce5b7886b9637d85773614d0f76d4
BLAKE2b-256 5bcb68e668ca2367ecec9b308791960b45953ec6502002d053f869dcaa788883

See more details on using hashes here.

File details

Details for the file apexbase-1.20.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for apexbase-1.20.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3d02fe1cc37dacf67f96e8e43970539e9ed0696e47466df134017ab51787bbdb
MD5 e8188a802a6e338289ab09784c49a6e8
BLAKE2b-256 63348294a68393a42ac1f01cd3370fcce491e5258cb4180030ab3f10add85353

See more details on using hashes here.

File details

Details for the file apexbase-1.20.1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: apexbase-1.20.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 9.7 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for apexbase-1.20.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 64f005dc5639a6168fb83a29db973004dae0cf5a04fadede2da924a87c1ebdfe
MD5 a1eea8b80fa0432bf87b9ab89f3e22f3
BLAKE2b-256 f85a09c715752158d21cea435c6a15d97a47ca6915c5c8a3b5f40d13573b3dfa

See more details on using hashes here.

File details

Details for the file apexbase-1.20.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for apexbase-1.20.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 04235a21ef700e91f43ba211ea86551b1abbf6490687b7902388d99dc755bd11
MD5 d777d69e77a1be1de3e68d815c309b62
BLAKE2b-256 a3a8f643f793b531ae1cfcb3cf3d6df2efcdd6e7932b4750ec0523a7c8e71d95

See more details on using hashes here.

File details

Details for the file apexbase-1.20.1-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for apexbase-1.20.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bc9b721ca2f6ecc7979198c1d8b1b0568d67ff486670995c2545ac753a7593a9
MD5 c1c649d86d63ee929900cfe615bc5b5b
BLAKE2b-256 34d79ab6dc7cccab4a6ebd9a1263bb8084ea32e5efd8dd044ac4984c9a69fec7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page