PyTVDB
Description
PyTVDB is a Python library for querying the TVDB.com API. It was originally written to help me with some personal projects, after I noticed that most existing libraries either:
- Didn't support Python 3+
- Hadn't been updated in over a year
- Used IDE-unfriendly dictionary syntax
So this is my attempt at writing an API library I would actually want to use.
Supported Python Versions:
PyTVDB supports Python 3.5+.
Python 2.x is not currently supported; support for version 2.7 is planned.
Requirements
PyTVDB uses the following two libraries:
Documentation
Installation
Install using pip:
pip install pytvdb
Usage
Start by creating an instance of the TVDB
object:
from pytvdb import TVDB
t = TVDB()
If you have an API key on theTVDB.com, you can pass it as an argument:
t = TVDB(api_key=XXXXXXXX)
From here, the TVDB object exposes fields that mirror the TVDB API routes; for example, to retrieve information for a specific series:
doctor_who = t.series(76107)
doctor_who
now contains series information for Doctor Who (1963)
The following routes are currently implemented:
/episodes/{id}
/search/series
/series/{id}
/series/{id}/actors
/series/{id}/episodes
/series/{id}/episodes/query
/series/{id}/episodes/summary