r/Python • u/agrandiere • Jun 27 '17
Image upload and moderation with Python and Flask
https://medium.com/@antoinegrandiere/image-upload-and-moderation-with-python-and-flask-e7585f43828a13
2
u/rasof Jun 27 '17
I'm generally interested in the product but pushing it as a flask tutorial is some how a turn-down
-6
u/SirHoki Jun 27 '17 edited Jun 27 '17
Thank you for sharing this!
I've been meaning to start playing with Flask and this tutorial looks like an interesting use case.
8
u/redoubledit Jun 27 '17
Don't use this for learning flask
1
u/SirHoki Jun 27 '17
Do you have another recommendation of a tutorial I should follow? :)
2
u/bspymaster Jun 27 '17
I don't have any links on hand as I'm at work, but if I remember correctly, the flask website has some great beginner tutorials that I used when I was first starting off. I'd start there.
1
u/dAnjou Backend Developer | danjou.dev Jun 27 '17
How about the official one? And most times the sidebar of a subreddit also has useful information.
26
u/dAnjou Backend Developer | danjou.dev Jun 27 '17
FTFY ... obvious content marketing piece is obvious ... please be upfront about it. Flask is totally irrelevant and Python is only relevant because the HTTP API wrapping library is written in it.
I also had a look at the library. Its API is not very nice, it's basically one function that accepts one argument. This argument can be an HTTP URL or a file path. While the former is alright because it's passed through to their HTTP API the latter is problematic because I actually have to save the image to disk to get a file path (obviously, d'uh). This causes totally unnecessary I/O because in many cases I actually don't need to save it to disk for example when I want to send it to S3 to store it there.
Besides that, the code in general is really in need of a clean-up.