google-app-engine

Is it good to use Sharded Counter value as Entity ID to keep GAE Long ID short

随声附和 提交于 2020-01-06 02:42:07
问题 What is the viability of using a Long value generated by the GAE Sharded Counter code. In terms of having a unique Long id across datacenters? Why do I need to use the counter value as ID? GAE generates very long Long values as entity id, which in my app I need to have short ID's like the one generated by the Sharded counter at first. Question: Would the sharded counter at some point will generate the same value for a different request such that ID's might collide? 回答1: It is not viable since

has any easy way to get full url using python on gae

被刻印的时光 ゝ 提交于 2020-01-06 02:20:10
问题 this is my code: url = "/aa" result = urlfetch.fetch(url) but it will be error , because you have to get the full url , like this :http://digu.com so any easy way to get the full url in my code , thanks 回答1: Do you mean the full URL of your own app? You might want self.request.host (which would be eg digu.com) or self.request.host_url (which would be eg http://digu.com). See the documentation for the app engine Request class, and also the WebOb Request class it is based on. However, why would

Google App Engine Upload to TextArea (without the blobstore)

折月煮酒 提交于 2020-01-06 02:15:05
问题 I'm trying to get simple file reading in GAE python. I want to allow users to upload a csv file directly from their disk and have it display in a text field. I am having an outrageous amount of trouble doing so. Any help would be appreciated. I would prefer to avoid using the blobstore if possible. I don't want to save the data forever, I just want to use it to allow people to fill the textarea easily. Here's what my form looks like <div class = "section hidden" id ="file_choice"> <form

Google App Engine Upload to TextArea (without the blobstore)

杀马特。学长 韩版系。学妹 提交于 2020-01-06 02:14:07
问题 I'm trying to get simple file reading in GAE python. I want to allow users to upload a csv file directly from their disk and have it display in a text field. I am having an outrageous amount of trouble doing so. Any help would be appreciated. I would prefer to avoid using the blobstore if possible. I don't want to save the data forever, I just want to use it to allow people to fill the textarea easily. Here's what my form looks like <div class = "section hidden" id ="file_choice"> <form

python SAML in GAE

拈花ヽ惹草 提交于 2020-01-06 01:19:46
问题 Is there a library I can use to do a SAML authentication in App Engine using python? I've looked at pysaml2 which does say it's pure python implementation. However, it's using subprocess.Popen which cannot be used within App Engine and will fail at that point. 回答1: You can use python-saml on GAE if you use the flex environment with a custom runtime built off of the standard python27 runtime provided by google. I just got onelogin's python-saml flask-demo successfully working with this

Can't add servlet in Eclipse Google App Engine project

霸气de小男生 提交于 2020-01-05 23:34:49
问题 I'm trying to add a servlet to a web application in Eclipse but I can't because I have to chose a project in the project selection dropdown list and there is no proposal in it : The finish button stay disabled until a project is selected so I can't add my servlet. 回答1: In eclipse, When creating a new project that will contain servlets, you should create a Dynamic Web Project: If you've already created the project, you can right-click / Configure / Convert to Faceted Form / Dynamic Web Module.

Retrying a python App Engine pipeline

爱⌒轻易说出口 提交于 2020-01-05 22:30:28
问题 I have a client pipeline which needs to post a request to an external calculation server, then retrieve the results. The calculation takes some time, so the external server processes it in a task queue. The client pipeline isn't exactly sure when the results will be ready; instead it needs to poll the server (get_status(id)), then if status==Completed retrieve the results (get_results(id)) Problem is that occasionally the server calculation fails, in which case I need the client pipeline to

Unable to include Cloud Storage Tools library in App Engine

会有一股神秘感。 提交于 2020-01-05 22:18:44
问题 In my CodeIgniter project, I am unable to include the Cloud Storage Tools PHP library, as used in lots of example PHP code. I have put the following at the top of an Controller extension, but I get an error when trying to use "CloudStorageTools::createUploadUrl()" require_once 'google/appengine/api/cloud_storage/CloudStorageTools.php'; use google\appengine\api\cloud_storage\CloudStorageTools; This is the error: PHP Fatal error: Class 'CloudStorageTools' not found Is this library automatically

Unable to include Cloud Storage Tools library in App Engine

时光毁灭记忆、已成空白 提交于 2020-01-05 22:18:18
问题 In my CodeIgniter project, I am unable to include the Cloud Storage Tools PHP library, as used in lots of example PHP code. I have put the following at the top of an Controller extension, but I get an error when trying to use "CloudStorageTools::createUploadUrl()" require_once 'google/appengine/api/cloud_storage/CloudStorageTools.php'; use google\appengine\api\cloud_storage\CloudStorageTools; This is the error: PHP Fatal error: Class 'CloudStorageTools' not found Is this library automatically

Unable to include Cloud Storage Tools library in App Engine

允我心安 提交于 2020-01-05 22:18:00
问题 In my CodeIgniter project, I am unable to include the Cloud Storage Tools PHP library, as used in lots of example PHP code. I have put the following at the top of an Controller extension, but I get an error when trying to use "CloudStorageTools::createUploadUrl()" require_once 'google/appengine/api/cloud_storage/CloudStorageTools.php'; use google\appengine\api\cloud_storage\CloudStorageTools; This is the error: PHP Fatal error: Class 'CloudStorageTools' not found Is this library automatically