Demo: Rocketry with FastAPI (and React)
This is a demo for creating a scheduler with an API. We use Rocketry for our scheduler and FastAPI for our API.
This contains three source files:
app/api.py
: FastAPI applicationapp/scheduler.py
: Rocketry applicationapp/main.py
: Main launch script
Add your tasks need to app/scheduler.py
and
modify app/api.py
as needed.
Installation
Clone this repository:
git clone https://github.com/Miksus/rocketry-with-fastapi.git
Make sure you have Python 3.7 or newer. Then just install the dependencies:
pip install -r requirements.txt
Running
python app/main.py
Front-end
For the front-end, download Node, npm and yarn. Then change to frontend directory to install the Node modules:
yarn install
Then start the server:
yarn start
What next?
Read more about Rocketry:
- Documentation: https://rocketry.readthedocs.io/
- Source code: https://github.com/Miksus/rocketry
Read more about FastAPI:
- Documentation: https://fastapi.tiangolo.com/
- Source code: https://github.com/tiangolo/fastapi
Read more about React:
- Documentation: https://reactjs.org/
- Source code: https://github.com/facebook/react
Author: Mikael Koli