Best way to run Python web application locally

I am considering several options for the user interface of the application.

I want this application to be multi-platform (Windows, Linux, OSX), so one of the options that I considered was to develop it as a web application, but run it on a local server to gain access to the administrator privileges (which are required ) simple, web interface for my program.

I want to develop in python for convenience reasons.

Is it recommended to use Pylons for this task, and if so, what is the best way to run it in this setting?

+4
source share
2 answers

You can consider web2py . The structure itself is very easy to configure, learn, and use, and it provides an easy way to distribute your application as a binary file . The user simply unpacks it and launches it, and it will be launched as a stand-alone application in a browser on the user's computer. It even includes its own Python interpreter, so the user does not need to install Python (very useful on Windows, usually not installed Python). The built-in Rocket server will be more than enough to run locally (some even use it in production). You can also use Rocket with other frameworks. If you need help, ask the mailing list .

+2
source

Take a look at the micro webdevelopment Flask framework.
From docs :

from flask import Flask app = Flask(name) @app.route('/') def hello_world(): return 'Hello World!' if __name__ == '__main__': app.run() 

Just save it as hello.py or something similar and run it using your Python interpreter.

$ easy_install Flask
$ python hello.py
* Running on http://127.0.0.1►000/

+3
source

All Articles