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.19.1.tar.gz (1.1 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.19.1-cp313-cp313-win_amd64.whl (9.5 MB view details)

Uploaded CPython 3.13Windows x86-64

apexbase-1.19.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

apexbase-1.19.1-cp313-cp313-macosx_11_0_arm64.whl (8.2 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

apexbase-1.19.1-cp312-cp312-win_amd64.whl (9.5 MB view details)

Uploaded CPython 3.12Windows x86-64

apexbase-1.19.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

apexbase-1.19.1-cp312-cp312-macosx_11_0_arm64.whl (8.2 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

apexbase-1.19.1-cp311-cp311-win_amd64.whl (9.5 MB view details)

Uploaded CPython 3.11Windows x86-64

apexbase-1.19.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

apexbase-1.19.1-cp311-cp311-macosx_11_0_arm64.whl (8.2 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

apexbase-1.19.1-cp310-cp310-win_amd64.whl (9.5 MB view details)

Uploaded CPython 3.10Windows x86-64

apexbase-1.19.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

apexbase-1.19.1-cp310-cp310-macosx_11_0_arm64.whl (8.2 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

apexbase-1.19.1-cp39-cp39-win_amd64.whl (9.5 MB view details)

Uploaded CPython 3.9Windows x86-64

apexbase-1.19.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.3 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

apexbase-1.19.1-cp39-cp39-macosx_11_0_arm64.whl (8.2 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for apexbase-1.19.1.tar.gz
Algorithm Hash digest
SHA256 dcaa4cc8e028603b276e60ff3d51d713a27c115c5c9491def55811a28bacb39a
MD5 2b8a18522b0ebaaeeb99129e5bba818a
BLAKE2b-256 3df71835b2246d9b75255d493278f2565040033103f40056a1ed21f5447b5115

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apexbase-1.19.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 9.5 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.19.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 738a012c6de123b9557daae95045e3a4319b780add07f5e482b1780b438814cb
MD5 e976ac1d97e2a28d3784ce26558756a9
BLAKE2b-256 a5cd2f3424782171d9c1c1313f17662d5d065736cb8273bf13de311ace4a3f0d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.19.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1da521092d30ef5e98896b2a98cd463bf593959b0110a121ab9284e2c2dfa40a
MD5 9e32210888dcbdf40349e019226d6afc
BLAKE2b-256 ef783b07827997e5ee9fac0e555b74e893979ba2242d0f6a1394673bafacbd57

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.19.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2e7765fe6c055a876bea7902505579b95166abce15d74c344779a04457388e9a
MD5 c8666b3c652c37053f909be6bcb1edf2
BLAKE2b-256 e25a1407d546a8cf8fb6f4ec72626eb05f15e458d268796b7c5e15ee4c9c897f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apexbase-1.19.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 9.5 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.19.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0c322188c5644339df908afb5f7236af85460b235b57b9f93a6ddbeca6e81887
MD5 981868c2cc0a4c033e093aebc46be0af
BLAKE2b-256 692954045f02407bf5be70a8a38d17d221d7cdb1a3588716d9cea0c25198b236

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.19.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dcd9d878b452d7072e230db84f01db202cef5ca1aef57ebdb7c22621b22334c4
MD5 952d45ae3c40abc2752b5c64e684fe94
BLAKE2b-256 bf70bd0440d76128903b938a0ff43bf6161f8f3be8a8c2412dac65b3968e24da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.19.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1d8cd0e877ed15e25b9467ae33674906229a10447320fba52e4be17c57081964
MD5 c93df9eb51dbd265fa791d087d868501
BLAKE2b-256 5f7dea0f45485d40cb29c98eba7706f53c0710a0e3eafc2033c9dc95e67d10c2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apexbase-1.19.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 9.5 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.19.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f7610fed703532ddeb8f819267b5536be2a3661498e0e3d0207a05dcb5008ed9
MD5 bf8d0b8129dcde96cb98fec202609fe6
BLAKE2b-256 01a43c8fffba487ef7b280de2a332dfdd5c732b5bd94164bc9c661a91a25092f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.19.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d524ef71d414158ba0a6bd113d92bd85468550cdc70813afda9ba07858035aea
MD5 d9d5ef0b7beb22f95057785fabf7b83d
BLAKE2b-256 63bdcb89469185234cd26d638f4ffc59465ae131a8acb6d64474f4ce20fa3e7f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.19.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ed84224c822837a88fa20088df03ae6a1bb8830ba1c30eb2bc1ef1068ab3f1ab
MD5 cde6695e9eb1c87cbb02406e7621dea0
BLAKE2b-256 aa95c66c27a8ab9fda3e8766e836141a100ee59260addbb687f6bc3bb9bb117a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apexbase-1.19.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 9.5 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.19.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 72988ed4a38529ab5a13191df696c85a94b2fd7e9804ddda51fb23b30ea761f5
MD5 07f4077f6d497ece24bfa3321390946a
BLAKE2b-256 453350252ecc779ca90139626c99cf4f013f92e5a6799bb5e99d1154e690d2fc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.19.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 710c34e794c7311c6afe0c9d86795a85fe2e962aace934ab482a563c5253f0ad
MD5 65592843c7597648fcde4df7d59ab982
BLAKE2b-256 e671ed22bf36d26d5afe0a53dd529429601d922678f34d40185eccd7e1204dee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.19.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 42460e553d04e9d9571ac1f67734aec78cfd1c681630c4b8b6df5eb287b17a9b
MD5 ebe13ecb62836d39226eed50fc529785
BLAKE2b-256 6ddba4b116575342139e8f1000b065fba638d03c18e9a4574afbff078da441c4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apexbase-1.19.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 9.5 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.19.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 463dd8e39700c2769069740de5021f8183d0c2046b7d69f70cebdcab1ab405ca
MD5 f67c093cb6a3b7e8e155ed3f37b2a038
BLAKE2b-256 d79707e49868118e47e4c188ee1f9067cca30dc1e78227191163424ec945a146

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.19.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1ce3c3b0c23fa9fa5868300e9d169a077b398051c6cf4f737e1bea464b4c6b6c
MD5 7424aa54d5a1f86db699d27da99ee549
BLAKE2b-256 7f69fae84e176debfcfadad553508e2d48006c3192c824f6371c5cb2bcb66439

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.19.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 13bc63d7d693efe1b77d34e0840113564b86394ac930f42ce1fb5afbeba85e6f
MD5 b1852b68ac50eb83ff5e3c6800ff9e64
BLAKE2b-256 42816651e11f21c01d4db79685397bd64d5e1b0c9af9c68e9d5c8a7ee5121c0e

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