(This repo is part of our Free Flask Tutorial)
This repo shows how to create a simple RESTful API using the Flask web framework. Among the included features, you'll see how to:
- Return custom status codes and headers ⚡️
- Create resources using POST requests 📬
- Deleting resources using DELETE requests 📭
- Test the application using Flask's test client 🔮
There's a detailed video lesson on how to perform the deploy in our Free Flask Tutorial.
$ git clone https://github.com/rmotr/flask-api-example.git
$ cd flask-api-example
$ mkvirtualenv flask-api-example
$ pip install -r requirements.txt
$ python run_app.py
# Step 3 requires a DB created
$ sqlite3 library.db < library-schema.sql
$ python run_app.py
$ make test