Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A simple wrapper for the TMDb API.

Project Description

Python wrapper for The Movie Database (TMDb) API.

To use this wrapper you will need to get an API key from TMDb.

Check out the API documentation:

Install

pip install tmdbv3api

Examples

Get the list of popular movies on The Movie Database. This list refreshes every day.

from tmdbv3api import TMDb
tmdb = TMDb(api_key="your_api_key", debug=False, lang="en")

popular = tmdb.popular()

for movie in popular:
    print movie.id
    print movie.title
    print movie.overview
    print movie.poster_path

Get the primary information about a movie.

movie = tmdb.get_movie(343611)
print movie.title
print movie.overview
print movie.popularity

Search for movies by title.

search = tmdb.search('Mad Max')

for movie in search:
    print movie.id
    print movie.title
    print movie.overview
    print movie.poster_path
    print movie.vote_average

Get the similar movies for a specific movie id.

similar = tmdb.similar(777)

for result in similar:
    print result.title
    print result.overview

Search for TV shows by title.

show = tmdb.search_tv('Breaking Bad')

for result in show:
    print result.name
    print result.overview

Get the similar TV shows for a specific tv id.

similar = tmdb.similar_shows(1396)

for show in similar:
    print show.name
    print show.overview

Get the general person information for a specific id.

person = tmdb.get_person(12)

print person.name
print person.biography

Discover movies by different types of data like average rating, number of votes, genres and certifications.

# What movies are in theatres?

movie = tmdb.discover_movies({
    'primary_release_date.gte': '2017-01-20',
    'primary_release_date.lte': '2017-01-25'
})

# What are the most popular movies?

movie = tmdb.discover_movies({
    'sort_by': 'popularity.desc'
})

# What are the most popular kids movies?

movie = tmdb.discover_movies({
    'certification_country': 'US',
    'certification.lte': 'G',
    'sort_by': 'popularity.desc'
})

Discover TV shows by different types of data like average rating, number of votes, genres, the network they aired on and air dates.

# What are the most popular TV shows?

show = tmdb.discover_tv_shows({
    'sort_by': 'popularity.desc'
})

# What are the best dramas?

show = tmdb.discover_tv_shows({
    'with_genres': 18,
    'sort_by': 'vote_average.desc',
    'vote_count.gte': 10
})

Supported Methods

Movies

  • /movie/latest
  • /movie/now_playing
  • /movie/top_rated
  • /movie/upcoming
  • /movie/id
  • /movie/id/similar
  • /movie/id/recommendations
  • /movie/id/videos
  • /movie/id/reviews
  • /movie/id/lists

TV

  • /tv/id
  • /tv/latest
  • /tv/id/similar
  • /tv/top_rated
  • /tv/popular
Release History

Release History

This version
History Node

0.4

History Node

0.3

History Node

0.2.2.1

History Node

0.2.2

History Node

0.2.1

History Node

0.2

History Node

0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
tmdbv3api-0.4-py2-none-any.whl (6.1 kB) Copy SHA256 Checksum SHA256 py2 Wheel Jul 14, 2017
tmdbv3api-0.4.tar.gz (3.8 kB) Copy SHA256 Checksum SHA256 Source Jul 14, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting