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

Performance At A Glance

Latest local snapshot (2026-08-15): ApexBase 1.29.0, 1M-row tabular dataset, 1M-vector dataset, Apple arm, Python 3.12.

Area Snapshot
Fair OLAP + OLTP comparison 102 public tabular metrics tracked; ApexBase wins 87 / 102 in the benchmark harness. The remaining losses are the DDL gaps vs SQLite (Table DROP, Table CREATE+DROP cycle, ALTER TABLE ADD COLUMN, 1.3x–2.0x) and a dozen advanced-SQL metrics vs DuckDB at 1.2x–2.0x, plus NOT filter (4.6x) and ORDER BY LENGTH(...) (3.9x) as the two remaining larger gaps — down from the 1.5x–75x these metrics previously showed.
GROUP BY city 2.0x faster than DuckDB in the representative snapshot
FTS search 5.6x faster than SQLite in the representative snapshot
Batch vector TopK cosine 7.1x 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, 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

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.30.0.tar.gz (1.6 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.30.0-cp313-cp313-win_amd64.whl (11.0 MB view details)

Uploaded CPython 3.13Windows x86-64

apexbase-1.30.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

apexbase-1.30.0-cp313-cp313-macosx_11_0_arm64.whl (9.5 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

apexbase-1.30.0-cp312-cp312-win_amd64.whl (11.0 MB view details)

Uploaded CPython 3.12Windows x86-64

apexbase-1.30.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

apexbase-1.30.0-cp312-cp312-macosx_11_0_arm64.whl (9.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

apexbase-1.30.0-cp311-cp311-win_amd64.whl (11.0 MB view details)

Uploaded CPython 3.11Windows x86-64

apexbase-1.30.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

apexbase-1.30.0-cp311-cp311-macosx_11_0_arm64.whl (9.5 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

apexbase-1.30.0-cp310-cp310-win_amd64.whl (11.0 MB view details)

Uploaded CPython 3.10Windows x86-64

apexbase-1.30.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

apexbase-1.30.0-cp310-cp310-macosx_11_0_arm64.whl (9.5 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

apexbase-1.30.0-cp39-cp39-win_amd64.whl (11.0 MB view details)

Uploaded CPython 3.9Windows x86-64

apexbase-1.30.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.7 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

apexbase-1.30.0-cp39-cp39-macosx_11_0_arm64.whl (9.5 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: apexbase-1.30.0.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.16

File hashes

Hashes for apexbase-1.30.0.tar.gz
Algorithm Hash digest
SHA256 6b623813b4bfc454a5560f865c1287b99e0bf98f0bc06b47ceb24fb546912f22
MD5 73f17572137a137cf4160a5d5d0b35bf
BLAKE2b-256 bfd6ba4d3d14c1c208a00ee3c46d85d8c4d16c803611036b5bd81b77d4851b2b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apexbase-1.30.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 11.0 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.16

File hashes

Hashes for apexbase-1.30.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 95160f8f07b5f87733029bc9785a595475cbcfafd17b38cba7e550459c400b14
MD5 8850d2f1babfac931a87055ed8a1227d
BLAKE2b-256 6d7772137e66cd52dc0abe2e4f82eba0b565070be2fba325f96b37a061da3925

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.30.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 84778ecfb303beab2b8230941e0a539cc372ac0262bed2f5ad8e56970af46bcd
MD5 82ffeb5baddee4475ec5098710101b64
BLAKE2b-256 c86974cc44511cbb78844a3501881776bb4b7cde539155be3add1dcc270947c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.30.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d47ed9b6e7dcc2c1e347d318b4dfe27a3fb86462da41975cea37910e893c5b5d
MD5 83ce68b8c0140b7798ca927eaca507de
BLAKE2b-256 9d5d61ec751db744bf24b2d58d7d80d86713a19cc11a127a37e9a6edbf398b6e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apexbase-1.30.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 11.0 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.16

File hashes

Hashes for apexbase-1.30.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f37f76de93736df064860468f8ab8161130f76d621ec546f38e11f9df3c6b51b
MD5 98c5d39f39d556c614cc530dad93f8ba
BLAKE2b-256 bd29457f16f1f684c4be7810b4ee44406dd264bfd8b13ac5f3164fd0638cc0a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.30.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a53a3c53af678c89c66b121560b7891caf1cfdee760c723e3d9de369d0f601f0
MD5 7ff6c435f6a7ff413e9edd9b70a07006
BLAKE2b-256 58b767f9c3a620a7ed0fb50b19ceb96e65231580725531085f7c6d5757ca3505

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.30.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5c845d42e6165dae915159c1a9666a8c376b97338a91008196d81c28cae2118d
MD5 8589a69b116ca06f917253c741da13a5
BLAKE2b-256 387aa5eaf1851cd2b438b39558a964915ec558617da26d50dc36ba745c1cbe41

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apexbase-1.30.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 11.0 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.16

File hashes

Hashes for apexbase-1.30.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 75703f8880e7d37affca0298a47098b7cc16468a0ca7922256f8075b60262840
MD5 d023b359e3b7aa1162b62763724dbf5f
BLAKE2b-256 bf1e976c18e2de80ba8182b5a9403b4381a1bce3aaac7ccb2d905fbfdfdb8c21

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.30.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5976b1a25c89a8a81f3cfdd9b6eda251f0f743001651201ddce951c630902328
MD5 3bcb9d8ea6267d444624b62a52f1c6fc
BLAKE2b-256 634c8446b8849962ca3a00a00745b5cb24aaaead056f2b888d1580447c0f3769

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.30.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f3937ad124725708cbbbc72f1c96f28f38e068cca2f961e94755cc998eeb4031
MD5 08832babd138745be574b8e4232c8115
BLAKE2b-256 a6a9d43e5859a3b1c67fbf1e2941e7154314bac9ffc6d569d0508573a274aa6e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apexbase-1.30.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 11.0 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.16

File hashes

Hashes for apexbase-1.30.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 20a06dcdbdacb94096ab41b382ae69d95be0c7a7d78ff220563e0c41dfaa4e5f
MD5 5aac8a6f1c10cb13847ec9f765d09676
BLAKE2b-256 8f06d678d2c380a955d03701cbc9bc4b675b7875c98f721e56d8fe11a21e7cb5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.30.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5f39074eec24ea0bf851fcb025bd3843109a1f75b750b2957a2e383864aafd4b
MD5 be6026e9ab192c59b69cd43dc4157dda
BLAKE2b-256 8db2657cb1b136b57f5bfef60880e032b284f356a0b6f8846f67201467ea8b95

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.30.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 100b67e556a079ba9909a20dc10c27a4e8f3c9755fed7ea15beecfc53f7bc45e
MD5 662eed513114db4dfc1fcef0cec00dca
BLAKE2b-256 78de4705bcc863e32bc55c45cd7e3033ae20efddda35845739a8ae8949ba57e7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apexbase-1.30.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 11.0 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.16

File hashes

Hashes for apexbase-1.30.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 b097a1a566dfa72142794a34ed39f25d069a21e5efcf7127ab3d3d5022cfd5ba
MD5 5a95326338bdae15c50e8758b6818418
BLAKE2b-256 b354716e80233269da37d05e829afad825dfd8a7e2c8dcc002b01e303f73f020

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.30.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c1abeaf9d094f505a10dd6ceed07b13501d2ed2468f4bc69fbccd483727f0fb6
MD5 2d991ccbe04f68658733af74930a69ea
BLAKE2b-256 4f0910270286e9708716cae41eada9bc68684f4771205d32a70d94d087c333c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.30.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1700a77423e954aff80817eaf9ebbaec52f517f024da7de7b5932416e52923c9
MD5 a4059ffd43e418d84dc0d5ac7cac518d
BLAKE2b-256 6520a267a38dc5327d22a31e8fef0926a62187fe2447bea1691ba24c96ccdfb8

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.30.0 This release

16 files

1.29.0

16 files

1.28.0

16 files

1.27.0

16 files

1.26.0

16 files

1.25.0

16 files

1.24.0

16 files

1.23.0

16 files

1.22.0

16 files

1.21.0

16 files

1.20.1

16 files

1.20.0

16 files

1.19.1

16 files

1.19.0

16 files

1.18.0

16 files

1.17.0

16 files

1.16.0

16 files

1.15.0

16 files

1.14.0

16 files

1.13.0

16 files

1.12.0

16 files

1.11.0

16 files

1.10.0

16 files

1.9.0

16 files

1.8.0

16 files

1.7.0

16 files

1.6.0

16 files

1.5.0

16 files

1.4.0

16 files

1.3.0

16 files

1.2.0

16 files

1.1.0

16 files

1.0.0

16 files

0.6.0

16 files

0.5.0

16 files

0.4.2

16 files

0.4.0

16 files

0.3.0

16 files

0.2.3

16 files

0.2.2

12 files

0.2.1

2 files

0.2.0

1 file

0.1.0

2 files

0.0.2

2 files

0.0.1

2 files

Supported by

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