I'm looking to password-protect a clone of the Google Analytics Embed API website hosted on appspot.com and built in Node.js and Python. The github project for which is here.
Appspot doesn't let you run PHP on Python-based sites so PHP isn't an option for password-protecting the site. Is there another way I can password protect a web project like this?
Simply change the app.yaml configuration file to require "login: admin" on all handlers, described here.
Related
I am new to Python deployment. I have a Python Web API made in Flask. Want guidance on how to publish the python code as web API so that Dot Net program can consume it and take benefit of Python / ML.
Apologies for such generic question, but any help or approach or documentations on the same would be grateful.
Thanks In Advance!!!..
As far as I know, if you want to deploy python application to the IIS. I suggest you could follow below steps:
1.Install Python on your server.
2.Install wfastcgi on your server.
3.Install the IIS(contol panel->Programs->Programs and Features->Turn Windows Features on or Off) with the CGI
4.Create a new IIS web app for the paython project folder.
5.Modify the handler mapping to add python handler. Notice: Modify the path based on your python and wfastcgi path
Run your application
More details, you could refer to below article:
https://www.storehubs.com/Blog/deploy-python-flask-application-iis/
https://learn.microsoft.com/en-us/visualstudio/python/configure-web-apps-for-iis-windows?view=vs-2019
I have a webapp running on Python2.7 in Google App Engine's standard environment.
We'd like to host a wordpress blog for the app available at /blog - with nginx this would be quite easy using it as a reverse-proxy, but since we have no control over the routing for the google app engine project, I'm not sure of the best way to implement this.
For SEO reasons, we'd like to avoid a blog.example.com subdomain.
Does anyone have any experience of doing something similar?
Setup wordpress in App Engine by following these instructions, but edit the service name in the app.yaml so that it is a separate microservice:
https://github.com/GoogleCloudPlatform/php-docs-samples/tree/master/appengine/php72/wordpress
Then setup dispatch.yaml to route traffic to it:
https://cloud.google.com/appengine/docs/standard/python/reference/dispatch-yaml
This won't be possible unless the Wordpress blog is deployed as a separate App Engine service and dispatched accordingly.
I am pretty new Google app engine, and though I have hacked around with alot of languages, I am finding the google documentation a little overwhelming. I have successfully launched a static site, and successfully run some python code from the console. But I have not run any python from my static site.
I am a Small company trying to setup a google app engine static/dynamic website that I only want to expose to my Gsuite users.
I have some python code I want to run on my app engine, which will download a file from gdrive/teamdrive, process the file, create a new file from the results and then upload the resulting file to the same folder.
I may also at a later date have this static/dynamic website also interfacing with Cloud SQL(mysql) or an external database.
my Questions
What authentication method to use to only expose this website to my gsuite users?
Though I have worked through some of the GDrive api examples whats the best and easiest method of passing GDrive text files to my python code? (though I have hacked around with python lots in the past, the html and python combination perplexes me)
Thanks!
You would use OAuth2.0 to acquire a token which you can then use to interact with that user's files through the GDrive API (see "About Authorization" as well as this quickstart Python example).
I'm trying to work out if it is possible to use Google Apps Scripts inside Google App Engine?
And if there is a tutorial in doing this out there ?
Through reading Google's App Script site I get the feeling that you can only use app scripts inside Google Apps like Drive, Docs etc?
What I would like to do is to be able to use the Groups Service that is in GAS inside GAE to Create, delete and only show the groups that a person is in, all inside my GAE App.
Thanks
No you can't. AS and GAE are totally different things and won't work together.
What you can really do is (abstract):
write an AS that does what you need
redirect from GAE to the AS url to make sure that the user logs-in/grants permissions.
perform what you needed to do with AS
send back the user to GAE with a bunch of parameters if you need to
If you need GAE in Google Apps script, you can write a webservice in GAE using UrlFetch in Apps Script: https://developers.google.com/apps-script/service_urlfetch
To give you an example: I created an Apps Script to get report data (json) from an appengine webservice. This data is added to a google apps spreadsheet.
I just finished working on a GAE application in python to retrieve flight data and return the result to the calling URL.
I tested it in a browser at it works, but my Java ME application, which is able to retrieve data from other websites turns up nothing from the GAE app which is already hosted on GAE.
I know Google has some authentication issues, but does this apply to GAE apps as well, and what can I do?