This is the API for the Upsilon Workshop. It is a REST API that allows you to control the Upsilon workshop.
To install the API, you need to have a working installation of Python 3.9 or higher. You also need to have a working installation of pip.
It is recommended to use a virtualenv to install the API. This will allow you to install the API without affecting your system's Python installation.
To create a virtualenv, run:
pip install virtualenv
virtualenv envTo activate the virtualenv, run:
source env/bin/activateTo start, you need to install the dependencies. You can do this by running:
python -m pip install -r requirements.txtOnce you have installed the dependencies, you have to initialize the database.
python manage.py makemigrations workshop
python manage.py migrate workshopTo create a superuser, run:
python manage.py createsuperuserTo run the server, you can use the following command:
python manage.py runserverThis will start the server on port 8000. You can change this by writing:
python manage.py runserver 8080To run the tests, you can use the following command:
python manage.py testIf you want to use pytest, ensure that you have pytest-django plugin installed
and run the following command:
pytestYou can integrate pytest with your IDE (tested with VSCode) by adding Pytest configuration in your tests' configuration.
The API documentation is available at /docs/swagger-ui/ or /docs/redoc/.
You can also access the integrated API directly at the root of the server.
To import the API to Postman, you can give the following link: /docs/.
If you want to contribute to this project, you can do so by forking the repository and creating a pull request. If you want to discuss something, you can create an issue.