0

i have a python script which should get input from an html page, then do some data processing based on data in an sqlite-database and return some data (maybe already producing the html).

what is the best light-weigt architecture and workflow to do that? i think django would be overkill, since it's should just will be a small app with little functionality.

however, i'd like to know how this is done best practice wise. should it be some sort of ajax calls to the python script on a server? who generates the html (js, or python?)? etc.

i just need some advice on how to get started. thanks in advance.

1 Answer 1

1

You could use Flask.

Flask is a microframework for Python based on Werkzeug, Jinja 2 and good intentions.

It is perfect for smaller projects and easy to use. Just take a look at the short Hello World code snippet:

from flask import Flask
app = Flask(__name__)

@app.route("/")
def hello():
    return "Hello World!"

if __name__ == "__main__":
    app.run()
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.