Home server done with FAST API
http://127.0.0.1:8000/docs
Usefull home functions gathered into a local API.
Scheduled functions are runned by schedul_trhead.py script.
They call certain FAST API functions that uses pushbullet to send notifications on your smartphone.
To be installed on a raspberry py for example
- run API server on VScode terminal:
source .venv/bin/activate
uvicorn main:app --reload
- run scheduler on a terminal:
python3.11 /home/pommi/FASTAPIHOME/schedul_thread.py
Send notifications to smartphones with pushbullet
- pip install fastapi
- pip install "uvicorn[standard]"
see: https://fastapi.tia[text](requirements.txt)ngolo.com/ - pip install pushbullet.py
- [NOT USED] pip install fastapi-utils
see: https://fastapi-utils.davidmontague.xyz/user-guide/repeated-tasks/
for task/function scheduling
pip install -r requirements.txt
pip freeze > requirements.txt
## set git user & mail
git config --global user.name jordy-Raspy
git config --global user.email [email protected]
virtual environment installation:
python3.11 -m venv .venv
activate venv:
source .venv/bin/activate
- https://nickgeorge.net/pydantic-sqlite3/
making SQLite3 and pydantic working together
- send messages with telegram API
- create a sheduled function to send these messages