ExpDev07 / coronavirus-tracker-api

🦠 A simple and fast (< 200ms) API for tracking the global coronavirus (COVID-19, SARS-CoV-2) outbreak. It's written in python using the 🔥 FastAPI framework. Supports multiple sources!
https://coronavirus-tracker-api.herokuapp.com
GNU General Public License v3.0
1.59k stars 320 forks source link

Added v3 router, new Source model, and 2 v3 endpoints #390

Closed hughie-coles closed 3 years ago

hughie-coles commented 3 years ago

This PR represents the following work:

Add a V3 router for my changes Add a new Source model that represents the aggregate root of my data Added the V3 sources and sources/{name} endpoints to retrieve the aggregate data.

The main purpose of this PR is to refactor the application to use the aggregate pattern. The intention is to simplify data access and storage by minimizing the number of entities that are directly accessed.

Kilo59 commented 3 years ago

If you are serious about contributing to the project I suggest reading up on FastAPI. Your endpoints don't take advantage of its features, it's written as if it were a Flask endpoint.

https://fastapi.tiangolo.com/tutorial/query-params/ https://fastapi.tiangolo.com/tutorial/dependencies/