google-cloud-datastore

How can I upload an thumbnail image (blob) at the same time as an Entity into a datastore in google app engine?

寵の児 提交于 2019-11-27 08:49:47
问题 I Just started using google app engine today, and I have fallen in love with endpoints. I made one very easily that will store an object in the datastore that just has a few string values. But I also want a small thumbnail image to go along with that datastore entity. I understand how to upload blobs from android using an HttpServlet. I was thinking of using the id of the datastore entity as the image's name in the blobstore, but I dont know how to connect the two events since I would upload

App Engine: Few big scripts or many small ones?

試著忘記壹切 提交于 2019-11-27 08:37:32
问题 I am working on a website that I want to host on App Engine. My App Engine scripts are written in Python. Now let's say you could register on my website and have a user profile. Now, the user Profile is kind of extensive and has more than 50 different ndb properties (just for the sake of an example). If the user wants to edit his records (which he can to some extend) he may do so through my website send a request to the app engine backend. The way the profile is section, often about 5 to 10

Best option for Google App Engine Datastore and external database?

吃可爱长大的小学妹 提交于 2019-11-27 08:06:30
问题 I need to get an App Engine app talking to and sharing data with an external database, The best option i can come up with is outputting the external database data to an xml file and then processing this in my app engine app and storing it inside the datastore, although the data being shared is sensitive data such as login details so outputting this to an xml file is not exactly a great idea, is it possible for the app engine app to directly query the database? or is there a secure option for

Any issues using multiple GAE app versions to get multiple apps to share the same datastore?

為{幸葍}努か 提交于 2019-11-27 08:05:06
问题 According to the research I've done (see for example this gae issue and this stack overflow question), it is not possible to share one datastore across two applications, and most folks recommend using either the RemoteAPI or using multiple "versions" of the same application, where each version is really an entirely different application. According to GoogleAppEngine Issue 1300, allowing multiple GAE applications to share the same datastore has been "accepted" which presumably means that this

Doing a “IN Array” query on google app engine datastore with golang

时光怂恿深爱的人放手 提交于 2019-11-27 07:50:56
问题 Is there a way to do a query with ids []int64 on datastore? I've tried the following with no avail. Errors out q := datastore.NewQuery("Category").Filter("Id IN", ids) Just gets me all the the categories in the datastore for _, id := range ids { q.Filter("Id =", id) } After icza's answer var keys []*datastore.Key for _, id := range ids { keys = append(keys, datastore.NewKey(c, "Category", "", id, nil)) } categories := make([]Category, len(keys)) err := datastore.GetMulti(c, keys, categories)

App Engine local datastore content does not persist

我的未来我决定 提交于 2019-11-27 07:44:50
问题 I'm running some basic test code, with web.py and GAE (Windows 7, Python27). The form enables messages to be posted to the datastore. When I stop the app and run it again, any data posted previously has disappeared. Adding entities manually using the admin (http://localhost:8080/_ah/admin/datastore) has the same problem. I tried setting the path in the Application Settings using Extra flags: --datastore_path=D:/path/to/app/ (Wasn't sure about syntax there). It had no effect. I searched my

How do I store the private key of my server in google app engine?

被刻印的时光 ゝ 提交于 2019-11-27 07:11:51
问题 I'm using "github.com/dgrijalva/jwt-go" to create JSON web tokens. When I hosted my server locally, I could use my private key as usual. But in GAE it won't work because I don't have access to the file system. How would you guys do it? Store the key in datastore or any other ideas? Thanks Edit: My app.yaml looks like this (below api_version and stuff): handlers: - url: /.* script: _go_app 回答1: On AppEngine you don't have access to the file system of the host operating system, but you can

Using gcloud-python in GAE

℡╲_俬逩灬. 提交于 2019-11-27 07:06:50
问题 I've got a bunch of little Raspberry Pis running some python code which saves directly to the Datastore (skips GAE) using the gcloud-python datastore package. This works great. I now want to present the data via web and mobile clients using Google App Engine. On my MacBook I installed GAE using the installer and gcloud via pip. I can write a simple python script and execute it directly from the terminal which is able to write and read from the datastore via gcloud - that also works just fine.

What does Google classify as a datastore write operation in Google App Engine?

若如初见. 提交于 2019-11-27 06:00:46
问题 Since GAE went to the pricing model at the start of last week I have been wrestling with exceeding my quota of Datastore read and write operations. I'm not sure whether Google counts all updates for one writer as one write or whether every column update is counted as a separate write. If the latter is true could I get around this by having one update function to update the 6 columns in the parameters or do will I also get charged for 6 updates? Here is my existing code, used to update a

Google App Engine: Memcache or Static variable?

佐手、 提交于 2019-11-27 05:38:14
问题 Well, I think I have a very basic doubt here: I'm developing an app on GAE (Java) and performing a query to the datastore that returns a lot of entities, so I need to cache it. I was using memcache and it was working great, but if I keep the list of entities in a static variable, the whole request goes as twice as fast than using memcache. I think that's because I'm not deserializing the entities all the time. What would be the drawback of using a static variable instead on memcache? I don't