Cloud apps and Google Drive - google-app-engine

I have an a application running on top of AppEngine, and all the data is on the cloud. For the user's point of view, it is like a Google Spreadsheet. The user can "open" a "file" representing his data, update and share. All data is stored at datastore, and not on a file itself. Is more like a google spreadsheet or google document than a jpg or dwg file. Is it possible to integrate with google drive and do some actions from drive interface, like delete, share or rename, making drive call my application? If no, are there any plans to do this kind of integration?
Cheers,
Mael

Check the Google Drive SDK to integrate your app with Drive: https://developers.google.com/drive/
The Java sample app is also running on App Engine: https://developers.google.com/drive/examples/java

is this http://code.google.com/p/gdata-python-client/ what you are looking for?
the gdata to connect other google services?
the "Google Documents List Data API" might be what you are after.

Related

Can we access DataStore from google apps scripts?

I would like to import data from flat files stored in Google Drive into DataStore. Then use the full-text search and other query options to analyze the data using apps-script.
The script API doc shows how we can access Google Drive data from the apps-script.
Now, is there any API in apps-script to access DataStore from the scripts?
Google provides a (beta) REST API to access your data. Steps to enable are here.
However, BigQuery is usually better for the type of analysis you describe. See:
https://developers.google.com/apps-script/advanced/bigquery
At this point in time, you should consider writing your own Web Service to get you access to the DataStore. You can then access that Web Service hosted in your App Engine application from your App Scripts. A detailed example is provided over here.
Additionally, the Cloud DataStore is now provided under the Google Cloud Platform and while it is still in preview, there is an API available to interact with the Datastore. This API is exhaustive and allows for both read and write operations. But keep in mind that it is currently under Preview.

Uploading images to Google platform

I am writing an Android application that allows users to upload and share photos. The server is based on Google App Engine. App Engine's datastore does not allow to save file, so currently I just have URLs saved. Looking for a way to store files I read about Google Cloud Storage. My question is - if I'm looking for a host for user uploaded files, is Google Cloud Storage what I'm looking for?
Yes. Google Cloud Storage is the way forward. There is also the BlobStore API on App Engine that allows you to store large amounts of information but the road map seems to be clear i.e. use Google Cloud Storage moving forward.
The reason for going with GCS will also be influenced that eventually you might want various tools or utilities that people have written that work directly with GCS. With Blobstore API, you will need to write those utilities yourself or rely on Admin console's support for taking backup,etc - which is not really much.
In summary, go with GCS.
Yes thats what you want. Says the same if you read the docs about google cloud storage.

Storing data in user's own Google Drive account

Is there a way to get Google App Engine to store data in the current user's own Google Drive account?
The reason behind this is that I want to write a couple of apps that users might not be happy to have stored in a Datastore / Cloud Storage solution that someone else has access to. One example is personal health information like weight and another one is bank account and transaction information.
If I could store it in the user's own google docs account then I wouldn't have access to it and would not be able to see it.
I have found these docs:
https://developers.google.com/appengine/docs/python/howto/usinggdataservices
but nothing equivalent for Java.
This doable by using the Google Drive SDK.
From there you can find DrEdit, which is a sample Google Drive app written in Java using the Google App Engine.

Recipe Needed to Upload Data to Google App Engine Datastore

While I've been busy finishing my Google App Engine solution during the last several months, I now find Google has me painted me into a corner due to changes and differences between the local dev_server and appspot.
The scenario: My app is deployed on appspot with Federated OpenID authentication.
The problem: Google does not support data uploads while apps are configured to use OpenID. (They are aware of this problem and do not consider it a bug.)
Several years ago Nick Johnson posted a remote_api and OpenID workaround on his blog, but several people report it no longer works.
In addition, the latest (2nd) edition of Dan Sanderson's book "Programming Google App Engine" no longer contains a chapter on data uploads. There is a chapter on Backup and Restore, but I can not restore data until I back it up, and I can not back it up until the data exists!
I can not believe I'm the only one in this predicament -- it seems it should be a very common need -- I simply need to upload data while my app uses OpenID.
Keep in mind that everything about my local dev_server Python app works great (appcfg.py, upload_data, remote_api, CSV yaml configs, etc.), but this problem on appspot prevents me from releasing my app!
Does anyone have a simple, up-to-date, and documented recipe to upload thousands of records to app engine? Custom upload handler endpoint? Bundle the data file(s) with new app verions, then read them somehow? Post CSV files to Google Drive and read them from a task queue?
Any ideas?
You can try this as a work around:
Create a new application with "normal" Google account authentication.
Upload the data into that application.
Backup the data into Google Cloud Storage.
Restore the date from Google Cloud Storage into the original application.
As of SDK 1.7.3 google says you can change the authentication method http://code.google.com/p/googleappengine/wiki/SdkReleaseNotes . You could always revert to "google accounts api" whilst doing you initial data load via remote api, then set auth back to Federated Login once your done.

Uploading and downloading the whole database from Google App Engine?

I just want to know if it is possible to download and upload the whole database from Google App Engine to a SQLite db, in case I want to transfer my app from Google App Engine to another server?
What is the chance?
Thank you!
There is a project called approcket that synchronizes Google App Engine datastore and a local MySQL database. Maybe you should have a look.
In a related answer, I linked to the documentation for the bulk loader tool.
However you will be more interested in the rest of the document, especially the section on creating an exporter class for exportation of the data.

Resources