Skip to main content

Python SDK for EloqStore

Project description

EloqStore Python SDK

This directory contains the first Python SDK for EloqStore.

Status

The SDK is currently intended for local development and embedded usage. It wraps the repository's C API shared library, eloqstore_capi.

Build the shared library

From the repository root:

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --target eloqstore_capi -j8

The resulting library is typically:

  • build/libeloqstore_capi.so

Install the Python package

From the python/ directory:

pip install -e .

To build a distributable wheel that bundles libeloqstore_capi.so:

python -m pip install build
python -m build --wheel

The wheel build runs CMake against the repository root and embeds the resulting shared library under eloqstore/.libs/.

If the shared library is not in a default search location, point the SDK at it explicitly:

export ELOQSTORE_PY_LIB=/abs/path/to/libeloqstore_capi.so

Example

from eloqstore import Client, Options

client = Client(
    Options(
        store_paths=["/tmp/eloqstore"],
        table_name="example",
        partition_id=0,
        num_threads=1,
    )
)

client.put("hello", b"world")
assert client.get("hello") == b"world"
assert client.exists("hello")
client.delete("hello")
client.close()

Example scripts

Under python/examples/:

  • basic_usage.py: in-memory embedded usage
  • disk_persistence.py: local disk mode with reopen/persistence
  • ini_branch_usage.py: loading options from ini and starting a named branch

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eloqstore-0.1.0-py3-none-manylinux_2_39_x86_64.whl (33.1 MB view details)

Uploaded Python 3manylinux: glibc 2.39+ x86-64

File details

Details for the file eloqstore-0.1.0-py3-none-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for eloqstore-0.1.0-py3-none-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 e10cb9b24e2542ec1df35b5333e27b43ec95af78ffc722537f599605cf8ff2d2
MD5 d65d2a3766079dd00658e10598d58f88
BLAKE2b-256 55eb79782b03f5285b20c14ed2223c2108eb72f6da1e705fd8d63a038c40543a

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