This web application written on Flask is an API which allows registered user to manage abstract items. There are several functions which are builtin in the API:
- User registration
- Authentication user by provided credentionals
- Creating new items
- Get the list of items which a user has
- Delete items from the list of items which user has
- Sending items via generating a unqiue link
Important! Make sure that you have installed PostgreSQL database: http://www.postgresql.org/download/.
Create python virtual environment:
python3 -m venv /path/to/new/virtual/environment
Activate venv and install required modules:
pip install -r requirements.txt
Python script called init_db.py located in project's source can be used to generate database/database for tests
as well to delete all database data associated with this application.
To create an empty database use:
python3 init_db.py setup or setup_test
To delete created database and all associated data with this app, use the parameter teardown instead of setup:
python3 init_db.py teardown or teardown_test
Before starting the application it is required to apply migrations to create tables inside the database.
To do that use cd application to get inside the folder and then use:
flask db upgrade
Start app:
flask run
Swagger documentation can be accessed by url /
This application use jwt token for user authorization, that is why when using swagger copy jwt token generated by
url users/login into Authorizefield in the right upper conner.