config = {
'hosts': hostlist,
'max_socket_idle': 55
}
client = aerospike.client(config)
Previous versions
config = {
'hosts': hostlist,
'tls': {'max_socket_idle': 55}
}
client = aerospike.client(config)
- Improved the distribution of the client. Support files will be stored in the same location regardless of whether a binary or source wheel was the source.
- Changed installation of system Lua files:
The default location of the Lua files needed for stream UDF aggregation was moved from: /usr/local/aerospike/lua to the directory aerospike/lua inside of the Python installation directory for storing system dependent packages. This directory can be found by running: Python -c "import sys; print(sys.exec_prefix);" Or if the extension was installed via pip: pip show -f aerospike
By default the client will look for the system .lua files in /usr/local/aerospike/lua
we recommend either moving the files from aerospike/lua to that directory or specifying the path to those files in the client constructor.
If you did not specify an installation location, and Python -c "import sys; print(sys.exec_prefix);" returned /home/user/.virtualenvs/aerospike-py
This means that the system lua files are located in: /home/user/.virtualenvs/aerospike-py/aerospike/lua/ and that is the directory which should be specified in the constructor.
So if installing the Python client for Aerospike stored the data files in /home/user/.virtualenvs/aerospike-py/aerospike/lua
lua_config = {"system_path": "/path/to/lua_dir", "user_path": "/path/to/usr-lua-dir"}