Skip to main content

A python client for TVDB rest API

Project description

Build Coverage License PyPI Downloads Code style

A python client for the API exposed by the TVDB. API keys should be acquired from the TVDB site prior to using this client.


tvdb_api_client can be installed by running pip install tvdb_api_client. It requires Python 3.6+.


Initialise the client (example using the django cache):

from django.core.cache import cache
from tvdb_api_client import TVDBClient

client = TVDBClient("username", "user_key", "api_key", cache)

The cache can be any object from a class that implements the get and set methods. For convenience, you can pass only the other arguments, and a simple object that has them will be initialised.

from tvdb_api_client import TVDBClient

client = TVDBClient("username", "user_key", "api_key")

It is advisable to use a cache that will persist during a server restart, so that the token will not have to be regenerated. Please be advised that the token will be stored in the cache in plaintext, so if there are any security considerations they should be taken care into account when choosing the cache.

Once the client has been initialised, you can use it to get the following info (and the respective methods):

  • Method to get TV series by TVDB id - get_series_by_id(tvdb_id)
  • Method to get TV series by IMDb id - get_series_by_imdb_id(imdb_id)
  • Method to find identifying info for a TV series by its name - find_series_by_name(series_name)
  • Method to get episodes by TV series using its TVDB id - get_episodes_by_series(tvdb_id)

Note: the TVDB id can be an integer of a string in any method that it's required. Also, all of these methods will used the cached value if present. To get new data, you may pass refresh_cache=True to all of them.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for tvdb-api-client, version 0.4.2
Filename, size File type Python version Upload date Hashes
Filename, size tvdb_api_client-0.4.2-py3-none-any.whl (7.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size tvdb_api_client-0.4.2.tar.gz (7.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page