Roles of Python in Google App Engine - python

I am a Trainee in a company learning Python. The company wants me to study Python and Google App Engine. I studied them both individually and even used Google App Engine to create Web application with Bootstrap and JavaScript.
However, I do not know how to use Python in Google App Engine. When or where I should used Python in Google App Engine? What is the role of Python in making a Web Application?

Python will act as a middleware between the front-end and the database usually serving as a Web Server (whose job is to handle requests) and an Application Server (whose job is to do the business logic and optionally add a security layer).
browser -> web-server(python?) -> app-server(python?) -> database -> browser
In small projects like a Flask App, Web Server and Application Server are the same. But this can run into scalability problems.
You said you already created a web application, how did you access it in the browser?
Instead of worrying about terminologies just try out some Hello World examples and things will be clear.

Related

Dispatching /Mapping URLS in python without using Flask

Back ground:
I bought a web hosting plan and created (by WordPress) a website. Now I want to create a new website on that server by python/flask but not WordPress because the standardized functions do not meet my requirements.
Problem description:
For testing purpose, I did not edit any Conf files or WSGI settings, just executed "python init.py" to start the new python web applications, in the backend, it showed app is running at http://:localhost:5000. But in the frontend, the web browser ended up waiting for response.
My web hosting provider had a look and they said Flask is not allowed for some security reasons.
My question:
I need to bind URLs to proper pages without using flask framework. Any suggestions and recommendations are welcome. Thank you very much for your help.

Python + Node.js on GAE

I have a Django application deployed on Google App Engine standard environment. I am interested in server side rendering of my JS frontend. Can I use node.js alongside Django on the same GAE? Maybe as microservice?
What you can do is to deploy each of your app as a separate service in App Engine and they will work independently as a microservice. To do so, make sure to set a service name for each of the app.yaml file of your apps:
service: service-name
Afterwards, you can communicate between your services through an HTTP invocation, such as a user request or a RESTful API call. Code in one service can't directly call code in another service.
Refer to this link for additional information about communicating between your services.
I have come across articles that talk about integrating python and Node but I personally haven't done it or seen it done on GAE.
If I were to take a stab, I think you would be looking at something like
Have the python app as a service (say it's available on python_service.myapp.appspot.com
Have your Node.js as your default service available on myapp.appspot.com
Your Nodejs will have a route and when this route is invoked, you make an http request to the python service, wait for a response and then your Nodejs app returns that response.
Our App, https://nocommandline.com is an Electron App (combo of Node.js & Vue.js) If you purchase a license and try to validate it, we make a call server side and our server side is Python based. It's not exactly the same thing you're looking at (since our App is not web-based) but this gives you an idea of what I was trying to describe.

Making django web application accessible from other machines without deploying to a cloud

I have a django web application and normally, it works on AWS but one of our customers wants to use this web application on localhost because of the security. Also he wants to use this application with more than one computer on the same host. How to make a roadmap for that without sharing source code?

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