Skip to main content

TheTVDB Client API Library

Project description

tvdb_client: A python client library for the new TVDB API

https://codeship.com/projects/997e1f20-9267-0134-fa6e-42e39fd99f49/status?branch=master

The tvdb_client provides integration with the TheTVDB API and allows interaction with all of its public APIs in both versions: V1 and V2.

The tvdb_client library will provide different client classes for the V1 and V2 API versions from TheTVDB for they are very different conceptually and technically (V1 is HTTP Get request based with XML response, while V2 is all RESTful JSON based).

This library is powered by the fantastic python Requests library and the awesome python lxml.

tvdb_client is not supported nor endorsed by TheTVDB.

Client Classes

  • ApiV1Client: Provides access to TheTVDB V1 APIs which are based on HTTP Get requests with XML based responses. The API documentation from TheTVDB can be found at API v1 description.

  • ApiV2Client: Provides access to TheTVDB V2 APIs which are all RESTfull JSON APIs. The API information is very well documented at API v2 description.

V1 API Client

The V1 API Client is implemented by class ApiV1Client. Its constructor takes the api key, as required by TheTVDB.

Currently, the implementation of the methods for its APIs is under development.

V2 API Client

The V2 API Client is implemented on class ApiV2Client. Its constructor receives the user identification (api key, username and account identified) as required by TheTVDB and optionally the language option.

This client implements method for all the APIs documented in TheTVDB swagger with the exception of those that returns information on the parameters required for certain APIs.

The client is very easy to use as provided by the example below:

>>> from tvdb_client import ApiV2Client
>>> api_client = ApiV2Client('USERNAME', 'API_KEY', 'ACCOUNT_IDENTIFIER')
>>> api_client.login()
>>> api_client.is_authenticated
True
>>> series = api_client.search_series(name='Game of Thrones')
>>> print series
{u'data': [{u'status': u'Continuing', u'network': u'HBO', u'overview': u"Seven noble families fight for control of
the mythical land of Westeros. Friction between the houses leads to full-scale war. All while a very ancient evil
awakens in the farthest north. Amidst the war, a neglected military order of misfits, the Night's Watch, is all that
 stands between the realms of men and the icy horrors beyond.", u'seriesName': u'Game of Thrones', u'firstAired':
 u'2011-04-17', u'banner': u'graphical/121361-g19.jpg', u'id': 121361, u'aliases': []}, {u'status': u'Continuing',
 u'network': u'YouTube', u'overview': u'A spoof/parody Based on HBO\'s hit series "A Game of Thrones" and George RR
 Martin\'s A Song of Ice and Fire', u'seriesName': u'Game of Thrones: Cartoon Parody', u'firstAired': u'2011-05-07',
  u'banner': u'', u'id': 311939, u'aliases': []}]}
>>> type(series)
<type 'dict'>

Status and updates

  • May 2016: Development started and API V2 Client is up for business!

  • May 2020: Fix to client shared lib (version 0.1.2)

Contact

Should you have any questions, suggestions or wishes to contribute, please drop me an email at thilux.systems@gmail.com.

Project details


Download files

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

Source Distribution

tvdb_client-0.1.2.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tvdb_client-0.1.2-py3.7.egg (24.6 kB view details)

Uploaded Egg

File details

Details for the file tvdb_client-0.1.2.tar.gz.

File metadata

  • Download URL: tvdb_client-0.1.2.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for tvdb_client-0.1.2.tar.gz
Algorithm Hash digest
SHA256 752967cabc9ff8146bca2fe2f96c04b43b517e88da55bb4f69131cb90d90304f
MD5 89dee6a0295a0088faa52f10a1cf886f
BLAKE2b-256 3d453edf6f6453c8d5f895bd4e30516e649c0369b369b0d80676ca7f3785fd3a

See more details on using hashes here.

File details

Details for the file tvdb_client-0.1.2-py3.7.egg.

File metadata

  • Download URL: tvdb_client-0.1.2-py3.7.egg
  • Upload date:
  • Size: 24.6 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for tvdb_client-0.1.2-py3.7.egg
Algorithm Hash digest
SHA256 795012cfc67971515dced1ae33ec9e08d46c1f9d233313b0b2e80709171fee00
MD5 e06ed95fdeb53571110f90e3427d37ed
BLAKE2b-256 67c1ee8ad8c4bfaec463a13d41f53f4cc112439cdcdc12476daf35a1cb1c7ba7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page