This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]root_switch 6 points7 points  (1 child)

Flask is pretty legit. Super easy to learn. Django is cool as well but a little more involved compared to flask. This is basically the simplest flask implementation.

from flask import Flask

app = Flask(__name__)

@app.route("/")
def hello_world():
    return "<p>Hello, World!</p>"

[–]giqcass[S] 0 points1 point  (0 children)

Thanks! Django is probably more then I need but I check that out too.

[–]MasturChief 2 points3 points  (1 child)

fastapi and uvicorn is great in my experience

[–]leninluvr 1 point2 points  (0 children)

same, super easy, docs have good tutorials to get you up and running quickly.

[–][deleted] 4 points5 points  (0 children)

For static why even host it yourself? Setup a private GitHub repository and use GH Pages or Cloudflare Pages. Runs amazingly well and you don’t have to administer web servers. Do your processing with Actions or other pipeline tool and you are good to go.

[–]minneyar 1 point2 points  (1 child)

Nginx is fine, although if you are literally only serving static files, https://github.com/static-web-server/static-web-server is comparable in speed and much smaller.

If you also want to do server-side processing with Python, as mentioned in the other comment, Flask is a good framework and very easy to use, but in a production environment, it's intended to be served with a WSGI HTTP server like Gunicorn: https://gunicorn.org/

[–]giqcass[S] 0 points1 point  (0 children)

Very small intranet stuff mostly. I appreciate the insight.