Skip to content

MohAyman3600/soccer_data_DRF

Repository files navigation

Soccer Datat Scraper

Django REST API for fetching soccer data.

Description

An API built using DRF to scrape Football players' and teams' statistics from Api-Football-Beta and save it into a Postgres database. It uses a customized scraper to fetch and save the data; Uses the Celery task scheduler, with Redis as a broker, for fetching and saving these data. Also, the project has a logging and Redis cache setup; in addition to, Sentry error-tracking system. The main purpose of the project was to provide a Python Django interface, for fetching soccer statistics, to be used as a backend in custom projects.

Getting Started

Dependencies

  • Docker & Docker Compose
  • Python 3

Installing

  • Clone the project
  • define the environment variables in .env file

Executing program

  • run
docker-compose up --build -d
  • run
docker-compose exec web python manage.py makemigrations api
  • run
docker-compose exec web python manage.py migrate
  • use django project shell to run scraping tests using scraping-example.py

Scraper UML Class Diagram

scraper UML

Authors

@Mohamed Ayman

Version History

  • 0.1
    • Initial Release

Notes

The soccer API service needs to be replaced with another working service

License

This project is licensed under the [MIT] License - see the LICENSE.md file for details

About

Django REST API for fetching soccer data.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published