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.0.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.0-cp313-cp313-win_amd64.whl (9.7 MB view details)

Uploaded CPython 3.13Windows x86-64

apexbase-1.20.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

apexbase-1.20.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

apexbase-1.20.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

apexbase-1.20.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.9Windows x86-64

apexbase-1.20.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

apexbase-1.20.0-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.0.tar.gz.

File metadata

  • Download URL: apexbase-1.20.0.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.0.tar.gz
Algorithm Hash digest
SHA256 1addab9767dfbd7ae8241a6f5afb2d9c059a9fcdc1cb2fc5d5257aaeb07b9dd5
MD5 9aa284efbb295c85c55178bc417a99ea
BLAKE2b-256 6c8ef26b4cdf11284a50f508e61ad7f5bc3a64107777a2c89ad5adc324bc2854

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apexbase-1.20.0-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.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b66e68b7cd98ebb6f8bb85438793a34e447304f76eaa3103f96f964ef95527e8
MD5 40e05e8df1ba2b9f6a8fa4d6ec5d4390
BLAKE2b-256 9ccb0714022742bafa02b30ca874fea980ff0481fd2cbbad7e9d9fb3a0053e98

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.20.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fdfb260da735e64fb301e70fb6cce688f1ae6a6b20daa9b0c892e37e96874907
MD5 bcc6cced42d99463a8ab66a308acff43
BLAKE2b-256 300a2ac99dbbd73ef3c5668b917a1b2ffd6b51b7de8fc91f818c2b85833535a0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.20.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8c268744595d62a0cb859b4b8c2ff878a3ccc898066ce9aa010c530698a0b562
MD5 1ce37ea3eafbe4aac644ef7399240d1c
BLAKE2b-256 290dac8d3e9fc185e334bb9313de86c39dc3b85ee1ebe612f8b33a30d16364a3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apexbase-1.20.0-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.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 192f3ebc1e22b11db838c76d372142e52a1ee00df2cf240d4bc3f5981bd5e76f
MD5 712f44e20acdf6957d1033af73bff3e4
BLAKE2b-256 73dea59c32bdee9f79e9ede7ec1228412e75699fd8b73a5b5888136fed0846cd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.20.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1ebfc936f30d6bef22b1e891e4de48bf9f3c745d70feeddae37d05adf962120f
MD5 c805afe7b999e8b9b4ae8a8383a80a60
BLAKE2b-256 6f12b88a910c7e5ed47878602d5de07338e50fdf2aa201ba3b45004d77e9c8e8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.20.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8fdf2c2c94f40e26acc672323aab0e1e4182a1d7a8eb72a6d4b9f7ce2eb7907a
MD5 f9c0f4a7b547449182632efcc4140a49
BLAKE2b-256 e75feb24b0aa841298e994efc580d3cc925b3d7287d896ac01581df536ae9fe2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apexbase-1.20.0-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.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9786aa385db4eecde084eddda5cbcc0060b5105345b1384cb4289a621b13f762
MD5 794339ea88228d79abd2839401583fab
BLAKE2b-256 ad60b77b8374ed3d89315b2916e6670131ec3c0d6ae0d48f4fb4ccf01b93306c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.20.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fbe0440e9bfdf5aba2a06be50eff155de5b06f7bd64cca5be3f42e4a1305ea83
MD5 9778efbbc2874840225bcc4c9b1aee68
BLAKE2b-256 ab055e25790602c0b7347e87dcd1e5ae7271321fabbcaca291e149284aef0255

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.20.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 08c49785294c45be177804e236ea1e845bf7f4bb326d5661e10e1b04444caecf
MD5 e2400b24fea1640d3197a69b29183709
BLAKE2b-256 fb314955d25a16c7795510846dfab87e5e2ffb61a27bdc212ae4c9b34a7de68b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apexbase-1.20.0-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.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 213d1769d89c1d5d62beefc06d8b0362a9d6115945524119ded402f916643a08
MD5 db630d50e076b86119869d704976f6c2
BLAKE2b-256 c2e39146c27b8d0ac100e65d4f7e72e863a4ebca7a1f38a6177bfc70e83206b8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.20.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c2151429b9d57af9969c5ace3b5a864a9673bc7f0d8500f2372a878beaf2cf3a
MD5 41b85aade65111021c1a7c039771b3dc
BLAKE2b-256 73ec24984059ae32ae4bab7560cf4b72af3c7412acfa17c49d42312484b3e03d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.20.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2b03cb42a6bc5ac3a3f4e9eba53e2931a3df8c99652828b9a0526a940b4a4135
MD5 f432bd6af540b8b2dd3e0aa16e6f18e9
BLAKE2b-256 cb444b7eb31a00d786e32f94c27340e1f98812107e7b1f1b9fb160b098e10fc9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apexbase-1.20.0-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.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 559eb9554e5402078cca2c52e86812aace06cfa464d296eb85a7c4e46908d2ad
MD5 22c92e37504407a37397234683bf5e15
BLAKE2b-256 2097d68d71d541edb5d6aec7188c55f918fd8e7adb29b0b79ad0f4d7e650d9c8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.20.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b7b8604fb5cdaf9805c314135cbbc2ac8bc68a7c4b968831e972d4575a750b09
MD5 e226332be5d7c6377c2034abbc029faf
BLAKE2b-256 b06303ea6965ee0c7b10bbe660eb17b5505968c94c52492161aba406ef42b97c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.20.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5dad00b90daaa0cdd16989482dcbdba0056f45aac69a53e5677edcbe55991710
MD5 509f0798eaa35f8efd047765c0a8e80a
BLAKE2b-256 af409e8945bd9270733acaab42a8a2a3667a2f3079977b33471ef60bedc394ac

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