Skip to content

Instantly share code, notes, and snippets.

View RishabhVerma's full-sized avatar
🎯
Focusing

Rishabh Verma RishabhVerma

🎯
Focusing
  • New Delhi, India
View GitHub Profile
@RishabhVerma
RishabhVerma / Flask-Restful_S3_File_Upload.py
Last active November 3, 2021 01:41
Uploading a file to S3 while using Flask with Flask-Restful to create a REST API.
# -*- coding: utf-8 -*-
"""
An example flask application showing how to upload a file to S3
while creating a REST API using Flask-Restful.
Note: This method of uploading files is fine for smaller file sizes,
but uploads should be queued using something like celery for
larger ones.
"""
from cStringIO import StringIO
alice johnson,north america
liam smith,europe
noah brown,oceania
emma davis,africa
olivia wilson,asia
william garcia,south america
james martinez,europe
benjamin lee,asia
lucas perez,north america
henry thompson,oceania