Tagged Questions
6
votes
1answer
81 views
Can I restore a function whose closure contains cycles in Python?
I'm trying to serialise Python functions (code + closures), and reinstate them later on. I'm using the code at the bottom of this post.
This is very flexible code. It allows the serialisation and ...
-4
votes
1answer
22 views
How to deploy a django website on google app engine?
I have a website written in Django now I want to migrate to google app engine. What is the easiest way to deploy Django app on google app engine with minimal changes, my database is in postgresql. ...
0
votes
1answer
11 views
how to write cloud endpoints unittests with authentication?
I'm writing unittests (using webtest) for a Cloud Endpoints API written in python. One of these methods requires authentication. I've set USER_ID, USER_EMAIL and USER_IS_ADMIN with ...
0
votes
0answers
11 views
Google endpoints
I have a specific question about retrieving a query from an Endpoints model method in Python.
# DataPointModel GET LIST api method
@DataPointModel.query_method(query_fields=('user_key', ), # ...
0
votes
1answer
17 views
ndb Singleton Pattern
I'm doing an online store in appengine, and I'm creating a model that will hold the settings of the store in the db, the code looks something like this:
class StoreSettings(ndb.Model):
name = ...
0
votes
2answers
24 views
sending mails with GAE local enviroment
I can't find how to send emails in my local project without deploying.
I can't set the sender email, the method does nothing...
class MailHandler(BaseHandler):
def get(self):
message = ...
0
votes
1answer
21 views
Examples of Google Cloud Storage Used With Google App Engine (Python)
Anybody have any code examples for using google cloud storage with google app engine(python)?
The best I've seen so far is from an answer I received from a prior question I posted: ...
1
vote
2answers
44 views
Check if a key is a valid key for the current app id
Is there a way or a function to check if a key is a valid key for the current app id?
e.g.
key = fetch_urlsafe_key_from_external_source()
key = ndb.Key(urlsafe=key)
if not is_valid_key(key):
...
0
votes
0answers
10 views
CloudSearch : boolean query on a text field
ENV : webapp2 project with ndb database hosted on GAE
I have a properties document table which gets searched with the help of AWS cloud search using boto
Property models have these fields
city = ...
0
votes
1answer
24 views
Can't run coursebuilder in google app engine
It is really weird that after clicking run button, it does nothing and also no log and show a clock sign on the first column.
It works normally before. However, after I messed up my python ...
0
votes
0answers
28 views
How to show progress for a running google app engine task queue task?
I currently try to understand the task queue of google app engine (gae).
I have a problem which is very similar to this
Therefore I coded a small app according to the solution of "chachan".
So my ...
0
votes
1answer
16 views
Make calls to Drive API inside of a Google App Engine Cloud Endpoints
I am trying to build my own endpoints inside of an App Engine Application.
There is an endpoint API that needs to ask user for
"https://www.googleapis.com/auth/drive.readonly" scope.
It performs a ...
0
votes
0answers
29 views
ndb Models don't seem to be saved in Memcache
I've created two MapReduce Pipelines for uploading CSVs files to create Categories and Products in bulk. Each product is gets tied to a Category through a KeyProperty. The Category and Product models ...
-1
votes
1answer
25 views
AttributeError: 'MainHandler' object has no attribute 'create_login_url'
I have a question on google app engine. I copied this code directly from Google App Engine but somehow it did not work as expected. It always gave me the error :
...
-1
votes
0answers
18 views
Approaches for scalable, efficient delivery of new data on per-user basis [on hold]
I need to figure out a way to model the relationship between all users and all products in an efficient and scalable way.
The Scenario:
We're creating an app where a user can select a category, and ...
-1
votes
0answers
31 views
populating localdb with production db google app engine [on hold]
I'm doing a project with google app engine in python. So when I run it locally to test changes, is there a way to pull the database from production to local, so I don't have to populate it manually? ...
0
votes
0answers
37 views
GCS upload is realy slow from GAE
I have setup a simple python project on GAE, the user picks a file and it uploads into Google Cloud Storage. This all works fine, but I am getting an upload time of 10-11 seconds when I am uploading a ...
0
votes
1answer
18 views
Obtaining PhotoHunt code which is no longer on GitHub [on hold]
I'm looking to obtain the code for PhotoHunt python (and eventually js and android), however the page on GitHub is no longer found https://github.com/googleplus/gplus-photohunt-server-python Is there ...
0
votes
0answers
23 views
What Python library for sFTP works on Google App Engine? [on hold]
Google App Engine (GAE) supports outgoing FTP calls per this post. However, a commenter asking what library to use remained unanswered.
GAE does NOT support incoming sFTP streams per this post.
This ...
0
votes
2answers
29 views
Google datastore ID is a long unicode instead of an integer
Hello I am taking the web development from Udacity and experimenting google datastore in python and created a simple entity called Blog.
I checked the localhost:admin port, all the ids are like ...
0
votes
3answers
89 views
Getting Django 1.7 to work on Google App Engine
Can anyone help to point us to instructions on how to get Django >1.5 working on Google App Engine? I have seen a number of people claim they have Django 1.6 working. We'd like to get 1.6 or 1.7 ...
0
votes
1answer
30 views
Heroku or GAE better for the deployment of my application
Im new in web programming and python and i ve been building a web application for basic network analysis.
My app is running locally so far with flask microframework, but i want to check which ...
1
vote
0answers
13 views
blueimp jquery-file-upload: Deprecated Blobstore Files API used in write_blob()
It seems like the write_blob function (found here) uses the deprecated Files API from the Blobstore.
def write_blob(self, data, info):
blob = files.blobstore.create(
...
0
votes
1answer
21 views
How to write to cloudstorage using task chaining, The blobstore Files API did a nice job
Using the blobstore File API, I could write very very large blobfiles:
create a blobfile
read data from the datastore and write (append) to a blobstore file
pass the datastore page cursor and the ...
1
vote
1answer
18 views
Can a @classmethod modify the record it creates in GAE?
Updates to an entity within the @classmethod that created it are not reliably persisted in the datastore.
My create method is below. The parameter is the object to be persisted.
@classmethod
...
1
vote
1answer
33 views
How do I convert Python POST data to JSON?
I have the following code in Python:
def post(self):
example = self.request.get("example")
other = self.request.get("other")
How do I get all post data if unknown? I'm very new to Python ...
0
votes
1answer
13 views
Can't test datastore operations
I've been trying to test "reading a post from my blog" but looks like the datastore used by the handler is different than the one used by the test.
This is the test:
def test_read_handler(self):
...
0
votes
2answers
31 views
How do I duplicate an appengine app
I want to backup my python app and restore it to a different app on Appengine. In the Application Setting Page, under Duplicate Applications, I add a new application identifier.
When I click the ...
0
votes
2answers
29 views
Subdomain to specific rout app engine
I wanna make that a subdomain points to a specific url in my custom domain in app engine, just like this:
sub.domain.com => domain.com/sub
i'm using DomainRoute in my code and publish in production ...
-3
votes
1answer
29 views
Deploy Python Desktop Application to Web
folks.
I'm completely new to Pyhton development and i want to know some basic things.
I need to make a bot that access an API and want it to keep running on a server. I did some search and found ...
0
votes
3answers
47 views
How to get notified of Google App Engine Task Queue failure
I am using a GAE push Task Queue. I want the task to run once and if it fails I want it to notify me somehow. I also don't want it to do any retries. If it fails I want it to sit in the queue until I ...
0
votes
1answer
26 views
GQL query for a “db.ListProperty CONTAINS foo”?
With GQL, it is possible to run a query for entities that have a certain property with a value in some list foo.
foo = ['a']
bar = MyModel.gql('WHERE bar IN :1', foo).get().bar
bar == 'a'
#False
bar ...
0
votes
1answer
20 views
How to update content div from an external page without refreshing - GAE
Well, I'm developing an application in GAE with python and basically what I need is a way to emulate a chat in a many-to-one pages. The many pages can send messages to the single page.
I looked for ...
0
votes
0answers
21 views
Clean up after Map Reduce / Pipeline Job
I've create mapreduce pipeline in python that takes in a CSV file, stores it in the blobstore, creates/updates entities based on the input file contents, and produces a downloadable file with the ...
-1
votes
1answer
30 views
Deadline exceeded while waiting for HTTP response from URL: HTTPException
I'm developing an app to listen for twitter hash tags using tweepy. I have uploaded my app to Google App Engine and it's giving me below error.
Last line of Traceback:
File ...
-2
votes
0answers
20 views
Google App Engine OAuth2 webapp2 python
I'm migrating a project over to Google App Engine (for experimentation purposes as much as anything). I've got my own user database so I'm not looking to use any kind of third party OAuth as provided ...
0
votes
0answers
20 views
Changing an endpoint method's request message class doesn't update the method
I'm trying to update an endpoint which I have defined previously as follows:
class NestedMessage(messages.Message):
foo = messages.StringField(1)
MyResource = endpoints.ResourceContainer(
...
0
votes
1answer
29 views
Simultaneous Google Datastore and Blobstore Upload With Google App Engine (Python)
I currently have a python-based GAE site that has a signup form where users can input account details along with a profile image to register. Based on suggestions from SO, I'm going with a mix of ...
1
vote
1answer
23 views
Cloud SQL socket open failed with error: No such file or directory
I have a Django app on App Engine that connects to a Cloud Sql server.
Recently, some of the requests started to raise the following error from MySQLdb:
OperationalError: (2062, 'Cloud SQL socket ...
0
votes
0answers
29 views
Need a very simple GAE Channel API example [closed]
How do I trigger a JavaScript function on the client from a server script using GAE Channel API?
I have read through the following docs however I am not too familiar with Java or Python and found ...
0
votes
1answer
12 views
How to send back data to Chrome Extension from webapp2?
I have a Chrome Extension which sends data to Google App Engine(webapp2).
chrome.extension.onMessage.addListener(function (message, sender, sendResponse) {
if (message.paragraphs_ready) {
...
0
votes
1answer
44 views
Migrating from AppEngine files to cloudstorage
The files API has an unannounced downtime (ApiTemporaryUnavailableError) yesterday, that lasted for several hours.
We are now thinking about replacing the (now deprecated) files API with ...
0
votes
1answer
13 views
use dev_appserver.py for specific file in a directory
In order to start Google app engine through the cmd i use: dev_appserver.py --port=8080, but i can't figure how does it pick a file to run from the current directory.
My question is, is there an ...
0
votes
0answers
15 views
Does OAuth2WebServerFlow really need to be saved for every user?
On Using Google App Engine it suggests saving the flow object into memcache on a per-user basis:
it's normally best to store per-user Flow objects before the first
redirection. This way, your ...
0
votes
0answers
24 views
Google App Engine - using Google Cloud Storage in separate project, project has special characters in name
I am trying to read and write from a GAE (Python) app to GCS bucket in a separate project. The other project:
has billing set up
has granted write-access to the GAE app's service account on the ...
0
votes
0answers
63 views
__init__() takes exactly 1 argument (3 given) Google app engine
I have been uploading a new version of my app engine application and after uploading when I make a request I get this as a response:
__init__() takes exactly 1 argument (3 given)
Traceback (most ...
2
votes
1answer
53 views
ApiTemporaryUnavailableError
The ApiTemporaryUnavailableError is getting thrown for every single interaction made with the Files API. The only elaboration it provides is:
Files API is temporary unavailable. Request should be ...
1
vote
2answers
35 views
HTTPException: Deadline exceeded while waiting for HTTP response from URL
I have this code at the top of my Google App Engine program:
from google.appengine.api import urlfetch
urlfetch.set_default_fetch_deadline(60)
I am using an opener to load stuff:
cj = ...
0
votes
0answers
35 views
App Identity Python API is broken?
the following line of code crashes my appengine app on startup with a totally unexplained error:
authorization_token, _ =
...
2
votes
1answer
55 views
Upload Files To Google Cloud Storage With Google App Engine (Python)
I'm trying to set up a basic python-based google app engine site that allows users to upload files to google cloud storage (mostly images)
I've been going through the documentation for the JSON API ...