Rust 성능
PyO3 native binary를 사용해 성능이 중요한 경로에서 Python overhead를 없앴습니다.
Rust로 구현한 고성능 Aerospike Python client — native 성능, 추가 Python dependency 없음, 완전한 Sync 및 Async 지원.
pip install aerospike-py매 millisecond가 중요한 production workload를 위해 설계했습니다.
PyO3 native binary를 사용해 성능이 중요한 경로에서 Python overhead를 없앴습니다.
Client와 AsyncClient를 모두 제공합니다. FastAPI, Django, Gunicorn 등에서 사용할 수 있습니다.
Compiled wheel로 배포하므로 native C extension을 따로 설치할 필요가 없습니다.
PEP 561을 준수하는 .pyi stub을 포함해 IDE 자동 완성을 지원합니다.
Batch result를 NumPy array로 바로 변환할 수 있어 analytics workload에 적합합니다.
동기식 workload에는 Client를, FastAPI, Starlette, Django Channels 같은 async framework에는 AsyncClient를 사용하세요. 두 client는 같은 API를 지원합니다.
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())