How to build the front end of a web app if you only know python?
Python web application - Stack Overflow
Lona - create full web-applications from a simple Python script
Why would you use python for web development?
How long does it take to build and deploy a Python web app with Reflex?
Do I need to know React or JavaScript to build interactive web interfaces with Reflex?
What's the main difference between Reflex and traditional frameworks like Django or Flask?
Videos
Suppose you want to create a web app that contains a dashboard with analytics that will serve thousands of users. It needs also user authentication, subscription models, payment and everything needed for SaaS service. You have just one month for the MVP.
You code in python so it’s easy to build the backend. But if you’re alone, what would you choose as front end?
Here’s a few options that I thought:
-
Use a Python template with Flask/Django (Soft UI dashboard)
-
Use streamlit framework
-
Learn a JavaScript framework (Next.js, React ?)
-
No-code tools (Bubble, Webflow)
Anything else? What would you choose?
If you don't need Django, try web.py
http://webpy.org/
import web
urls = (
'/(.*)', 'hello'
)
app = web.application(urls, globals())
class hello:
def GET(self, name):
if not name:
name = 'world'
return 'Hello, ' + name + '!'
if __name__ == "__main__":
app.run()
Sure! For example,
print 'Content-Type: text/plain'
print ''
print 'Hello, world!'
this is a web app -- if you save it into a file in an appropriate directory of a machine running a web server and set the server's configuration properly (depending on the server); the article I pointed to specifically shows how to deploy this web app to Google App Engine, but just about any web server can serve CGI apps, and this is a simple example thereof.
Of course, CGI has its limits, and you can use more sophisticated approaches (still short of a framework!) such as WSGI (also universally supported, if nothing else because it can run on top of CGI -- but in most cases you can also deploy it in more advanced ways) and possibly some of the many excellent utility components you can deploy with WSGI to save you work in coding certain parts of your apps.