Release TMDBv3 API Python Module with SQLite Cache Backend - Free For Use
#1
I came in need for a TMDBv3 api module for my own addon project, the open source offerings didn't suit me so while working with one I wound up rewriting it instead.

https://transfer.sh/Iv17p2sYrY/tmdbv3api.py

Original link for pip https://pypi.org/project/tmdbv3api/
Original project on github https://github.com/AnthonyBloomer/tmdbv3api

The api key is defined as api_key, you need to supply your own - https://developer.themoviedb.org/docs/au...pplication

Language is defined as language and uses the language-region format - https://developer.themoviedb.org/docs/languages

Everything will be cached and returned from cache seamlessly, path defined as dbPath, use refresh=True with the various functions to refresh the cache.

Feel free to include and rework for your own projects, it is provided without provisions or restrictions.

Refer to the api documentation https://developer.themoviedb.org/referen...ng-started or the original project listed for functionality beyond what is here.

Example

python:

import tmdbv3api

tmdbv3api.createDB('/path/to/tmdbcache.db')
episodes = tmdbv3api.loadEpisodes("Criminal Minds", season=1)
if tmdbv3api.dbcon:
    tmdbv3api.dbcon.close()

#perform parsing on episodes dict

MAP

The only remaining original function, reworked
tmdblookup(action,append_to_response) action is tmdb endpoint url beyond baseurl, append_to_response is any additional query parameters

findShow(tmdbid|query,[force refresh]) returns tmdbid or False, optional force refresh from tmdb, full returns the full list of results

loadMovie(tmdbid|query,[release year],[force refresh]) returns movie details dict, optional year, optional force refresh from tmdb

loadShow(tmdbid|query,[force refresh]) returns tvshow details dict, optional force refresh from tmdb, (seasons are loaded here but not returned here, use loadSeasons)

loadSeasons(tmdbid|query) returns array of all seasons' details dict, seasons are loaded from loadShow and returned here

loadEpisodes(tmdbid|query,seasonnumber,[force refresh]) returns array of all episodes' details dict for season, optional force refresh from tmdb

loadEpisode(tmdbid|query,seasonnumber,episodenumber,[force refresh]) returns episodes' details dict for season, episode, optional force refresh from tmdb
Reply

Logout Mark Read Team Forum Stats Members Help
TMDBv3 API Python Module with SQLite Cache Backend - Free For Use0