}

Flask Index Page 1

flask example with POST API endpoint

In this tutorial, we are going to see how to create an API endpoint using flask. The endpoint will only accept POST request and it will use content-type application/json. Learn here how to create a minimal api rest with flask and python.

Flask Index Page 1

Flask abort with json example

In this short tutorial we show an example on how to return a json when using flask.abort: abort(jsonify(message="Message goes here"), 400). See alse an alternative using flask handlers to return a json.

Flask Index Page 1

Flask-Security error: AttributeError: 'NoneType' object has no attribute 'send'

Check here the solution of the flask-security error AttributeError: 'NoneType' object has no attribute 'send'. You need to configure flask-mail.

Flask Index Page 1

Flask: How to Test file upload

Example on how to test file upload using flask client. Check here how to do a request using the FlaskClient to simulare a file upload. You need to put a tuple in the request payload with the data types: (, ) ex. file': (StringIO('my file contents'), 'test_file.txt'). Check here for a full example

Flask Index Page 1

How to setup Flask with gunicorn and nginx with example

Follow this steps to configure flask application with gunicorn wsgi using nginx. We also extend the tutorial for load balance flask application using nginx. We will explain everything from installation to boot scripts for gunicorn.

Flask Index Page 1

Create an application with websockets and flask

In this tutorial we are going to explain how to create a webscokets application with python using flask.

Flask Index Page 1

Start a flask project from zero: Building a REST API

In this tutorial we explain how to build a REST API using flask. We try to create an environment similar to django (with management commands to migrate the database using flask).