Skip to content

giraycoskun/tvtime-scrapy-api

Repository files navigation

TVTime Scrapy API

Python Version Code style: black Work in Progress Coverage Status

It is a REST API that uses the Scrapy framework to work as unofficial TVTime API.

Docs: https://giraycoskun.github.io/tvtime-scrapy-api/

Reference: https://giraycoskun.github.io/tvtime-scrapy-api/reference/index/

Swagger UI: https://giraycoskun.github.io/tvtime-scrapy-api/openapi/

Security

As TvTime does not have an OAUTH Code Grant Flow, it is not possible to use the API with a token and thus it requires TVTime username and password. Therefore it is not up-to security standards and it cannot promise that without the oauth2.0 scheme.

However it only uses username and password to scrape data and does not store the password.

Architecture

Architecture

API

Docker

docker build -t tvtime-scrapy-app .
docker run -p 8000:8000 tvtime-scrapy-app

Local Development Useful Commands

poetry export -f requirements.txt --output requirements.txt --with docs,dev,test
uvicorn src.main:app --reload
pytest -o log_cli=true -o log_cli_level=DEBUG 
coverage run --source src -m pytest
celery -A src.repository.celery_repository worker --concurrency 2 --loglevel=DEBUG

TODO

  • Add tests to cover data services & celery
  • Add user authentication
  • Add exception handling from scrapy
  • Add exception handling from redis

Reference

FASTAPI: https://fastapi.tiangolo.com/

REDIS: https://redis.io/

CELERY: https://docs.celeryproject.org/en/stable/

SCRAPY: https://docs.scrapy.org/en/latest/


Python FastAPI Celery Redis Visual Studio Code

Releases

No releases published

Packages

No packages published

Languages