I am using GAE long time but can not find what is maximum length of ListProperty.
I was read documentation but not found solution I want to create ListProperty(long) to keep about 30 values of long or more. I want use this field as filter - can I use it similar to StringListProperty?
What is size limits of ListProperty(long)?
@marcadian has a pretty good answer. There's no limit specifically on a ListProperty.
You do need to look at datastore limits on entities though: https://developers.google.com/appengine/docs/python/datastore/#Python_Quotas_and_limits
The two most obvious limits are the 1MB maximum entity size and 20000 index entries.
Depending on what's inside your list, it may vary. You can fit 130k 8-byte long's within that 1MB limit, but if they're indexed, you'll hit a barrier at 20k entries because of the index limit.
The worst bit is that these limits are on the total entity size, so if you have two lists in an entity, the size of one list could be limited by the what's in the other list.
I've a list of 20K strings (not indexed though). I don't think there is limitation on the length, but there is limitation on each entity size. Be careful on indexing multi value properties, it could be expensive.
30 will be fine.
Guido's answer about related question: https://stackoverflow.com/a/15418435/1279005 So up to 100 repeated values will be fine.
Repeated properties much easier to understand by using NDB as I think. You should try it. It's does not matter if you using it with Long or String properties - if the property is indexed you'll be able to filter by it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With