mymeco.tmdb package
Submodules
mymeco.tmdb.utils module
Utility module to connect and retrieve information from TMDb.
- class mymeco.tmdb.utils.MovieSearch(title: str, original_title: str, release_date: date | None, overview: str | None, poster_path: str | None, id: int)[source]
Bases:
NamedTupleBasic information on a movie.
-
id:
int Alias for field number 5
-
original_title:
str Alias for field number 1
-
overview:
Optional[str] Alias for field number 3
-
poster_path:
Optional[str] Alias for field number 4
-
release_date:
Optional[date] Alias for field number 2
-
title:
str Alias for field number 0
-
id:
- class mymeco.tmdb.utils.Tmdb(apikey, lang=None)[source]
Bases:
objectMain class to request data on TMDb API v3.
- search_movie(title, year=None, page=1)[source]
Search a movie, given its title and optionally its release year.
- Parameters:
title (
str) – Movie title, could be original title or localized title. Could also be a partial title.year (
Optional[int]) – Movie release date.page (
int) – Requested page.
- Return type:
Generator[MovieSearch,None,None]- Returns:
List generator with all matched movie. Each result consists in a named tuple with the following keys: - title: localized movie title - original_title: original movie title - release_date: movie release date - overview: short movie summary - poster_path: URL to retrieve small poster - id: TMDb movie ID, useful to retrieve full movie details