# \#python

**URL:** https://discuss.aerospike.com/tag/python/40.md

[Latest](https://discuss.aerospike.com/latest.md) · [Categories](https://discuss.aerospike.com/categories.md) · [Tags](https://discuss.aerospike.com/tags.md)

---

## [Aerospike.com Background query with a UDF Example Incorrect?](https://discuss.aerospike.com/t/aerospike-com-background-query-with-a-udf-example-incorrect/11317)

<div class="topic-metadata">

**Author:** [@DConway](https://discuss.aerospike.com/u/DConway)\
**Replies:** 2\
**Last updated:** [March 12, 2025, 8:40pm UTC](https://discuss.aerospike.com/t/aerospike-com-background-query-with-a-udf-example-incorrect/11317 "2025-03-12T20:40:51Z")

</div>

I’m trying to create a record UDF to run on an entire set and i was looking at this example: Apply a UDF | Developer The write\_policy = {'expressions': expr} line in the code appears unused. Is this just an oversight? s…

---

## [Searching for the index of specific AAID](https://discuss.aerospike.com/t/searching-for-the-index-of-specific-aaid/11046)

<div class="topic-metadata">

**Author:** [@Yash\_Mulchandani](https://discuss.aerospike.com/u/Yash_Mulchandani)\
**Replies:** 1\
**Last updated:** [May 2, 2024, 4:46am UTC](https://discuss.aerospike.com/t/searching-for-the-index-of-specific-aaid/11046 "2024-05-02T04:46:42Z")

</div>

Hi Folks, We are trying to fetch the index of data from the list without using the Full Scan on the record we will be having the AAID and we have to fetch the index of only that userId currently it is giving the index in…

---

## [How to add a bin with value to existing key](https://discuss.aerospike.com/t/how-to-add-a-bin-with-value-to-existing-key/2584)

<div class="topic-metadata">

**Author:** [@Mkrtich\_Soghomonyan](https://discuss.aerospike.com/u/Mkrtich_Soghomonyan)\
**Replies:** 3\
**Last updated:** [March 3, 2016, 5:44pm UTC](https://discuss.aerospike.com/t/how-to-add-a-bin-with-value-to-existing-key/2584 "2016-03-03T17:44:56Z")

</div>

Hi Is there a way to add a (bin, value) to existing key in atomic way. For example there is a key with data 'bin1': 'value1' and by doing something similar to client.add\_bin(key, ‘bin2’, ‘value2’) get 'bin1': 'value…

---

## [Get Aerospike hyperLogLog(HLL) intersection count of multiple HLL unions](https://discuss.aerospike.com/t/get-aerospike-hyperloglog-hll-intersection-count-of-multiple-hll-unions/10015)

<div class="topic-metadata">

**Author:** [@Sameer\_Darekar](https://discuss.aerospike.com/u/Sameer_Darekar)\
**Replies:** 20\
**Last updated:** [February 10, 2023, 6:44am UTC](https://discuss.aerospike.com/t/get-aerospike-hyperloglog-hll-intersection-count-of-multiple-hll-unions/10015 "2023-02-10T06:44:48Z")

</div>

Also posted to StackOverflow I have 2 or more HLLs that are unioned, I want to get the intersection count of that unions. I have used the example from here hll-python example Following is my code ops = \[hll\_ops.hll\_get…

---

## [Python pagination](https://discuss.aerospike.com/t/python-pagination/9632)

<div class="topic-metadata">

**Author:** [@Misutes](https://discuss.aerospike.com/u/Misutes)\
**Replies:** 6\
**Last updated:** [August 3, 2022, 10:56pm UTC](https://discuss.aerospike.com/t/python-pagination/9632 "2022-08-03T22:56:15Z")

</div>

Hi! I cant find a method which provide functionality for pagination. I use this syntax for select some bins from DB: scan = aerospike\_Client.scan(AEROSPIKE\_NAMESPACE, AEROSPIKE\_SET) results = scan.results(policy.compile…

---

## [Is there a way to get only a particular bin of a record in Python client?](https://discuss.aerospike.com/t/is-there-a-way-to-get-only-a-particular-bin-of-a-record-in-python-client/9240)

<div class="topic-metadata">

**Author:** [@abhinavkulkarni](https://discuss.aerospike.com/u/abhinavkulkarni)\
**Replies:** 2\
**Last updated:** [February 24, 2022, 4:20am UTC](https://discuss.aerospike.com/t/is-there-a-way-to-get-only-a-particular-bin-of-a-record-in-python-client/9240 "2022-02-24T04:20:27Z")

</div>

Hi, Is there a way to get only a specified bin for a record in Python client? import aerospike key = ('namespace', 'set', 'primary\_key') key, meta, bins = client.get(key) client.get has an optional parameter for read…

---

## [Unable to put data in aerospikeDB](https://discuss.aerospike.com/t/unable-to-put-data-in-aerospikedb/8758)

<div class="topic-metadata">

**Author:** [@Gokul](https://discuss.aerospike.com/u/Gokul)\
**Replies:** 1\
**Last updated:** [August 27, 2021, 7:16pm UTC](https://discuss.aerospike.com/t/unable-to-put-data-in-aerospikedb/8758 "2021-08-27T19:16:10Z")

</div>

Hi all, I am a newbie to aerospike. I am trying to put data into aerospike DB there are no errors but when I try to get the record I am getting record not found exception. Any leads would be really helpful, I am not sur…

---

## [Python code slow (10 seconds) vs go code fast (1 second) - help?](https://discuss.aerospike.com/t/python-code-slow-10-seconds-vs-go-code-fast-1-second-help/7987)

<div class="topic-metadata">

**Author:** [@Nadav\_Kremer](https://discuss.aerospike.com/u/Nadav_Kremer)\
**Replies:** 1\
**Last updated:** [November 7, 2020, 3:25pm UTC](https://discuss.aerospike.com/t/python-code-slow-10-seconds-vs-go-code-fast-1-second-help/7987 "2020-11-07T15:25:47Z")

</div>

Hi all, We are working with python and we want to start using aerospike. With the help of Aerospike we came up with a python code and go code that basically does the same but the python code is much much slower. Is there…

---

## [Install aerospike community server on Ubuntu 20.04](https://discuss.aerospike.com/t/install-aerospike-community-server-on-ubuntu-20-04/7908)

<div class="topic-metadata">

**Author:** [@Junus](https://discuss.aerospike.com/u/Junus)\
**Replies:** 3\
**Last updated:** [October 13, 2020, 10:39pm UTC](https://discuss.aerospike.com/t/install-aerospike-community-server-on-ubuntu-20-04/7908 "2020-10-13T22:39:03Z")

</div>

aerospike-server-community-5.2.0.2.ubuntu20.04.x86\_64.deb depends python package, but Ubuntu 20.04 support only python3 and when I’m trying to install deb package I’m getting an error: dpkg: dependency problems prevent…

---

## [Statistic rate tool](https://discuss.aerospike.com/t/statistic-rate-tool/4300)

<div class="topic-metadata">

**Author:** [@yaroni](https://discuss.aerospike.com/u/yaroni)\
**Replies:** 1\
**Last updated:** [June 25, 2017, 9:17pm UTC](https://discuss.aerospike.com/t/statistic-rate-tool/4300 "2017-06-25T21:17:44Z")

</div>

I have an application that use aerospike, and I need to write a tool that get read/sec,write/sec,delete/sec,total number of object in the in aerospike in memory database. I can do this task in python or c++ - although I …

---

## [How to setup setup private IP using VPC peering for AWS Aerospike instance?](https://discuss.aerospike.com/t/how-to-setup-setup-private-ip-using-vpc-peering-for-aws-aerospike-instance/7530)

<div class="topic-metadata">

**Author:** [@Nitin\_Tiwari](https://discuss.aerospike.com/u/Nitin_Tiwari)\
**Replies:** 2\
**Last updated:** [June 14, 2020, 7:19am UTC](https://discuss.aerospike.com/t/how-to-setup-setup-private-ip-using-vpc-peering-for-aws-aerospike-instance/7530 "2020-06-14T07:19:52Z")

</div>

Code is deployed in AWS Lambda and it’s connecting to aerospike instance(t2 large) using public IP with python client but it is taking around 1.2012 seconds, sometimes more time to connect. Please suggest the steps to s…

---

## [Python client write error - Node not found for partition](https://discuss.aerospike.com/t/python-client-write-error-node-not-found-for-partition/7507)

<div class="topic-metadata">

**Author:** [@Pradeep\_Banavara](https://discuss.aerospike.com/u/Pradeep_Banavara)\
**Replies:** 2\
**Last updated:** [June 11, 2020, 2:17am UTC](https://discuss.aerospike.com/t/python-client-write-error-node-not-found-for-partition/7507 "2020-06-11T02:17:36Z")

</div>

I have a 3 node Aerospike community cluster on AWS with the following config instance\_type - default = c5d.large cluster\_hosts\_per\_az - default = 1 partitions\_per\_device - default = 4 ( nvme volumes will automati…

---

## [How to perfrom query on multiple secondary indexes using python client?](https://discuss.aerospike.com/t/how-to-perfrom-query-on-multiple-secondary-indexes-using-python-client/7475)

<div class="topic-metadata">

**Author:** [@Nitin\_Tiwari](https://discuss.aerospike.com/u/Nitin_Tiwari)\
**Replies:** 2\
**Last updated:** [May 28, 2020, 7:15pm UTC](https://discuss.aerospike.com/t/how-to-perfrom-query-on-multiple-secondary-indexes-using-python-client/7475 "2020-05-28T19:15:22Z")

</div>

name and geometry both are indexed { ‘name’: ‘nitin’, ’ geometry’: ‘{“type”: “Polygon”, “coordinates”: \[\[\[77.6367329816338, 12.9156783\], \[77.6358329816338, 12.9154783\], \[77.6340329816338, 12.9156783\], \[77.634032981633…

---

## [Unable to install aerospike client python3 in Mac OSX Sierra (10.12)](https://discuss.aerospike.com/t/unable-to-install-aerospike-client-python3-in-mac-osx-sierra-10-12/4086)

<div class="topic-metadata">

**Author:** [@Rahul\_Parida](https://discuss.aerospike.com/u/Rahul_Parida)\
**Replies:** 4\
**Last updated:** [April 19, 2017, 10:34am UTC](https://discuss.aerospike.com/t/unable-to-install-aerospike-client-python3-in-mac-osx-sierra-10-12/4086 "2017-04-19T10:34:21Z")

</div>

Have an older version of aerospike client python installed (2.0.0) but getting error on upgrading. The output for the command sudo pip3 install --upgrade aerospike Collecting aerospike Downloading aerospike-2.0.12.ta…

---

## [Error 215 during Aggregation on Python Client](https://discuss.aerospike.com/t/error-215-during-aggregation-on-python-client/5421)

<div class="topic-metadata">

**Author:** [@lzuwei](https://discuss.aerospike.com/u/lzuwei)\
**Replies:** 1\
**Last updated:** [August 4, 2018, 1:36pm UTC](https://discuss.aerospike.com/t/error-215-during-aggregation-on-python-client/5421 "2018-08-04T13:36:45Z")

</div>

We encountered a problem when running map reduce on a large dataset with python client. The intention is to query on a secondary index then filter the records with a UDF to get an aggregate count on different status. Whe…

---

## [Sorted Maps in Python](https://discuss.aerospike.com/t/sorted-maps-in-python/3811)

<div class="topic-metadata">

**Author:** [@pgupta](https://discuss.aerospike.com/u/pgupta)\
**Replies:** 1\
**Last updated:** [May 31, 2018, 6:42pm UTC](https://discuss.aerospike.com/t/sorted-maps-in-python/3811 "2018-05-31T18:42:23Z")

</div>

Sample code for doing sorted maps in Python. import aerospike from aerospike import predicates as p def print\_result((key, metadata, record)): print(record) config = { 'hosts': \[ ("localhost", 3000), \] } client = a…

---

## [How to delete particular bins using PK value](https://discuss.aerospike.com/t/how-to-delete-particular-bins-using-pk-value/4788)

<div class="topic-metadata">

**Author:** [@Ashu](https://discuss.aerospike.com/u/Ashu)\
**Replies:** 3\
**Last updated:** [December 2, 2017, 6:30am UTC](https://discuss.aerospike.com/t/how-to-delete-particular-bins-using-pk-value/4788 "2017-12-02T06:30:39Z")

</div>

Hello I want to delete some bins with pk value. Ex: delete bin\_name from test.demo where pk=‘foo’ plz provide solution

---

## [UDF can not handle None?](https://discuss.aerospike.com/t/udf-can-not-handle-none/4751)

<div class="topic-metadata">

**Author:** [@SongYunSeop](https://discuss.aerospike.com/u/SongYunSeop)\
**Replies:** 6\
**Last updated:** [November 15, 2017, 5:34am UTC](https://discuss.aerospike.com/t/udf-can-not-handle-none/4751 "2017-11-15T05:34:50Z")

</div>

Hello. I tried to use UDF with Python Client. And I found a weird situation. I put data with None value. And I fetched data with query and UDF. as\_client = aerospike.client(AS\_CONFIG).connect() as\_bins = { "name": "…

---

## [How to create an unique index?](https://discuss.aerospike.com/t/how-to-create-an-unique-index/4548)

<div class="topic-metadata">

**Author:** [@Ashu](https://discuss.aerospike.com/u/Ashu)\
**Replies:** 3\
**Last updated:** [September 5, 2017, 4:21am UTC](https://discuss.aerospike.com/t/how-to-create-an-unique-index/4548 "2017-09-05T04:21:29Z")

</div>

Hello I am using python client,and i want to know how to create an unique index using aql or python client ThankYou

---

## [Use\_shared\_connection with shm and implicit shm\_key](https://discuss.aerospike.com/t/use-shared-connection-with-shm-and-implicit-shm-key/4471)

<div class="topic-metadata">

**Author:** [@tivvit](https://discuss.aerospike.com/u/tivvit)\
**Replies:** 1\
**Last updated:** [August 10, 2017, 4:50pm UTC](https://discuss.aerospike.com/t/use-shared-connection-with-shm-and-implicit-shm-key/4471 "2017-08-10T16:50:14Z")

</div>

Hi, we are connected to multiple clusters and we used shm\_key set by hand. We tried to not set shm\_key which by the documentation should be implicitly evaluated per unique hostname but we ended up with a connection to o…

---

## [TLS authentication using Python client](https://discuss.aerospike.com/t/tls-authentication-using-python-client/4120)

<div class="topic-metadata">

**Author:** [@JamieM](https://discuss.aerospike.com/u/JamieM)\
**Replies:** 0\
**Last updated:** [May 3, 2017, 10:46am UTC](https://discuss.aerospike.com/t/tls-authentication-using-python-client/4120 "2017-05-03T10:46:34Z")

</div>

I am trying to connect using the python client with TLS enabled. I can’t find any reference in the api documentation so any help would be appreciated. From command line I can connect like this aql --tlsEnable --tlsCaF…

---

## ['show indexes' equivalent of python client?](https://discuss.aerospike.com/t/show-indexes-equivalent-of-python-client/3886)

<div class="topic-metadata">

**Author:** [@Charuvind\_Atre](https://discuss.aerospike.com/u/Charuvind_Atre)\
**Replies:** 2\
**Last updated:** [February 27, 2017, 2:37am UTC](https://discuss.aerospike.com/t/show-indexes-equivalent-of-python-client/3886 "2017-02-27T02:37:20Z")

</div>

in aql, I can type show indexes to get all secondary indexes. is there a way for python client as well?

---

## [Python Client: drop secondary index?](https://discuss.aerospike.com/t/python-client-drop-secondary-index/3869)

<div class="topic-metadata">

**Author:** [@Charuvind\_Atre](https://discuss.aerospike.com/u/Charuvind_Atre)\
**Replies:** 3\
**Last updated:** [February 23, 2017, 6:47am UTC](https://discuss.aerospike.com/t/python-client-drop-secondary-index/3869 "2017-02-23T06:47:41Z")

</div>

how do I drop secondary index using python client?

---

## [Error while reading data from aerospike](https://discuss.aerospike.com/t/error-while-reading-data-from-aerospike/3407)

<div class="topic-metadata">

**Author:** [@dheeraj\_pande](https://discuss.aerospike.com/u/dheeraj_pande)\
**Replies:** 0\
**Last updated:** [September 16, 2016, 1:38pm UTC](https://discuss.aerospike.com/t/error-while-reading-data-from-aerospike/3407 "2016-09-16T13:38:34Z")

</div>

Hi, I am using python scripts to write and read data to aerospike. I am using python 3.5 and 2.7 both. If script in python 3.5 writes to aerospike and reading same key from script with python 2.7 is giving error. ClientE…

---

## [Aerospike secondary index query error](https://discuss.aerospike.com/t/aerospike-secondary-index-query-error/3344)

<div class="topic-metadata">

**Author:** [@Charuvind\_Atre](https://discuss.aerospike.com/u/Charuvind_Atre)\
**Replies:** 2\
**Last updated:** [August 29, 2016, 1:49pm UTC](https://discuss.aerospike.com/t/aerospike-secondary-index-query-error/3344 "2016-08-29T13:49:29Z")

</div>

I can’t understand as to why this error is occuring. Here’s my simple code: from \_\_future\_\_ import print\_function import aerospike from aerospike import predicates as p def print\_result((key, metadata, record)): pr…

---

## [Aerospike Python client Segmentation Fault](https://discuss.aerospike.com/t/aerospike-python-client-segmentation-fault/2748)

<div class="topic-metadata">

**Author:** [@Mangat\_Modi](https://discuss.aerospike.com/u/Mangat_Modi)\
**Replies:** 4\
**Last updated:** [March 30, 2016, 3:56pm UTC](https://discuss.aerospike.com/t/aerospike-python-client-segmentation-fault/2748 "2016-03-30T15:56:02Z")

</div>

I am reading a key from aerospike, modify value and write it again:- aerospike\_dca\_client.put(key,bin) ... ... bls\_key\_a = (AEROSPIKE\_NAMESPACE,SET\_NAME,bls\_key) hp\_bid\_str\_a = aerospike\_dca\_client.get(bls\_key\_a)\[3\]; …

---

## [Update map bin data without reading all data and writing back](https://discuss.aerospike.com/t/update-map-bin-data-without-reading-all-data-and-writing-back/2578)

<div class="topic-metadata">

**Author:** [@Mkrtich\_Soghomonyan](https://discuss.aerospike.com/u/Mkrtich_Soghomonyan)\
**Replies:** 1\
**Last updated:** [March 2, 2016, 11:24pm UTC](https://discuss.aerospike.com/t/update-map-bin-data-without-reading-all-data-and-writing-back/2578 "2016-03-02T23:24:44Z")

</div>

Hi, I have a record with a bin which has datatype map 'bin' : {'a':1, 'b': 2} Is there a way to call something like this? client.map\_update(key, 'bin', {'a': 3, 'c': 4} and get 'bin' : {'a':3, 'b': 2, 'c': 4} I …

---

## [Foreach hangs when underlying function throws an error](https://discuss.aerospike.com/t/foreach-hangs-when-underlying-function-throws-an-error/2535)

<div class="topic-metadata">

**Author:** [@Mkrtich\_Soghomonyan](https://discuss.aerospike.com/u/Mkrtich_Soghomonyan)\
**Replies:** 2\
**Last updated:** [February 22, 2016, 6:53pm UTC](https://discuss.aerospike.com/t/foreach-hangs-when-underlying-function-throws-an-error/2535 "2016-02-22T18:53:22Z")

</div>

Hi, the “foreach” function call hangs when the underlying function throw an exception. For example the following code without “print 1/0” part is working fine and prints stack trace and the first “key, bins” pair and exi…

---

## [How to save list in java and read it in python](https://discuss.aerospike.com/t/how-to-save-list-in-java-and-read-it-in-python/2494)

<div class="topic-metadata">

**Author:** [@tivvit](https://discuss.aerospike.com/u/tivvit)\
**Replies:** 2\
**Last updated:** [February 13, 2016, 4:59pm UTC](https://discuss.aerospike.com/t/how-to-save-list-in-java-and-read-it-in-python/2494 "2016-02-13T16:59:09Z")

</div>

Hi, I am wondering if I can save ArrayList in java client and read it from python. When i do this: and read the record from python I get segfault. In AQL I see binary data, so I suppose that the value is java serial…

---

## [How to get key in query](https://discuss.aerospike.com/t/how-to-get-key-in-query/2392)

<div class="topic-metadata">

**Author:** [@Mkrtich\_Soghomonyan](https://discuss.aerospike.com/u/Mkrtich_Soghomonyan)\
**Replies:** 1\
**Last updated:** [January 14, 2016, 5:27pm UTC](https://discuss.aerospike.com/t/how-to-get-key-in-query/2392 "2016-01-14T17:27:54Z")

</div>

Hi I’m trying to get records with key in a query. By doing the following I did not get the keys, they are coming as None(python client is used). q = c.query(namespace, set) q.where(aerospike.predicates.between('bin', 1,…

[Next page](https://discuss.aerospike.com/tag/python/40.md?match_all_tags=true&page=1&tags%5B%5D=python)
