This is a Flask web service application which manages bucketlists. It allows for multiple users to manage and view their personnal bucketlists. It implements token based authentication to manage security.
Clone the repo on github
https://github.com/kjagoo/Bucketlist
Install requirements
pip install -r requirements.txt
Create database bucketlist
manage.py
postgresql+psycopg2://[username]:[password]@localhost:5432/bucketlist
createdb bucketlist
python manage.py db init
python manage.py db migrate
python run.py
register new user
POST
- 127.0.0.1:5000/auth/register/
login
POST
- 127.0.0.1:5000/auth/login/
get list of all bucketslists
GET
- 127.0.0.1:5000/bucketlists/
add a bucketlist
POST
- 127.0.0.1:5000/bucketlists/
edit a bucketlist
PUT
- 127.0.0.1:5000/bucketlists/<id>
delete a bucketlist
DELETE
- 127.0.0.1:5000/bucketlists/<id>
get and display a specific bucketlist
GET
- 127.0.0.1:5000/bucketlists/<id>
add bucketlist item
POST
- 127.0.0.1:5000/bucketlists/<id>/items/
get a specific bucketlist item
GET
- 127.0.0.1:5000/bucketlists/<id>/items/<id>
edit and update a bucketlist item
PUT
- 127.0.0.1:5000/bucketlists/<id>/items/<id>
delete bucketlist item
DELETE
- 127.0.0.1:5000/bucketlists/<id>/items/<id>
Setup test environment by :
testmanage.py
postgresql+psycopg2://[username]:[password]@localhost:5432/testbucketlist
createdb testbucketlist
python testmanage.py db init
python testmanage.py db migrate
python testmanage.py db upgrade
python testmanage.py seed
register a new user
POST
- 127.0.0.1:5000/auth/register/
login using credentials after registration
POST
- 127.0.0.1:5000/auth/login/
get bucketlist and use the token provided passed as header
GET
- 127.0.0.1:5000/bucketlists/
add bucketlist
POST
- 127.0.0.1:5000/bucketlists/
get bucketlist
GET
- 127.0.0.1:5000/bucketlists/
add bucketlist item
POST
- 127.0.0.1:5000/bucketlists/
Joshua Kagenyi