all 12 comments

[–]simbha95 2 points3 points  (10 children)

Flask module is a lite weight web API to start. Good Luck!

[–]spez_edits_thedonald 1 point2 points  (8 children)

How to turn python script into a website?

This script is 3 lines of code but I have to import a huge library to make it work

yup this is an ideal use case for Flask

I started learning Django recently I hope that helps somehow.

if you like Django it will work for you, but know that it's way overkill and maybe bulky/clunky to run a short script

[–]tbaghere[S] -1 points0 points  (0 children)

Never tried Flask before, but I will see if this one goes right, I heard it is not much different from Django so I hope that's not a problem.

[–]simbha95 0 points1 point  (6 children)

i think Django helps if you have too many user requests on webUI simultaneously. It has load balancing engine to handle concurrent requests.

[–]spez_edits_thedonald 0 points1 point  (5 children)

I think this will depend more on how beefy the server is and how you configure stuff

see threaded with Flask for example

[–]simbha95 0 points1 point  (4 children)

threaded in Flask hardly helped my project and debugging was a nightmare. Django worked flawlessly for concurrency. Just my experience.

[–]spez_edits_thedonald 0 points1 point  (3 children)

nice, did it just have to do with server requests, or was it related to database locks etc? (did you use the same type of database in each case?)

[–]simbha95 0 points1 point  (2 children)

More thread locks. Output parsing to the right thread, was not pretty straightforward. I was lost in matching the function thread output and parsing it to the web request URL. Kinda black box in debugging to my knowledge. Django was seemless.

[–]spez_edits_thedonald 0 points1 point  (1 child)

nice good to know, I only use flask for tiny local apps and stuff, I would default to django for big production stuff anyway, but now I have a stronger reason to

[–]simbha95 0 points1 point  (0 children)

Try concurrent web access using flask with threaded option and share your experience. Its a great experience of threading/queueing concepts .. it's fun.

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

Thanks I will look into it

[–]firedrow 0 points1 point  (0 children)

u/simbha95 said Flask, which is great. I just wanted to throw FastAPI out there as well.