{"id":13424961,"url":"https://github.com/egbakou/coronavirus-tg-api","last_synced_at":"2025-03-26T08:30:47.623Z","repository":{"id":49712960,"uuid":"257404159","full_name":"egbakou/coronavirus-tg-api","owner":"egbakou","description":"API for tracking the global coronavirus (COVID-19, SARS-CoV-2) 🦠 outbreak in Togo. It's written in python using the FastAPI framework 🔥. Supports government source!","archived":false,"fork":false,"pushed_at":"2022-12-08T09:40:23.000Z","size":130,"stargazers_count":14,"open_issues_count":9,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T11:50:34.102Z","etag":null,"topics":["api","coronavirus","coronavirus-real-time","coronavirus-tracker","covid-19","covid19","deaths","fastapi","heroku","json-api","pip","pipenv","python","python3","recoveries","rest-api","webapp"],"latest_commit_sha":null,"homepage":"https://coronavirus-tg-api.herokuapp.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/egbakou.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"egbakou","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-04-20T21:08:20.000Z","updated_at":"2024-01-23T19:33:17.000Z","dependencies_parsed_at":"2023-01-25T06:00:55.668Z","dependency_job_id":null,"html_url":"https://github.com/egbakou/coronavirus-tg-api","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egbakou%2Fcoronavirus-tg-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egbakou%2Fcoronavirus-tg-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egbakou%2Fcoronavirus-tg-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egbakou%2Fcoronavirus-tg-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/egbakou","download_url":"https://codeload.github.com/egbakou/coronavirus-tg-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245618562,"owners_count":20645023,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","coronavirus","coronavirus-real-time","coronavirus-tracker","covid-19","covid19","deaths","fastapi","heroku","json-api","pip","pipenv","python","python3","recoveries","rest-api","webapp"],"created_at":"2024-07-31T00:01:01.282Z","updated_at":"2025-03-26T08:30:47.218Z","avatar_url":"https://github.com/egbakou.png","language":"Python","funding_links":["https://ko-fi.com/egbakou"],"categories":["Projects"],"sub_categories":["Open Source Projects"],"readme":"\u003ch1 align=\"center\"\u003e\n    Coronavirus Tg API\n\u003c/h1\u003e\n\nProvides up-to-date data about Coronavirus outbreak in Togo. Includes numbers about confirmed cases, deaths and recovered.\nSupport unique government source.\n\n![Travis build](https://api.travis-ci.org/egbakou/coronavirus-tg-api.svg?branch=master) [![License](https://img.shields.io/github/license/egbakou/coronavirus-tg-api)](LICENSE.md)\n[![GitHub stars](https://img.shields.io/github/stars/egbakou/coronavirus-tg-api)](https://github.com/egbakou/coronavirus-tg-api/stargazers)\n[![GitHub forks](https://img.shields.io/github/forks/egbakou/coronavirus-tg-api)](https://github.com/egbakou/coronavirus-tg-api/network/members)\n[![GitHub last commit](https://img.shields.io/github/last-commit/egbakou/coronavirus-tg-api)](https://github.com/egbakou/coronavirus-tg-api/commits/master)\n[![GitHub pull requests](https://img.shields.io/github/issues-pr/egbakou/coronavirus-tg-api)](https://github.com/egbakou/coronavirus-tg-api/pulls)\n[![GitHub issues](https://img.shields.io/github/issues/egbakou/coronavirus-tg-api)](https://github.com/egbakou/coronavirus-tg-api/issues)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Tweet](https://img.shields.io/twitter/url?url=https%3A%2F%2Fgithub.com%2Fegbakou%2Fcoronavirus-tg-api)](https://twitter.com/intent/tweet?text=COVID19%20Tracking%20API%20For%20Togo%20\u0026url=https%3A%2F%2Fgithub.com%2Fegbakou%2Fcoronavirus-tg-api)\n\n## Available data-sources:\n\nCurrently 1 data-source is available to retrieve the data:\n\n* **Togolese Government dedicated website for the covid19** - https://covid19.gouv.tg\n\n## API Reference\n\nAll endpoints are located at ``coronavirus-tg-api.herokuapp.com/v1/`` and are accessible via https. \n\nYou can open the URL in your browser to further inspect the response. Or you can make this curl call in your terminal to see the prettified response:\n\n```\ncurl https://coronavirus-tg-api.herokuapp.com/v1/cases | json_pp\n```\n\n### Swagger/OpenAPI\n\nConsume our API through [our super awesome and interactive SwaggerUI](https://coronavirus-tg-api.herokuapp.com/) (on mobile, use the [mobile friendly ReDocs](https://coronavirus-tg-api.herokuapp.com/docs) instead for the best experience).\n\nThe [OpenAPI](https://swagger.io/docs/specification/about/) json definition can be downloaded at https://coronavirus-tg-api.herokuapp.com/openapi.json\n\n### Technologies used for the project\n\n- Python3.8 / FastApi / Unicorn / =\u003e Language \u0026 Framework\n- Docker \u0026 Docker Compose =\u003e Dockerization\n- Heroku =\u003e Hosting\n- Travis =\u003e Build,Test, deploy, … (Github Actions soon)\n- Telegram API =\u003e Bot to receive Travis job result instead of email notification\n\n## API Endpoints\n\n### Cases Endpoint\n\nGetting total of confirmed cases, deaths, recovered and the last\nupdated date.\n\n```http\nGET /v1/cases\n```\n\n__Sample response__\n```json\n{\n  \"confirmed\": 99,\n  \"recovered\": 62,\n  \"deaths\": 6,\n  \"last_updated\": \"2020-04-27 11:12:00\"\n}\n```\n\n### Sources Endpoint\n\nGetting the data-sources that are currently available to Coronavirus Tg API to retrieve the data of the pandemic. Currently,the government website and the tracker api project.\n\n```http\nGET /v1/sources\n```\n\n__Sample response__\n```json\n{\n  \"government_website\": \"https://covid19.gouv.tg\",\n  \"tracker_api_project\": \"https://github.com/egbakou/coronavirus-tg-api\"\n}\n```\n\n### Confirmed cases Endpoint\n\nGetting confirmed cases data.\n\n```http\nGET /v1/cases/confirmed\n```\n\n__Sample response__\n\n```json\n{\n  \"confirmed\": 99,\n  \"last_updated\": \"2020-04-27 11:12:00\"\n}\n```\n\n### Recovered cases Endpoint\n\nGetting recovered cases data.\n\n```http\nGET /v1/cases/recovered\n```\n\n__Sample response__\n\n```json\n{\n  \"recovered\": 62,\n  \"last_updated\": \"2020-04-27 11:12:00\"\n}\n```\n\n### Deaths data Endpoint\n\nGetting number of deaths.\n\n```http\nGET /v1/cases/deaths\n```\n\n__Sample response__\n\n```json\n{\n  \"deaths\": 6,\n  \"last_updated\": \"2020-04-27 11:12:00\"\n}\n```\n\n### __Response definitions__\n\n| __Response Item__ | __Description__                                              | __Type__ |\n| ----------------- | ------------------------------------------------------------ | -------- |\n| {cases}           | total of confirmed cases, deaths, recovered and the last updated date. | Object   |\n| {cases}/confirmed | The up-to-date total number of confirmed cases               | Integer  |\n| {cases}/deaths    | The up-to-date total number of deaths                        | Integer  |\n| {cases}/recovered | The up-to-date total number of recovered                     | Integer  |\n| {sources}         | Data-sources used to provide data                            | Object   |\n\n\u003e We strongly recommend using the endpoint /v1/cases instead of using the endpoints returning each case.\n\n## Wrappers\n\nNo wrapper at the moment.\n\n## Prerequisites\n\nYou will need the following things properly installed on your computer.\n\n* [Python 3](https://www.python.org/downloads/) (with pip)\n* [pipenv](https://pypi.org/project/pipenv/)\n\n## Installation\n\n* `git clone https://github.com/egbakou/coronavirus-tg-api.git`\n* `cd coronavirus-tg-api`\n\n1. Make sure you have [`python3.8` installed and on your `PATH`](https://docs.python-guide.org/starting/installation/).\n2. [Install the `pipenv` dependency manager](https://pipenv.readthedocs.io/en/latest/install/#installing-pipenv)\n   *  with [pipx](https://pipxproject.github.io/pipx/) `$ pipx install pipenv`\n   * with [Homebrew/Linuxbrew](https://pipenv.readthedocs.io/en/latest/install/#homebrew-installation-of-pipenv) `$ brew install pipenv`\n   * with [pip/pip3 directly](https://pipenv.readthedocs.io/en/latest/install/#pragmatic-installation-of-pipenv) `$ pip install --user pipenv`\n3. Create virtual environment and install all dependencies `$ pipenv sync --dev`\n4. Activate/enter the virtual environment `$ pipenv shell`\n\nAnd don't despair if don't get the python setup working on the first try. No one did. Guido got pretty close... once. But that's another story. Good luck.\n\n## Running / Development\n\nFor a live reloading on code changes.\n\n* `pipenv run dev`\n\nWithout live reloading.\n\n* `pipenv run start`\n\nVisit your app at [http://localhost:8000](http://localhost:8000).\n\nAlternatively run our API with Docker.\n\n### Running Tests\n\u003e [pytest](https://docs.pytest.org/en/latest/)\n\n```bash\npipenv run test\n```\n\n\n### Linting\n\u003e [pylint](https://www.pylint.org/)\n\n```bash\npipenv run lint\n```\n\n### Formatting\n\u003e [black](https://black.readthedocs.io/en/stable/)\n\n```bash\npipenv run fmt\n```\n\n### Update requirements files\n\n```bash\ninvoke generate-reqs\n```\n\n[Pipfile.lock](./Pipfile.lock) will be automatically updated during `pipenv install`.\n\n### Docker\n\n[Our Docker](https://hub.docker.com/r/egbakou/coronavirus-tg-api/) image is based on [tiangolo/uvicorn-gunicorn-fastapi/](https://hub.docker.com/r/tiangolo/uvicorn-gunicorn-fastapi/).\n\n```bash\ninvoke docker --build\n```\n\nRun with `docker run` or `docker-compose`\n\n#### Alternate Docker images\n\nIf a full `gunicorn` deployment is unnecessary or [impractical on your hardware](https://fastapi.tiangolo.com/deployment/#raspberry-pi-and-other-architectures) consider using our single instance [`Uvicorn`](https://www.uvicorn.org/) based [Dockerfile](uvicorn.Dockerfile).\n\n\n### Invoke\n\nAdditional developer commands can be run by calling them with the [python `invoke` task runner](http://www.pyinvoke.org/).\n```bash\ninvoke --list\n```\n\n### Deploying\n\n\n\n## Created by: Kodjo Laurent Egbakou\n\n- LinkedIn: [Kodjo Laurent Egbakou](https://www.linkedin.com/in/laurentegbakou/)\n- Twitter: [@lioncoding](https://twitter.com/lioncoding)\n\n## Contribution\n\nFeel free to create issues and PRs :)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegbakou%2Fcoronavirus-tg-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fegbakou%2Fcoronavirus-tg-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegbakou%2Fcoronavirus-tg-api/lists"}