Python App Engine API to interact with Google Code Project Hosting - python

Referencing Manage Google Drive files through App Engine, I have kind of the same question about App Engine w.r.t. Google Code Project Hosting, i.e., is there a Python API to interact with the latter using the former. Thanks!

It's possible to programatically upload files to a Google Code project, see the script at:
https://code.google.com/p/support/wiki/ScriptedUploads
What else were you looking to automate?

Related

Can python code be embeded into the google app script (Gmail add-on)?

I have python code that uses Gmail API for fetching unread emails and adding labels according to some rules.
The code runs on my computer and I wish to create a Gmail add-on for this labeling, the add-on should include a new button in the Gmail interface.
The problem is that Google add-on uses google app script.
I want to ask if there is a possibility to embed my python code into the google app script?
Thanks :)
You might use Python with Google Apps Script API to programmatically create and modify a Google Apps Script project, but the Google Apps Script uses V8 as it's runtime, and it requires JavaScript.
You might use Google Cloud Run (see https://cloud.google.com/run/docs/quickstarts/build-and-deploy/deploy-python-service) or another hosting infrastructure to use Python to use the Card Service to build the add-on user interface and use the Gmail API.
I think that it might be possible to use Google Colaboratory as the hosting infrastructure but I have no idea how convenient it will be compared to use Google Cloud Run.

What are the possible ways to automate uploading static files to GoogleAppEngine?

I've been googling for a solution for some time and tried a couple of ways to solve this.
In short:
I used the sample from https://cloud.google.com/appengine/docs/python/googlecloudstorageclient/getstarted to create my own uploader, but it dies on the error, mentioned here:
No api proxy found for service "app_identity_service" when running GAE script
So, from what I understand, the script needs to be uploaded to google app engine and run from there using App Engine console. But even if it's possible, how do I automate it ?
Or maybe there are other solutions I'm missing. I looked through appcfg.pya but didn't find such an option as well.
You are following a sample to upload from GAE to Cloud Storage. If your only goal is to upload files to Cloud storage, then simply use gsutil. You can easily script with gsutil, do streaming copy, copy full directories and rsync a file system.
Why you need GAE in your solution ?
Google App Engine allows you to easily upload static files and serve them but if you simply just want a place to store static files then Google Cloud Storage is the way to go. It's much easier to use the gsutil tool to automate uploading your content than deploying using the App Engine SDK. The infrastructure serving the Cloud Storage files is the same as App Engine so there's really no advantage to using App Engine's static files feature.
Also, If you need a way to set up a custom domain, index page, and/or error pages you may want to check out the guide on Configuring a Bucket as a Website.

Can one source code be deployed to Openshift, Heroku and Google App Engine at once?

As subject, is is possible with just one source code, we can deploy our code to Openshift or Google App Engine? Heroku is not necessarily in my case.
My application is using Python Flask + PostgreSQL 9.1. I love the easiness in Openshift when I configure my technology stack, but is the case will be same with GAE?
Thanks!
I work on Openshift and at this time I'm not aware of anything that will deploy your code to GAE and Openshift at the same time.
You might be able to write your own script for it.
PostgreSQL is not available on GAE, so this code will definitely not run there.

Is Google App Engine's Webapp Framework Open Source? Is it available outside GAE?

Google App Engine includes this minimal framework called "webapp". Google Code does not list a project page for webapp. The only documentation/information from Google on webapp is in the Google App Engine documentation. Is webapp not usable outside GAE?
You could use webapp outside App Engine - there's very little that's App Engine specific - but it's not designed for it, and thus isn't packaged or documented separately. If you want a webapp-like framework you can use anywhere, check out webapp2. It's a very close copy of webapp, with a lot of improvements and extensions. In fact, we (the App Engine team) like it so much it's the official replacement for Webapp on the Python 2.7 platform!

Do I need Google App Engine to make and run a Facebook App?

I set up the Google App Engine on my computer to work with Python , so I could make my first "Hello World" App at http://localhost:8080/. In the developers section of facebook it says I need Google App Engine and Python to test an app. But my question is, can I just host the files(the .yaml and the .py) on my server account instead(once I'm done testing)?
You do not specifically need Google app engine, that i believe is just a sample app. The main thing that you need is a globally accessible web server. So that FB can reach your pages/application from their servers. So depending on the language, get a small/free hosting account and test your application from there. Or you may also try Dynamic DNS to be able to reach your local machine from the outside world http://www.dyndns.com/services/dns/dyndns/
That example is written in Python and specifically targeted for Google App Engine. So, yes you do need Google App Engine to run that example without modification. However, almost any web hosting would suffice in general with your own application.

Categories

Resources