Skip to content

ViAchKoN/Projects-Python-ManageItemsApp

Repository files navigation

ManageItemsApp (Flask)


Description

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:

  1. User registration
  2. Authentication user by provided credentionals
  3. Creating new items
  4. Get the list of items which a user has
  5. Delete items from the list of items which user has
  6. Sending items via generating a unqiue link

Preparation

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

Launch

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published