Skip to main content

Aerospike Python Client - PyO3 + Rust binding

Project description

aerospike-py

PyPI CI Python Rust PyO3 License

Aerospike Python Client built with PyO3 + Rust. Drop-in replacement for aerospike-client-python powered by the Aerospike Rust Client v2.

Features

  • Sync and Async (AsyncClient) API
  • CRUD, Batch, Query/Scan, UDF, Admin, Index, Truncate
  • CDT List/Map Operations, Expression Filters
  • Full type stubs (.pyi) for IDE autocompletion

API details: docs/api/ | Usage guides: docs/guides/

Drop-in Replacement

Just change the import — your existing code works as-is:

- import aerospike
+ import aerospike_py as aerospike

config = {'hosts': [('localhost', 3000)]}
client = aerospike.client(config).connect()

key = ('test', 'demo', 'key1')
client.put(key, {'name': 'Alice', 'age': 30})
_, _, bins = client.get(key)
client.close()

Quickstart

pip install aerospike-py

Sync Client

import aerospike_py as aerospike

with aerospike.client({
    "hosts": [("127.0.0.1", 3000)],
    "cluster_name": "docker",
}).connect() as client:

    key = ("test", "demo", "user1")
    client.put(key, {"name": "Alice", "age": 30})

    _, meta, bins = client.get(key)
    print(bins)  # {'name': 'Alice', 'age': 30}

    client.increment(key, "age", 1)
    client.remove(key)

Async Client

import asyncio
from aerospike_py import AsyncClient

async def main():
    async with AsyncClient({
        "hosts": [("127.0.0.1", 3000)],
        "cluster_name": "docker",
    }) as client:
        await client.connect()

        key = ("test", "demo", "user1")
        await client.put(key, {"name": "Bob", "age": 25})
        _, _, bins = await client.get(key)
        print(bins)

        # Concurrent operations
        tasks = [client.put(("test", "demo", f"item_{i}"), {"idx": i}) for i in range(10)]
        await asyncio.gather(*tasks)

asyncio.run(main())

Performance

Benchmark: 5,000 ops x 100 rounds, Aerospike CE (Docker), Apple M4 Pro

Operation aerospike-py sync official C client aerospike-py async Async vs C
put (ms) 0.140 0.139 0.058 2.4x faster
get (ms) 0.141 0.141 0.063 2.2x faster

Sync performance is on par with the official C client. Async throughput is 2.2-2.4x faster — the official C client has no Python async/await support (attempted and removed).

Why async matters

The official C client supports async I/O internally (libev/libuv/libevent), but its Python bindings cannot expose async/await — the attempt was abandoned and removed in PR #462. The only concurrency option with the C client is asyncio.run_in_executor() (thread pool, not true async).

aerospike-py provides native async/await via Tokio + PyO3, enabling asyncio.gather() for true concurrent I/O — critical for modern Python web frameworks (FastAPI, Starlette, etc).

Full benchmark details: benchmark/ | Run: make run-benchmark

For AI Agents

This project supports the llms.txt standard. Use the following prompt to give your AI agent full context about aerospike-py:

Fetch and read https://kimsoungryoul.github.io/aerospike-py/llms-full.txt to understand the aerospike-py Python client API, then write code based on that documentation.
  • llms.txt — Documentation index for AI agents
  • llms-full.txt — Complete documentation in a single file

Contributing

See CONTRIBUTING.md for development setup, running tests, and making changes.

License

Apache License 2.0 — see LICENSE for details.

Project details


Download files

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

Source Distribution

aerospike_py-0.0.1a4.tar.gz (83.0 kB view details)

Uploaded Source

Built Distributions

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

aerospike_py-0.0.1a4-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl (2.8 MB view details)

Uploaded PyPymanylinux: glibc 2.28+ x86-64

aerospike_py-0.0.1a4-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl (2.6 MB view details)

Uploaded PyPymanylinux: glibc 2.28+ ARM64

