Published in
Mar 12, 2021
FastAPI is a very cool open-source framework to construct API using Python. Its syntax is similar to Flask, so if you use it, you should not have any trouble learning it.
It is a relative new development (< 2 years), but it has already 27k stars on Github.
Bellow is a function that shows how to upload and save a file:
Note: to receive files, you should install the package python-multipart
.
If you will use the uploaded filename some how to your saved new file, remember to secure it.