google-app-engine

Request-Aware Code in Google App Engine — os.environ?

让人想犯罪 __ 提交于 2020-01-01 19:04:19
问题 In GAE, you can say users.get_current_user() to get the currently logged-in user implicit to the current request. This works even if multiple requests are being processed simultaneously -- the users module is somehow aware of which request the get_current_user function is being called on behalf of. I took a look into the code of the module in the development server, and it seems to be using os.environ to get the user email and other values associated to the current request. Does this mean

Config (PhpStorm 2017.2.3 + Google App Engine SDK PHP 1.9.57) Dir valid..?

假装没事ソ 提交于 2020-01-01 17:17:51
问题 I have a problem with the SDK. What can be the problem with the path, in D:\Google\Cloud SDK\google-cloud-sdk\bin are the files shown in the last print. I hope you can help me. Print: https://s26.postimg.org/d4spx9usp/print_de_pantalla_64.jpg Zoom Text: https://s26.postimg.org/aeje02y3t/print_de_pantalla_66.jpg Tree Dir SDK Install: https://s26.postimg.org/sstx42aeh/print_de_pantalla_65.jpg Version Google App Engine SDK PHP: https://s26.postimg.org/3pcuk2crt/print_de_pantalla_67.jpg 回答1: I

Config (PhpStorm 2017.2.3 + Google App Engine SDK PHP 1.9.57) Dir valid..?

六月ゝ 毕业季﹏ 提交于 2020-01-01 17:16:33
问题 I have a problem with the SDK. What can be the problem with the path, in D:\Google\Cloud SDK\google-cloud-sdk\bin are the files shown in the last print. I hope you can help me. Print: https://s26.postimg.org/d4spx9usp/print_de_pantalla_64.jpg Zoom Text: https://s26.postimg.org/aeje02y3t/print_de_pantalla_66.jpg Tree Dir SDK Install: https://s26.postimg.org/sstx42aeh/print_de_pantalla_65.jpg Version Google App Engine SDK PHP: https://s26.postimg.org/3pcuk2crt/print_de_pantalla_67.jpg 回答1: I

How to handle sessions

一笑奈何 提交于 2020-01-01 17:09:05
问题 I'm trying to build an app that is a Go backend, Angular front end, hosted on Google App Engine, that forces you to /login if you don't have a session or if your session's loggedIn != 1. I'm also trying to use the App Engine's app.yaml routing for almost everything. I'm not sure this is possible? Directory structure: /myapp/app.yaml /myapp/server/main.go /myapp/client/(ANGULAR) app.yaml (taken from: here ) application: myapp version: 1 runtime: go111 #api_version: go1 main: ./server - url:

appengine bulkdownloader to xml with nested entities

空扰寡人 提交于 2020-01-01 17:07:47
问题 I've got an appengine app with two simple kinds of entities - ParentEntity s and ChildEntity s. Each ParentEntity has a List of owned ChildEntity s. @PersistenceCapable public class ParentEntity { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private String name; @Persistent(defaultFetchGroup=true) private List<ChildEntity> children; ... With ChildEntity similarly defined. Now, I want to download all of my data from the datastore using the

How do I get an instance Id of app engine front server?

本小妞迷上赌 提交于 2020-01-01 16:56:37
问题 And is there a way to send a request directly to that server? 回答1: Actually there is a way and it can be useful for pushing new data out to all instances of an application. from google.appengine.api import modules instance_id = modules.get_current_instance_id() ref: GAE Modules Docs 回答2: For what purpose? If you want to test different versions, you can use traffic splitting https://developers.google.com/appengine/docs/adminconsole/trafficsplitting That is different versions though, and not a

Cloud Storage API requests from GAE - 403 Access not configured

做~自己de王妃 提交于 2020-01-01 16:51:24
问题 My GAE app is trying to manipulate files stored on Google Cloud Storage. The files are stored in the default bucket for my app. I already managed to read/write files to that bucket using the GCS Python Client Library (https://developers.google.com/appengine/docs/python/googlecloudstorageclient/). Unfortunately it does not support copy. Instead, I'm trying the JSON API with the API Client Library (https://google-api-client-libraries.appspot.com/documentation/storage/v1/python/latest/storage_v1

Get ImportError: No module named control when following google cloud endpoint tutorial

被刻印的时光 ゝ 提交于 2020-01-01 14:59:14
问题 I am following this tutorial on setting up cloud endpoints in python on googles app engine and keep on getting an import error ImportError: No module named control on the Generating the OpenAPI configuration file step when I input python lib/endpoints/endpointscfg.py get_swagger_spec main.EchoApi --hostname echo-api.endpoints.projectid.cloud.goog I followed these steps on a new account and still got this error. No idea what I am doing wrong/steps I am skipping. here is the traceback:

Deploy multiple applications from same project

◇◆丶佛笑我妖孽 提交于 2020-01-01 14:57:12
问题 How can I deploy multiple applications from same or different language/runtime originating from a single project in google cloud app engine? 回答1: Today, App Engine has a one-to-one correspondence with a Google Cloud Console project. You cannot deploy multiple "apps" in the same project. However, you might still be able to do what you want depending on your application(s). App Engine has the concept of "services," which are independent aspects of your application. Your App Engine app can have

Tipfy: How to display blob in template?

我们两清 提交于 2020-01-01 14:35:02
问题 Given is on gae using tipfy (python) the following model: greeting.avatar = db.Blob(avatar) What is the template-tag to display a blob (here image)? 回答1: In this case the blob is an an image, which is great. Just use images.get_serving_url(blob_key) and you're happy. I've used this function, and trust me, it is awesome for serving images. Just append =sxx to the url where xx is the pixel size you want. It automatically resizes the image and serves it. If the blob isn't an image, then you're