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-1.1.0-py3-none-manylinux_2_31_x86_64.whl (926.0 kB view details)

Uploaded Python 3manylinux: glibc 2.31+ x86-64

File details

Details for the file eloqstore-1.1.0-py3-none-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for eloqstore-1.1.0-py3-none-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 dab06b3323783d892ae0f19bee9c8a2924bb7a27c9ebccf446eedcc2c6d6193d
MD5 b6762e2d81b3193b97564952a1e8f5f0
BLAKE2b-256 8f9db45662e5d1eaced55bb28a3ec9cc96c02e3d507235013751b67fa0ca8c78

See more details on using hashes here.

Provenance

The following attestation bundles were made for eloqstore-1.1.0-py3-none-manylinux_2_31_x86_64.whl:

Publisher: release.yml on eloqdata/eloqstore

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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