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.24.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.24.0-cp313-cp313-win_amd64.whl (10.4 MB view details)

Uploaded CPython 3.13Windows x86-64

apexbase-1.24.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

apexbase-1.24.0-cp313-cp313-macosx_11_0_arm64.whl (9.2 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

apexbase-1.24.0-cp312-cp312-win_amd64.whl (10.4 MB view details)

Uploaded CPython 3.12Windows x86-64

apexbase-1.24.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

apexbase-1.24.0-cp312-cp312-macosx_11_0_arm64.whl (9.0 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

apexbase-1.24.0-cp311-cp311-win_amd64.whl (10.4 MB view details)

Uploaded CPython 3.11Windows x86-64

apexbase-1.24.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

apexbase-1.24.0-cp311-cp311-macosx_11_0_arm64.whl (9.0 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

apexbase-1.24.0-cp310-cp310-win_amd64.whl (10.4 MB view details)

Uploaded CPython 3.10Windows x86-64

apexbase-1.24.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

apexbase-1.24.0-cp310-cp310-macosx_11_0_arm64.whl (9.0 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

apexbase-1.24.0-cp39-cp39-win_amd64.whl (10.4 MB view details)

Uploaded CPython 3.9Windows x86-64

apexbase-1.24.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.1 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

apexbase-1.24.0-cp39-cp39-macosx_11_0_arm64.whl (9.2 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: apexbase-1.24.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.24.0.tar.gz
Algorithm Hash digest
SHA256 57aeef1cc57a618b01e1a1632f101add58db0b2aafe9db1614bf633c31fb645c
MD5 7ab5c07b1e45e8ea04248eb4c79869de
BLAKE2b-256 7ef21d17ff98bf9c2e906160e124b9711b0ebe6510d9f4b6390cdd4a12f3179e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apexbase-1.24.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 10.4 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.24.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 db2b846f44d55270803c5369f07d34888004818b2f3d848c3da9f7c1e4c5c209
MD5 b0d2428f6b4373fdc306c7152dc2862a
BLAKE2b-256 bed35a652e9d647c0833bbe8a7753c67d14d2fe7ceb61ac121eeeb8545d37c10

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.24.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f754b9efa620273cde3eff37b367e88dd558bebee31b8c19898e4512be90bfa2
MD5 077c8c595a41b8aae274b51151320461
BLAKE2b-256 7ee9e4d7c61ee2021bca721228b74bb34afe03f8affa87509307881aac481d24

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.24.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3233c191dd41a5abd3fb7921464bccdc14faea7906b2a618fd6b17ce3da9a4df
MD5 069ad4bb9756a54c837c94866b9c3c76
BLAKE2b-256 fd2b433c5689161f1863c713664f78e5ec6003b8bd47163341dc1eb899da34a9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apexbase-1.24.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 10.4 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.24.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b71926216c112b981eacced5ba4389fe82f81df3282e1f67a7c22381ee9f72a1
MD5 c714f0dac964437025862d438621a9ff
BLAKE2b-256 ae8c55452d07c66da2793c1999f173c09599ff00bb57be4be367ffebe9e27ecb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.24.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2a4df4e64f031643c0f6ac20b1f1873b5431dd3c93577d596e4b56a46c730f00
MD5 71f52c8a8a8177967be423508c83fe3f
BLAKE2b-256 df65389b635fc527a5bad5140a7d9478b8c373097bd16a93b5d4eafeea54a1eb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.24.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f3c84370463c2b337720716aebec7f167df30b12ebdd95b7a96faa18f491d133
MD5 72d1fecd9e59de496760894a6607c69f
BLAKE2b-256 eea04f5ce83b14efd0c78398660a6e11ac30ee3b85989d06135a3caaa7c3fe5a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apexbase-1.24.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 10.4 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.24.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e42c8b458aab88f5960bac665d048c1896b25b22b68f89a3698d4bbe67284bc7
MD5 0c3ea620f1edd2aab07a67fc6c5aed9b
BLAKE2b-256 8f04d576c24ab9419ef95cb54a1559dbd930d1bdc5aa4133e7956a0a3d0f5960

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.24.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3851054fb2f16c92a4bd8856e47c4324651a878715701dd18a11daf1c5d52f3e
MD5 37675b724d65fb7575408a76507bc36d
BLAKE2b-256 cadb60db73e1c90c75a4cde5adcdb8a0f55d9d2d53225f3dc5f7544d209c0832

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.24.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c582e7066936564ca8f72eed348dc1aedc137ce491541105fe6a912a939ca44e
MD5 299fda385db5fa6af66acb5d8f622e02
BLAKE2b-256 90e06e321270c2c79a6b314eefeab768e27ff6853e8a03625ae6fd7dc7f6a02c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apexbase-1.24.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 10.4 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.24.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8a808e2e0ea744d16c77be9e52317192108a881bb869c1241d6f072b29fbe039
MD5 96e9400219252f39c1b1b8e02e4327d6
BLAKE2b-256 ec0f0e638d08fb3a3d56de706ade44b21526df383a4d2e36043b5ffcea276568

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.24.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d189a7a751a68f6ea1c6c9e85c5ca56adb6bfca0b621ab4c6d52ebec33834557
MD5 b816901af016ce1b60540a2b7e5ab1b3
BLAKE2b-256 df20011f8124f7ec8de2abb57163ffb15c53864de649060c10d16bb18ea53db0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.24.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4180fa820af16a278366d39bfd99bbaa73f1040c325d9831e0ababaee9a223ba
MD5 294c04779310430d7c9a7518e93b6759
BLAKE2b-256 99c73e20bba0846c519ade6625fc095e831b849c6ab59c6963a5ebcd767d9156

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apexbase-1.24.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 10.4 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.24.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 635a473a8af1ec023e828fe8fbe8ba7764a37ef97804870b2f20a70677212b44
MD5 152007f64129473af95d730fb5b268c0
BLAKE2b-256 159b188557bfe40e63d2097ecdebec917d776a54b40843d82bcbd29e4101ca7f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.24.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4cd4d91c7d0bfa0f9e122eb0a416c8f3efb4497c73fb74be37ab344b8b2235bf
MD5 f6afb75acfab63ae2c97b548ffd491d4
BLAKE2b-256 a269bd4e39594478e5be7c9d8de843f6b5a4be3db3d9a9a87a88f6ac48dd1d1e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apexbase-1.24.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a534ba6944b44827ff98dfa2fe9b4ce5fe5f426d71cd0d608f135f66c973fc26
MD5 75f3a57825aab85d2b66bf2ca89fd0a1
BLAKE2b-256 38df6589b5f1d53ac268150acb5c840379329e35e0f7dd312a077fce16685356

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

This release

1.24.0 This release

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