Didn't see a lot of examples out there for this framework, so decided to create one.
We will be using Deta to deploy this API. It's very easy and free.
- signup for a free account, then install the cli and login.
- Clone this repo and
cd
into it. - run
deta new
Now wait about a minute (installing the dependacies takes some time). You will see a URL, this is the endpoint
- Display Hello World
- Map out endpoints we will need, comment what they will do
- Including CSS and JavaScript from the CDN
- To design our database, we create SQLAlchemy models
- See what yfinance provides
- forwardPE, forwardEps, dividendYield, 50 Day, 200 Day, Close
- SQLAlchemy create_all
- Background task to fetch info and add to db also
- Use Insomnia to test it
- Show added stocks in a table
- Filter boxes on UI
- Use SQLALchemy to filter in db
- Use query parameters to filter