Python API for Google Drive and Google Sheets - google-app-engine

This link gives the Sheets API for Java and .NET. Is there a reference for the same using Python, specifically Python in GAE?

For the Sheets API there's a note on the page you linked:
Note: The Spreadsheet service in Google Apps Script is more
powerful than this API, and now can be accessed via the Apps Script
Execution REST API. If you're not sure which API you need to use,
try Apps Script first.
At least the Apps Script Execution REST API has a Python guide.

Related

Is there a REST API for Google App Engine search?

I looked online at the documentation, but didn't see any mention of a REST API for search in Google App Engine's standard environment. The reason I ask is that I would like to migrate off of the standard environment into the flexible environment, but the GAE Search API is not offered there in Python (or any other language) AFAIK. Thus asking if there is a REST API available.
There is at this time no REST API for Google App Engine's Search API, it is only available for Java, Python and Go in the standard environment.
What you can do is separate the part of your application that calls the search API from the rest of your application and deploy it as a separate service that runs on the Standard environment, while the rest of your application is deployed as one or many services in the Flexible environment.
If that's what you want to do, you can get started by reading about Microservices Architecture on Google App Engine and when to use the flexible environment.

Google Cloud SQL Backend

I've started developing for GAE (Google App Engine) and I want to build a REST API using Google Cloud SQL. I currently have a web app in App Engine that works well with Google Cloud SQL but I need to build an API to provide REST services for Android and iOS or any other technology capable of consume web-services.
I've read many docs in Google about Mobile Backend Starter, Endpoints, etc. I'm not pretty sure how to integrate with my existing Cloud SQL Database. I think I'm almost near to get what I need.
If someone knows a tutorial or documentation to achieve what I need, please share it in here.
Thanks!
I've found what I needed!
If anyone tries to implement Google Cloud Endpoints using Google Cloud SQL, Python with Django, please follow this tutorial You will be able to build a RESTful API with your existing Django Models.
Also, here's a Youtube Video from GDL which explains very well how to use ProtoRPC for Python and build your Google Cloud Enpoints APIs. ProtoRPC is a framework for implementing HTTP-based remote procedure call (RPC) service.

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.

"Sample DB" for Google App Engine Datastore

MySQL has this Sample Sakila DB where we can start playing around with bunch of data already for our application, how about for Google App Engine/GAEJ is there something like this for the datastore?
I started recently to experiment with the Google App Engine and I was confronted with the same question. I was interested in a REST based app engine backbone which I could easily load/unload with data but couldn't find something to play around.
So I started to build up two projects on github which supports me in such kind of work.
clb-appEngineTemplate is a skeleton application for a Google App Engine Jave REST backend. It provides some sample code for a standardized REST API based persistency layer on Business Object level and can be easily extended (using Objectify and GSON).
clb-test which is a utility class which allows to load Test Data from Excel CSV file into your Google App Engine REST backend.
Both projects are maven based and allow me easily to define data objects which I can upload into the App Engine. Mainly I'm run them against the local test server, which serves me for initial testing.
I just released a first version and will incrementally extend over the next weeks.
AFAIK, there is no sample DB for GAE, probably because datastore write operations are expensive. There are demos bundled with GAE SDK. If you are using Eclipse you can import the samples to your workspace. Some of them involve datastore so you can run the application and add data yourself.
Another way is to use bulkloader to upload data at once using CSV files. But you can quickly run out of free quota for datastore writes.

GWT and Google Docs API

I'm using GWT to create a simply app that allows teachers to create easily their own lessons.
The App is going to be on Google App Engine but I want to store lessons in user's Google Docs space .
Is it possible?
As far as I know gwt transforms java into javascript but google docs api is java, do i have to upload the java library to de app engine storage?
any place to start? any advice?
Thanks...
You need server side proxy for GWT client.
Your GWT client communicates with the servlet. The servlet is the actual agent using the google docs API.
Please read my explanation at http://h2g2java.blessedgeek.com/2010/05/accessing-google-userservice-from-gwt.html.
It explains how to get a GWT client could communicate with a Java based Google API. It explains that since GWT requires all Java source involved to be available to the GWT compiler, there are cases that you simply cannot get GWT client to do the task directly.
http://h2g2java.blessedgeek.com/2009/08/tablemgr-gae-gwt-gdata-with-rpc.html similarly explains how to combine gae + gwt + google docs, using the proxy approach. The posting is quite old and therefore the web site it points to does not work anymore because I have not updated the gae app with google mandated authentication measures. But it should work on your local machine.
The above subscribes to a webserver flow paradigm.
However, Google APIs are essentially REST APIs, which allows you to access them directly using your javascript or GWT client. So, instead of using the Java docs for Google APIs, you need to read the Google REST API docs.
http://code.google.com/more/, among other whatnots, provides a list of all the Google cloud APIs. To avoid using the webserver-proxy flow paradigm, choose the javascript or REST version of the API docs.
Here is the google docs/data API:
http://code.google.com/apis/gdata/docs/client-libraries.html.
Choose the javascript API:
http://code.google.com/p/gdata-javascript-client/
I advise you to first practice using these APIs by coding in javascript. Then you would get a good grasp of what you need to do in GWT.
You should use the GWT API for authentication prior to accessing the Google REST APIs.
http://code.google.com/p/gwt-oauth2/.
Essentially, you are obtaining an authenticated token which your client could use to access Google's data thro their REST APIs.
FYI, REST APIs are, in plain speak, URLs in a defined specification, where data transmission is by convention mostly in JSON or XML.

Resources