google-cloud-datastore

Import Error: No module named 'google.cloud' on ApacheBeam

Import Error: No module named 'google.cloud' on ApacheBeam Question: I get an import error with importing apache beam’s google datastore api.I have one version of Python 3 installed on my Windows 10 64-bit system. Can somebody help me? I have try to solve it but i can’t # -*- coding: utf-8 -*- import apache_beam as …

Total answers: 4

Update one property of an entity in google cloud datastore python

Update one property of an entity in google cloud datastore python Question: How do I update only one property of an entity in the google cloud datastore, without remove all other properties? key = client.key(’employee’, ID) employee_to_deactivate = datastore.Entity(key) employee_to_deactivate.update({ ‘active’:False, }) this updates the active property to False, but removes all the other properties. …

Total answers: 3

How to not render a entire string with jinja2

How to not render a entire string with jinja2 Question: I’m building a blog from start for a homework assignment in Google App Engine in python and I’m using jinja2 to render my html. My problem is that like every blog when an entry is too long; the blog just renders a part of the …

Total answers: 1

What is the python for Java's BigDecimal?

What is the python for Java's BigDecimal? Question: In Java, when we program money it is recommended to use the class BigDecimal for money. Is there something similar in python? I would like something object-oriented that can have a currency and an exchange rate, has that been done? I store money as integers of cents …

Total answers: 1

Automatic deletion or expiration of GAE datastore entities

Automatic deletion or expiration of GAE datastore entities Question: I’m building my first app with GAE to allow users to run elections, and I create an Election entity for each election. To avoid storing too much data, I’d like to automatically delete an Election entity after a certain period of time — say three months …

Total answers: 4

How do I define a unique property for a Model in Google App Engine?

How do I define a unique property for a Model in Google App Engine? Question: I need some properties to be unique. How can I achieve this? Is there something like unique=True? I’m using Google App Engine for Python. Asked By: Alex Bolotov || Source Answers: There’s no built-in constraint for making sure a value …

Total answers: 2

How to fetch more than 1000?

How to fetch more than 1000? Question: How can I fetch more than 1000 record from data store and put all in one single list to pass to django? Asked By: Zote || Source Answers: You can’t. Part of the FAQ states that there is no way you can access beyond row 1000 of a …

Total answers: 16