A smart pot project carried out as part of a course at the Poznan University of Technology. The project will consist of four parts: ESP8266, API, Mobile App, Web Application and database. Docker will be used to containerise the whole application.
A smart pot api is a part of smart pot project which get data from ESP8266 about plant information. Also provides functionality about user like registration login etc. Some of endpoint have a authorization for example to get information about user plants.
- Clone the repository from GitHub (using HTPS):
git clone https://github.com/Maksymilian-Plywaczyk/Smart-Pot.git
- Create a virtual environment to isolate our package dependencies locally
python -m venv venv
source venv/bin/activate
or on Windowsvenv/Scripts/activate
- Install list of dependencies from
requirements.txt
pip install -r requirements.txt
- Create
.env
file using command:cp .env.template .env
and swapSECRET KEY
with yours Getting secret key. - Run the project using Docker configuration and you should see the docs in url http://127.0.0.1:8000/docs
- Feel free to use this API :)
In order to run the project in a docker container you must run a docker daemon
on your computer and then type command:
docker compose up --build
There are one container at this moment:
- Backend on port 8000 (name:
api
)
Container is configurated to work as development environment so every change in api will trigger auto reload container.
To get secret key, which you need to pass in .env
file you need to type in terminal that command and then copy this to .env
file:
openssl rand -hex 32
A list of all available endpoints in the API. This is the interactive documentation provided by Swagger.