Support UUID type
h1. Problem
If you use the UUID type in Python for the key you get the following (-2L, 'key is invalid', 'src/main/conversions.c', 747)
h1. Solution Extend conversion.c to include UUID support - this is a fairly standard way to get a UUID in python code.
h1. Workaround
Wrap the UUID in str, for example
foo = str(uuid.uuid1());
h1. Reproduce
Example code
import uuid
import aerospike
config = { 'hosts': [ "localhost", 3000) ] }
client = aerospike.client(config).connect()
foo = uuid.uuid1();
key = ("test", "hits", foo)
client.put(key, {"server": "foo"} )
UUID seems useful enough, but that module does have an str implemented so it would be trivial to wrap it in str() as follows:
foo = uuid.uuid1();
key = ("test", "hits", str(foo))
client.put(key, {"server": "foo"} )
Agree, that was the workaround that I included above.
This is simple, as long as we don't have to cast back to UUID. Whenever a read operation happens, and assuming the key policy is POLICY_KEY_SEND the value will be of type string.