google-app-engine

How to use Sublime's Text 2 build functionality with Google App Engine?

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-03 03:21:13
问题 Two actions I would like to do on Windows 7: update code on the server; validate the code. In order to do (1) I've created GAU update.sublime-build file with the following text: { "cmd": ["appcfg.py --oauth2 --insecure --skip_sdk_update_check update", "$project_path"], "path": "d:/Work/GAE/", "encoding": "cp1251", "shell": true } But I am getting the following error: ERROR appcfg.py:2161 An error occurred processing file '': HTTP Error 302: Found Unexpected redirect to https://appengine

Help with a AppEngine Handler Regex?

时光毁灭记忆、已成空白 提交于 2020-01-03 03:20:08
问题 I've been trying to design a Google AppEngine Python handler regex and haven't been too successful in getting it to work. I'm trying to handle API calls similar to OpenStreetMap's. My current regex looks like this: /api/0.6/(.*?)/(.*?)\/?(.*?) But when this comes in: /api/0.6/changeset/723/close It incorrectly groups 723/close and changeset , when I wanted it to group it into three things: changeset , 723 , and close . The last slash and group is optional, thus the /? . 回答1: Try this: ^/api/0

should I put the user in the ancestor path or separately?

徘徊边缘 提交于 2020-01-03 03:16:30
问题 My app should contain several users, each of them having a list of objects ( only one user own the object ). My question is : Would it be better to put an entity User that references the Ids of its objects, or should I put the user as the ancestor of the objects ? Please be kind, I am just beginning with nosql and datastore ! 回答1: What approach you take will depend heavily on your access patterns, what make sense for easy retrieval, frequency of writes etc. You start your design process by

Error creating REST request with Swift to Google app engine endpoint

对着背影说爱祢 提交于 2020-01-03 03:15:25
问题 I am try to make a request for my object using Swift for Google app engine endpoint, but am getting an error and I have tried to correct it but it won't just get passed. I am new to iOS development anyway. import UIKit class MainController: UITabBarController { var service : GTLRMyApiService? var myvalue: String? override func viewDidLoad() { if service == nil { service = GTLRMyApiService() service?.retryEnabled = true } let query : GTLRMyApiQuery_GetRates = GTLRMyApiQuery_GetRates.query()

How to connect from a pool of Google Compute Engine instances to Cloud SQL DB in the same project?

心已入冬 提交于 2020-01-03 02:55:10
问题 If I have a pool of Compute Engine instances (behind a load-balancer with a static IP), and I want to connect from Java apps on these instances to a Cloud Sql database in the same project, what's the way to about it? 1) These instances in the load balancer don't have static external IPs, so I can't authorize access to Cloud SQL by IP addresses. 2) "com.mysql.jdbc.GoogleDriver" is not available on Compute Engine, as it is on App Engine. 3) If I try to use the stock MySql JDBC driver, it doesn

How to rename or move a file in Google Cloud Storage (PHP API)

杀马特。学长 韩版系。学妹 提交于 2020-01-03 02:04:10
问题 I am currently trying to rename and/or move a cloud storage file to another name/position, but I can't get it to work. I am using https://github.com/google/google-api-php-client as client, the uploads works fine with: ... $storageService = new \Google_Service_Storage( $client ) $file = new \Google_Service_Storage_StorageObject() $file->setName( 'test.txt' ); $storageService->objects->insert( $bucketName, $file, array( 'name' => $filename, 'data' => file_get_contents( $somefile ) ) ); ... So I

Google App Engine (GAE) message.getContent() using javamail and IMAP not works

对着背影说爱祢 提交于 2020-01-03 01:46:08
问题 I have several days trying to get the contents of a message through IMAP on a Google App Engine Project. I managed to extract all the other information, but to extract the contents of jumps me an error message (not work even invoking message.getContent.tostring(), I've tried as MultiPart). I perform the same action from a normal project , (not GAE and using javamail.1.4.7), the content of the messages shown perfectly. This is the code of GAE project: import java.util.Properties; import java

google app engine fails using app engine:update and app cfg.sh, different errors

时光总嘲笑我的痴心妄想 提交于 2020-01-02 23:01:54
问题 My questions is in two folds: issue with app engine:update and with the app cfg.sh. I looked on the web and could not find any workaround or potential answer that could help me fixing this issue. My application is working with not much issue locally. Time now to give it a shot on production and upload it to google app engine. At first I tried doing this by using the 'app engine:update' from gradle (I'm using Android Studio). The execution failed with the following error message: "toolkit not

Google App Engine singletons (Python)

◇◆丶佛笑我妖孽 提交于 2020-01-02 19:46:29
问题 The standard way of doing singletons in Python is class Singleton(object): _instance = None def __new__(cls, *args, **kwargs): if not cls._instance: cls._instance = super(Singleton, cls).__new__(cls, *args, **kwargs) return cls._instance However, this doesn't work on App Engine, since there are may be many servers and we would get one instance per server. So how would we do it for an app engine entity? Something like: class MySingleton(db.models): def __init__(self): all = MySingleton.all()

Deploying With Ktor: How To Set AppEngine Version?

让人想犯罪 __ 提交于 2020-01-02 19:32:22
问题 Issue I've followed this clear and concise Ktor tutorial. Now that I have successfully deployed to AppEngine I would like to manually set the version of future deploys . Google's documentation of the appengine-web.xml file indicates the <version> tag can be utilized for this purpose, but also states that the <version> tag is unused for Cloud SDK based tooling . I attempted to set the tag and confirmed this value is not being used when deployed to AppEngine. Attempted Solutions Looked for way