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.1a6.tar.gz (83.7 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.1a6-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.1a6-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl (2.6 MB view details)

Uploaded PyPymanylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.14tmanylinux: glibc 2.28+ ARM64

aerospike_py-0.0.1a6-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.1a6-cp314-cp314-manylinux_2_28_aarch64.whl (2.6 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.13tmanylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.13Windows x86-64

aerospike_py-0.0.1a6-cp313-cp313-manylinux_2_28_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

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

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

aerospike_py-0.0.1a6-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.1a6-cp312-cp312-manylinux_2_28_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

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

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

aerospike_py-0.0.1a6-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.1a6-cp311-cp311-manylinux_2_28_aarch64.whl (2.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

aerospike_py-0.0.1a6-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.1a6-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.1a6.tar.gz.

File metadata

  • Download URL: aerospike_py-0.0.1a6.tar.gz
  • Upload date:
  • Size: 83.7 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.1a6.tar.gz
Algorithm Hash digest
SHA256 2853721f9b69659e0a0e77e60f1f5f9987119afeec3cf575e4b5c9df8dac5c82
MD5 96384c75edf996889ad55be6a468a790
BLAKE2b-256 68c876d7ac330702d6fce74f57e2bd098c29e512b474d59a360b87e51bd4addb

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a6.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.1a6-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a6-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 67237ca4cb14b7f75d6459b641b00ec53e858fbae11212f2c417b1d6ec8bc206
MD5 70cefd29023215841968002e29c972aa
BLAKE2b-256 1f6e66ffd9f63c3d4b7bc695c84754f328c6af9160badd1b8da609bb37ac4ef7

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a6-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.1a6-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a6-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b36251f0dbdaacd6bd65753c28eb1f65bf0f7f2f442cbcb4c19f9474061caf5b
MD5 d5819a238ab349868b2556fe9f7df879
BLAKE2b-256 b4d29e80772536599070c1f8ac47c104ed0341ae0e8d8df0b5df686263da2cd4

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a6-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.1a6-cp314-cp314t-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a6-cp314-cp314t-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1a4368046351463ae12c422c22233d4dd554fa88373931540b56b32dbbd4c42c
MD5 53b0fc8129d9fe7b773b663687545978
BLAKE2b-256 ea4c3d287d2d8f9b3c3adf6239f0772a8a64dfdac7361ecb006d13bbd418d181

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a6-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.1a6-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a6-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 390e08635837804c42b0c04cf03bd1cfdf169cc2d25141ee0ac296b89f120bb7
MD5 148ee7950a0b0524875a879ead73e80f
BLAKE2b-256 ec62932c513f59299f64397877ef09a012b647a9d0e21ccf233f8ca94d0eae0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a6-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.1a6-cp314-cp314-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a6-cp314-cp314-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b389f45c03c66a778e2c6d4cd39df3337f47274a0c1eb2441bd56c73e66cebfc
MD5 aa5a68d1d131c7fe65b7e777949d6f22
BLAKE2b-256 6d6dbe9e89d18af9a06b72af3259d5672184f169991527645cc729c67e93bbf5

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a6-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.1a6-cp313-cp313t-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a6-cp313-cp313t-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 16efc22396303fcb3b01d4450787b069a19ce953d2ac3dbeb2373f1e931f7302
MD5 1162963a899f11cb35ac9112d6972d95
BLAKE2b-256 37c0aef3ac4c136a6d792cc485d49192ec2666d364b6b0a30d056319a44434f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a6-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.1a6-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a6-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 aca4ece9f326b6b0c0353e3287bc008e1a1bc5281716aac05c8d5584a076cb5c
MD5 849f7d50823d2395888fde1a24e7ad9d
BLAKE2b-256 31e6c06c52bd43a8869cce83864faaa90bdfe5b3affeada62fe0865c451106e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a6-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.1a6-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a6-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d7741707494527b507df36fc295dee5827cda9a87fbd50c0bcb99ff68d7174ae
MD5 f4008e1f287b53caec6cd6f054cc8ac5
BLAKE2b-256 1a9e3c8321f231c730eae48942b6fe62663c7604d11fa282c70c6be2f38ebe29

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a6-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.1a6-cp313-cp313-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a6-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 783b9316dadab9fa54d85e988a69f33c0b7814ab2feccaba7120122742daecb7
MD5 6f203e4d9c369dc25d9372ff641d7998
BLAKE2b-256 b03d720b7c3bb785299fc3e219e4fbd8ff6118ab9fcccb71a289217c6106f4ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a6-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.1a6-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a6-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fae4f3ad849e44b29831783fa2834a52f141861cf74329d6af6a1f4ce7a4b1d2
MD5 fafa20953e0caeec697c0a53cdb464cd
BLAKE2b-256 00deaa5813ca865cd0271cb7660fb95d6952f6d1ce700e40eddb44e7a361dfe3

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a6-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.1a6-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a6-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 72975fa5a400f74a67a93bcdeab70027029224c198486401224174994798edfc
MD5 e19b3c81015150fd3a3c6ec6ae4117bf
BLAKE2b-256 e31fdd974b96ef03e0d3df120a254913f2e773c5a02eaa82a1d1e62ac02e8c72

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a6-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.1a6-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a6-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d3ca36f7f0abadc7cf19e6f4a4002d75bbc174cf9bcc1485ed16a77fc016b27e
MD5 c816bb169a095bcf1275dfe0f061e5d0
BLAKE2b-256 a75570aae14f39bd3ac575d986744bc05b3410ec65da5d6da56c272e6f803066

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a6-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.1a6-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a6-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 d1b8dae518a8baab9f74301d0e1ad8f73c2eae43dfc6ba038eddd9a3af49439d
MD5 a72de62d921d9675bdfb8a8731a8218e
BLAKE2b-256 e39e4d997f907782d8924dec292a393237bc514f055bc059b267b75c8cda5357

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a6-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.1a6-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a6-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7b5b9515fd34375bf80251a66e583f6180ddca55a22573b39c395e2fd3144650
MD5 d467c129b739ba8dd58f194a3e1b61e8
BLAKE2b-256 1d6a7d72ccea4b73dc6a94bb14b510820a423e25597bea511d134eb08d0a45b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a6-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.1a6-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a6-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8f6e0ef1566d831670c710dcc03d14a71692a25d2d5bcffdda059b991e6e066c
MD5 8d54cfc2e3d3ef8ca699e65673f912bf
BLAKE2b-256 1e250fc00c3afe4cddf5f3268ca38c589eb68f59f48d1047a31e2ef86cf61b25

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a6-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.1a6-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a6-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 22f0760ad2efb8ed7e5675b8abcc07b4bc9d005e35d8c79aa2caba5088b9e015
MD5 235018ddb7cd2e22327930daf0ac03bd
BLAKE2b-256 c27eac43840e9d6e6c5e3c177e27429d167d0293286ebaf80bb8d4659defebaf

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a6-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.1a6-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for aerospike_py-0.0.1a6-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 3d98134cf3c2834ae1cf683920c00fad86b1b28a9b2e9f095e79bf7d8dd8ea8c
MD5 7e6b1bab2cb7de685da49a8b053b9670
BLAKE2b-256 d48fc9159478718f150a05ee180be64c6ca817bfe1953b53dade6e16f04bf44c

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerospike_py-0.0.1a6-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