{"id":27571,"library":"aerospike-py","title":"aerospike-py","description":"High-performance Aerospike Python client with sync and async APIs, built with PyO3 and Rust. Latest version 0.10.5; requires Python >=3.10. Active development with monthly releases.","status":"active","version":"0.10.5","language":"python","source_language":"en","source_url":"https://github.com/KimSoungRyoul/aerospike-py","tags":["aerospike","database","client","rust","async"],"install":[{"cmd":"pip install aerospike-py","lang":"bash","label":"Install via pip"}],"dependencies":[],"imports":[{"note":"Old pattern used in legacy 'aerospike' package; use direct class import.","wrong":"import aerospike\nclient = aerospike.client(...)","symbol":"AerospikeClient","correct":"from aerospike import AerospikeClient"},{"note":"In some earlier versions, policy classes were nested under 'policy'. Now flat in 'aerospike'.","wrong":"from aerospike.policy import WritePolicy","symbol":"WritePolicy","correct":"from aerospike import WritePolicy"},{"note":"put() expects policy as a named argument, not positional; also note that old api used 'bins' as list of tuples.","wrong":"client.put(key, bins, policy=WritePolicy())","symbol":"client.put","correct":"from aerospike import AerospikeClient\nclient = AerospikeClient(...)\nclient.put(key, bins)"}],"quickstart":{"code":"import os\nfrom aerospike import AerospikeClient, WritePolicy\n\nclient = AerospikeClient(\n    seeds=[(os.environ.get('AEROSPIKE_HOST', 'localhost'), 3000)],\n    username=os.environ.get('AEROSPIKE_USER', ''),\n    password=os.environ.get('AEROSPIKE_PASSWORD', '')\n)\npolicy = WritePolicy()\nkey = ('test', 'demo', 'hello')\nbins = {'name': 'World'}\nclient.put(key, bins, policy=policy)\nprint(client.get(key))\nclient.close()","lang":"python","description":"Connect, write, and read a record with default settings."},"warnings":[{"fix":"Use 'from aerospike import AerospikeClient' instead of 'import aerospike; client = aerospike.client(...)'.","message":"The import path changed from 'aerospike.client' to 'from aerospike import AerospikeClient' in v0.9.0.","severity":"breaking","affected_versions":"<0.9.0"},{"fix":"Upgrade Python to 3.10 or later.","message":"The library requires Python >=3.10. Installing on older Python versions will fail.","severity":"gotcha","affected_versions":"all"},{"fix":"Uninstall the old package: pip uninstall aerospike; then pip install aerospike-py.","message":"The old 'aerospike' package (C client) is not compatible. aerospike-py is a separate, Rust-based client.","severity":"deprecated","affected_versions":"all"},{"fix":"Always use keyword arguments for policies: client.put(key, bins, policy=my_policy).","message":"Policy objects must be passed as keyword arguments, not positional. E.g., client.put(key, bins, policy=WritePolicy())","severity":"gotcha","affected_versions":">=0.9.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Run: pip install aerospike-py","cause":"Old package name 'aerospike' vs new package 'aerospike-py'. Installing 'aerospike-py' gives module 'aerospike'.","error":"ModuleNotFoundError: No module named 'aerospike'"},{"fix":"Use 'from aerospike import AerospikeClient; client = AerospikeClient(...)'.","cause":"Using old import pattern 'import aerospike; client = aerospike.client(...)' which was removed.","error":"AttributeError: module 'aerospike' has no attribute 'client'"},{"fix":"Use 'seeds', 'username', 'password' directly: AerospikeClient(seeds=[...], username='...', password='...')","cause":"Old API where connection parameters were passed via 'policies' dict; now parameters are flat.","error":"TypeError: AerospikeClient.__init__() got an unexpected keyword argument 'policies'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}