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.
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for tmdbv3api-0.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ade206f75afa1d3cc5dfeb9fe9340bc22404a6de5466496f7cae482b9b3f2255 |
|
MD5 | 33680237416a27102b41744ef29494a5 |
|
BLAKE2b-256 | 09031510e3e329aaf3655d5e006a386fb3d02712803b6b92c16d15dc57b290fe |