aerospike_py-0.0.1a4-cp314-cp314t-manylinux_2_28_aarch64.whl (2.6 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.28+ ARM64

aerospike_py-0.0.1a4-cp314-cp314-manylinux_2_28_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

aerospike_py-0.0.1a4-cp314-cp314-manylinux_2_28_aarch64.whl (2.6 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ ARM64

aerospike_py-0.0.1a4-cp313-cp313t-manylinux_2_28_aarch64.whl (2.6 MB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.28+ ARM64

aerospike_py-0.0.1a4-cp313-cp313-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.13Windows x86-64

aerospike_py-0.0.1a4-cp313-cp313-manylinux_2_28_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

aerospike_py-0.0.1a4-cp313-cp313-manylinux_2_28_aarch64.whl (2.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

aerospike_py-0.0.1a4-cp313-cp313-macosx_11_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

aerospike_py-0.0.1a4-cp313-cp313-macosx_10_12_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

aerospike_py-0.0.1a4-cp312-cp312-manylinux_2_28_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

aerospike_py-0.0.1a4-cp312-cp312-manylinux_2_28_aarch64.whl (2.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

aerospike_py-0.0.1a4-cp311-cp311-manylinux_2_28_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

aerospike_py-0.0.1a4-cp311-cp311-manylinux_2_28_aarch64.whl (2.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

aerospike_py-0.0.1a4-cp310-cp310-manylinux_2_28_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

aerospike_py-0.0.1a4-cp310-cp310-manylinux_2_28_aarch64.whl (2.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

File details

Details for the file aerospike_py-0.0.1a4.tar.gz.

File metadata

  • Download URL: aerospike_py-0.0.1a4.tar.gz
  • Upload date:
  • Size: 83.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aerospike_py-0.0.1a4.tar.gz
Algorithm Hash digest
SHA256 76ae733f9e4667b7dae3a741c5587f74277af483b0f3b7afc49822c2f676189b
MD5 8403577485b01519113b084357941412
BLAKE2b-256 9c6954acc97420d6b1cd90c6c5b35017cc564503eba45f7d12271eb87e742897

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a4.tar.gz:

Publisher: publish.yaml on KimSoungRyoul/aerospike-py

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

File details

Details for the file aerospike_py-0.0.1a4-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a4-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2935c1b885d8b607ebc1d65d14f5f24ab370500279f554eba73f3b4341c3b886
MD5 98107fb384f95f0ef5811c051906b054
BLAKE2b-256 ce03c656a630881326d6fe4b92b3f998b855f5f440e5ab6c6c7a49b8c044576c

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a4-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl:

Publisher: publish.yaml on KimSoungRyoul/aerospike-py

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

File details

Details for the file aerospike_py-0.0.1a4-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a4-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e9305afe11bd2eab1629d1ce69055b0a6c7e0cf82ff193ff5a66e973a67fa18d
MD5 fa5b2d6520be98781900e67beb6b04bd
BLAKE2b-256 1373f15b64c50a5116fd983bc360e0393431481669b04e08d6a0f9206e234df6

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a4-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl:

Publisher: publish.yaml on KimSoungRyoul/aerospike-py

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

File details

Details for the file aerospike_py-0.0.1a4-cp314-cp314t-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a4-cp314-cp314t-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 da8da61a57110e49a56122c4b0fbdc99b494160ece493e48b0f51a1e9701c829
MD5 823a58843e9f463bfe5b04a77e3d3db9
BLAKE2b-256 cbdfc4d035d8e0c5288fe2b884d4d7d85ee32425156a876ea3e53141d2ec02f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a4-cp314-cp314t-manylinux_2_28_aarch64.whl:

Publisher: publish.yaml on KimSoungRyoul/aerospike-py

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

File details

Details for the file aerospike_py-0.0.1a4-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a4-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 205c044eb495df4a602f579591c6d0bd9477ae52fff3b3e364e86f77e01bc459
MD5 d21de3045ac97ef909d935605071d61f
BLAKE2b-256 36c029fe550e39b5ca024fc9cd8749b435a6d26e8b5626c8fc8e8c83c9f96d77

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a4-cp314-cp314-manylinux_2_28_x86_64.whl:

Publisher: publish.yaml on KimSoungRyoul/aerospike-py

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

File details

Details for the file aerospike_py-0.0.1a4-cp314-cp314-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a4-cp314-cp314-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 de6eb2a37c84698847cbf94a093454ba70ba19315e513eb549305bf13b23f998
MD5 b1648214395e5532da3185855df80d37
BLAKE2b-256 e3b1fd403803a1da51a2fd9151ece3f3fd06eefb90d930fcb1c8f6079391227f

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a4-cp314-cp314-manylinux_2_28_aarch64.whl:

Publisher: publish.yaml on KimSoungRyoul/aerospike-py

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

File details

Details for the file aerospike_py-0.0.1a4-cp313-cp313t-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a4-cp313-cp313t-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8ad6648f16f7ddd59f8fd17e59859f69b7da6adcf04a6331e66db8224f2f7098
MD5 7de4c5e2b952764aa866fda0c8dcd816
BLAKE2b-256 4b375fe252909bfb6b78af444c3c5e8777011b706da7c029aa7f2c1a5aad6879

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a4-cp313-cp313t-manylinux_2_28_aarch64.whl:

Publisher: publish.yaml on KimSoungRyoul/aerospike-py

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

File details

Details for the file aerospike_py-0.0.1a4-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 814054f53ef7e8c2e1b821a85529d5dd4e51fb9837cc6bfa8742a24b42d48f96
MD5 1049040597df7667651169916598e08a
BLAKE2b-256 3c3a883adc4eb58e8dae6f76410cc14e476b551386363d81fc23ac24e2e152cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a4-cp313-cp313-win_amd64.whl:

Publisher: publish.yaml on KimSoungRyoul/aerospike-py

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

File details

Details for the file aerospike_py-0.0.1a4-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a4-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 adf1aba50343480ac1af0ca0ac2953dab8bbd50325fc9a3e718d383996616e33
MD5 5e7521398fc06da784d3d84c3b650a9b
BLAKE2b-256 cd6c48f3bbac893cc19459464cb2bbf345622f0a48ba02c97cfeeab9021043d2

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a4-cp313-cp313-manylinux_2_28_x86_64.whl:

Publisher: publish.yaml on KimSoungRyoul/aerospike-py

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

File details

Details for the file aerospike_py-0.0.1a4-cp313-cp313-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a4-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ffd01c10df0f0dad302d5ce62b6c36f48744c06376649835946d54275a9fd8ae
MD5 025b373407838ff3ba84beb0036e46d1
BLAKE2b-256 217f4f13c2af0bb317a12f56355da225d5a65e8f982fcaae956bae5930cf32f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a4-cp313-cp313-manylinux_2_28_aarch64.whl:

Publisher: publish.yaml on KimSoungRyoul/aerospike-py

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

File details

Details for the file aerospike_py-0.0.1a4-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 013a4b62133b1d246bb477514c876e0e95b87396f2d75571b5839f8ca1db2585
MD5 a2a5c9a5312595306968cef8fad2d339
BLAKE2b-256 22c576a026b0d7bac2bbdd34d6a1eda308b0a37ee6d482037552782af1c2cd32

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a4-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: publish.yaml on KimSoungRyoul/aerospike-py

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

File details

Details for the file aerospike_py-0.0.1a4-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a4-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4ebe0732de4e5d009c53b6094374ceec71449ee5fab1300b69a47e8651b49322
MD5 e1e0d67e8432831b61ad7a2db429531d
BLAKE2b-256 a462dca17133968c5f69d19884e2841a3bf873641b6a359f98919c87463b2569

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a4-cp313-cp313-macosx_10_12_x86_64.whl:

Publisher: publish.yaml on KimSoungRyoul/aerospike-py

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

File details

Details for the file aerospike_py-0.0.1a4-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a4-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3a3d964c503280147a319152c78ed2455ed02038b22af5c0aa3c5c532a70ef3e
MD5 9ed0aa467c6474bb3f7cd8b5281d94ff
BLAKE2b-256 0fe670a77b124b62f6ffa7cd35bfae808f389eb4f01cfb9b30f988ac4599365e

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a4-cp312-cp312-manylinux_2_28_x86_64.whl:

Publisher: publish.yaml on KimSoungRyoul/aerospike-py

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

File details

Details for the file aerospike_py-0.0.1a4-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a4-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ff189524138bd9d87a053aea9ed3a3a666452770b49a0fdbeec7ecb9e3817ed1
MD5 b224db5541e169fca46ba3155bcef4f5
BLAKE2b-256 d21fb98eac40f65ebe75fa20158ded100d2f4e943570ee062d3ae1d8af46be45

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a4-cp312-cp312-manylinux_2_28_aarch64.whl:

Publisher: publish.yaml on KimSoungRyoul/aerospike-py

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

File details

Details for the file aerospike_py-0.0.1a4-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a4-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1306c9933b752b9b47f8b254a0fb5317923d4b1610383b3f36df77adfc02829f
MD5 047945328c4cce4b202977d6e21a328b
BLAKE2b-256 4caa20ef764639ee7ea93f93e897b30964ec8ae67add9d7b6a5652eb42e31155

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a4-cp311-cp311-manylinux_2_28_x86_64.whl:

Publisher: publish.yaml on KimSoungRyoul/aerospike-py

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

File details

Details for the file aerospike_py-0.0.1a4-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a4-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 c6eb71f3dc79ba221f4f331f86bf1357f351b498ac0694b0b8cf72ca3efe83f7
MD5 16447f7bed95b4e797b42b8fb1b6f927
BLAKE2b-256 171c755ccea405b3dcae9e232e829d53a050094e162eb4a349159932ec6b63d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a4-cp311-cp311-manylinux_2_28_aarch64.whl:

Publisher: publish.yaml on KimSoungRyoul/aerospike-py

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

File details

Details for the file aerospike_py-0.0.1a4-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a4-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 608c6a22b92bc9b02125f10a233bf1b7abf69eb543b384c7058ec487aff51b56
MD5 90daf65627b7383d74914506b94e3434
BLAKE2b-256 38117a16ba003fa9ca5748666f12457f8090791bc33b4affdb523fa6dbd7c99d

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a4-cp310-cp310-manylinux_2_28_x86_64.whl:

Publisher: publish.yaml on KimSoungRyoul/aerospike-py

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

File details

Details for the file aerospike_py-0.0.1a4-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a4-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 82f3fa466b13063c4c9898d8b60e2542ad90f12737f6b00668caecd0f5554bc6
MD5 1242a9067fb2581d09ed340c1b70c598
BLAKE2b-256 d7b643d8b59e414ecc03337b13485746087f8e9e483b605e8e6cfa1217b96789

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a4-cp310-cp310-manylinux_2_28_aarch64.whl:

Publisher: publish.yaml on KimSoungRyoul/aerospike-py

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