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, 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.23.0, 1M-row tabular dataset, 1M-vector dataset, Apple arm, Python 3.12.

Area Snapshot
Fair OLAP + OLTP comparison 72 public tabular metrics tracked; ApexBase wins 71 / 72 in the benchmark harness
GROUP BY city 2.3x faster than DuckDB in the representative snapshot
FTS search 170.2x faster than SQLite in the representative snapshot
Batch vector TopK cosine 10.7x 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

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.23.0.tar.gz (1.3 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.23.0-cp313-cp313-win_amd64.whl (10.0 MB view details)

Uploaded CPython 3.13Windows x86-64

apexbase-1.23.0-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.23.0-cp313-cp313-macosx_11_0_arm64.whl (8.6 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

apexbase-1.23.0-cp312-cp312-win_amd64.whl (10.0 MB view details)

Uploaded CPython 3.12Windows x86-64

apexbase-1.23.0-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.23.0-cp312-cp312-macosx_11_0_arm64.whl (8.6 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

apexbase-1.23.0-cp311-cp311-win_amd64.whl (10.0 MB view details)

Uploaded CPython 3.11Windows x86-64

apexbase-1.23.0-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.23.0-cp311-cp311-macosx_11_0_arm64.whl (8.6 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

apexbase-1.23.0-cp310-cp310-win_amd64.whl (10.0 MB view details)

Uploaded CPython 3.10Windows x86-64

apexbase-1.23.0-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.23.0-cp310-cp310-macosx_11_0_arm64.whl (8.6 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

apexbase-1.23.0-cp39-cp39-win_amd64.whl (10.0 MB view details)

Uploaded CPython 3.9Windows x86-64

apexbase-1.23.0-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.23.0-cp39-cp39-macosx_11_0_arm64.whl (8.6 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for apexbase-1.23.0.tar.gz
Algorithm Hash digest
SHA256 90ee05d9c3d406ecd82f9135985730e7db9a6da9393438bdf2e62c7887bec5c3
MD5 615c85fad4c972f9c1bd0022a330fc58
BLAKE2b-256 8d245764795ef7c8e781ee9774f8a896352e3b00ac0b3be4612dbd208714894b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apexbase-1.23.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 10.0 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.23.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 82c8cefcc70c5f36bad63aa5156bda8a04222ad7cbd278302aa5d67db691b76f
MD5 634f0260a887c48e316637bffda27412
BLAKE2b-256 75c97ff00198c58c60ae4a466c68aebc44d08ec044e1f3bf31825e7d84bc6584

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.23.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d641c449751df196663c821187e3f7643cce9f57f1cfd12b2412859dbdc51bb8
MD5 07a3b382df1abcf0cdb4f5fd423661e2
BLAKE2b-256 6cfb2f111d85975df1da47af3543c8024e2bb5da8dff404aeab27160c82b7f77

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.23.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1a2fa0bc1a92e180d784acd92254f34cb457893fc8065634c4f9fd5a704b4bc6
MD5 daf69c2b403c59991dc198980bf17c6a
BLAKE2b-256 cec4dd3aed2a68ea1f1a36120b248da5d83f7902645235619ca23653dced462c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apexbase-1.23.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 10.0 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.23.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c16c39eb8e9eb3642e31b7cebe6d1f70d58c42de875e0987f1f686d68405eb02
MD5 47452e5ada906556862a400ad8269f4c
BLAKE2b-256 ee0aab9e73888601c541b6afd4a5039edbc94437619223ef53dee91d67be097c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.23.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5592b8b126dcc82b775df719402cdc931259c39c7174be5fe7c07eca76be5713
MD5 1aa0d8131c57ff64eb83960b31293bd9
BLAKE2b-256 42dd2783da9855af21c97024011eac97a68d8494d1dcbc36287f51c4a4f42cc7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.23.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 070e74ed2188bcf232ed29f010415260e30098218226c25bc61966ed1476e89a
MD5 ea2190de53db778c36691bc8cc0ca107
BLAKE2b-256 f352d7da2217d9de6e0a1bf0d7a33d11b60779c21351d43b297b2f683e3024ed

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apexbase-1.23.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 10.0 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.23.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f9c0f0e830f89a00da8a542ae665d6fb54962549e9095285bbd23b1318ae2983
MD5 7be1e67593c9aa775e8e9dbeffcf4a94
BLAKE2b-256 906c5e3de6d227525831c3a430fdc5357adc97c653681b9290073130facea811

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.23.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 42926a47d4bad18419cd1fb406b124a5ae1f8debe12212510844fa896635c245
MD5 37c44c3054772715ae54f6ddda323961
BLAKE2b-256 1baf4b6461ab1043409fafab777977a2b9705df486df11e806b4e312d24ba0c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.23.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3f99c58b99f9a81dcd938825bb5552079640e2ff211a76d4c732de73540387a7
MD5 8e8649904a3f1cd1795dd49d63d74883
BLAKE2b-256 5998dbde3f71ac59f92f55d856a132ca08b4607832e4a484ee247e00fea3d79c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apexbase-1.23.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 10.0 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.23.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 82cb98f65c6b5c0b7c9230064de826738fc6d74b196c71caba2a16eb330108b4
MD5 aa0469271c458691bd4d2dca1930dc84
BLAKE2b-256 c54071005f7f50b2685db3aaf6de888f82c096e2e52d06a92b6492fc26d07527

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.23.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7f8defa708ac19bf4c53044f4bddd39b202e7096b13a37d3e70e1c41986048ed
MD5 decfd60a0a21c067cea59de877dd222f
BLAKE2b-256 dd78828cb2ef9d3aa60c661ae3ed78c921f41c27030bc3754ffc7481923325d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.23.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cf68d58ed8b5b64d601f79bbdac90562c99cbae6e93236168704e515afc33f63
MD5 a43b18ee95d152a51dce19f823df1c98
BLAKE2b-256 aae041cb8722106bcccb3f02f2cdc890bb91c104b8d6677e587a092fa30e590a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apexbase-1.23.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 10.0 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.23.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 81b3099955ff23c38727f554bd4ba0f2010950f60617d3b6764de2db64ba36e6
MD5 12980b65cd45d3e3e61bdad2c5eb5acd
BLAKE2b-256 ac20e39269ad47ba74bcf049a10373cf8452aec599f8e8e701933fdb4034e86e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.23.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b70a8651880c88c46f5a1e6bbfbedb25ede063a7bae18c12deeff27c3835b0ce
MD5 37e21f936c3f04f8243bf6b2124156dd
BLAKE2b-256 ab9f313657a5c969bde60b1d6d519ecd8871da4ae614598f5b625c94c6d6ab44

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.23.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 16dbf723f17081c55e425ddf650c3456ffa91c5c75bec7d4e2a842266cd51cb5
MD5 dc1db61ac6fbdb2fd2706375cae11b5c
BLAKE2b-256 c549977433b5a98dc801edf231a1005a766698a94027f9d64157bb05141f4827

See more details on using hashes here.

Release history Release notifications | RSS feed

1.30.0

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

This release

1.23.0 This release

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