Flask-restful todos

A simple todo API (Yes another one) made with Flask and Flask-restful

Installation

Activate the virtual environment with:

$ source env/bin/activate

Then install the dependencies with pip:

$ pip install -r requirements.txt

Set your database access in init.py

app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://<username>:<password>@localhost:3306/<db_name>'

Replace username by your database user password by his password and db_name by your database name.It must look like this:

app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://root:password@localhost:3306/db'

Open a python interpreter and create the tables:

>>> from app import db
>>> db.create_all()

Run the app

To run the app:

$ export FLASK_APP=app
$ export FLASK_ENV=development
$ flask run

Navigate to http://127.0.0.1:5000/todos/ and you're done.