Rust Performance
Native binary via PyO3 — zero Python overhead on the hot path.
High-performance Aerospike Python client built in Rust — native performance, zero extra dependencies, full Sync & Async support.
pip install aerospike-pyBuilt for production workloads where every millisecond counts
Native binary via PyO3 — zero Python overhead on the hot path.
Both Client and AsyncClient. Works with FastAPI, Django, Gunicorn, and more.
Ships as a compiled wheel. No native C extensions to install separately.
PEP 561 compliant with bundled .pyi stubs. First-class IDE auto-complete.
Batch results directly as NumPy arrays — ideal for analytics workloads.
Use Client for synchronous workloads or AsyncClient for async frameworks like FastAPI, Starlette, and Django Channels — same API, both fully supported.
from aerospike_py import Client
with Client({"hosts": [("127.0.0.1", 3000)]}).connect() as client:
key = ("test", "users", "ada")
client.put(key, {"name": "Ada", "active": True})
record = client.get(key)
print(record.bins)
import asyncio
from aerospike_py import AsyncClient
async def main() -> None:
async with AsyncClient({"hosts": [("127.0.0.1", 3000)]}) as client:
await client.connect()
key = ("test", "users", "ada")
await client.put(key, {"name": "Ada", "active": True})
record = await client.get(key)
print(record.bins)
asyncio.run(main())