This is simple department web application for performing CRUD operations with database with employees and department
- Firstly, you need to install python. You can do it here: https://www.python.org/downloads/
- Then, you need to install pip. Pip installation guide: https://pip.pypa.io/en/stable/installation/
- It is strongly recommended to run this application in virtual environment. To create it, do the following steps:
pip install virtualenv
- installing package to create virtual environmentsvirtualenv {name of the virtual environment}
- creating virtual environment
Then, to perform further actions in created environment, type source {name of virtual environment}/bin/activate
in the command line
- The next step is set up the project environment. You can do it from command line in two ways
pip install -r requirements.txt
python setup.py install
To run the application you must run "run.py" file
You can perform CRUD operations through API(POST and PUT methods must include data in json format. Response is JSON) by following urls:
- /api/departments. Possible methods: POST, GET
- /api/department/{id of department}. Possible methods: POST, GET, PUT, DELETE
- /api/employees. Possible methods: POST, GET
- /api/employee/{id of employee}. Possible methods: POST, GET, PUT, DELETE
Also you can do same operations through /departments, /employees, /department/{id of department}, /employee/{id of employee} in browser.