Google Cloud Datastore Python Client: Exclude Property From Index

Jan 12, 2019
exclude_from_indexes
from google.cloud import datastorekey = client.key('Person')item = datastore.Entity(key, exclude_from_indexes=('address', 'note'))item.update({    'name': 'Desmond',    'age': 10,    'address': 'Secret Lane',    'note': ''})# update exclude_from_indexes during runtimeitem.exclude_from_indexes.add('another_property')item.exclude_from_indexes = set(('address', 'note'))key = client.put(item)

References:

❤️ Is this article helpful?

Buy me a coffee ☕ or support my work via PayPal to keep this space 🖖 and ad-free.

Do send some 💖 to @d_luaz or share this article.

✨ By Desmond Lua

A dream boy who enjoys making apps, travelling and making youtube videos. Follow me on @d_luaz

👶 Apps I built

Travelopy - discover travel places in Malaysia, Singapore, Taiwan, Japan.