{ "info": { "author": "Raymond Wagner", "author_email": "raymond@wagnerrp.com", "bugtrack_url": null, "classifiers": [], "description": "PyTMDB3\n=======\n\nThis Python module implements the v3 API for TheMovieDb.org, allowing access\nto movie and cast information, as well as related artwork. More information\ncan be found at:\n\nhttp://help.themoviedb.org/kb/api/about-3\n\nInitial Access\n--------------\n\nAccess to the API requires a personal key. You can create one by signing up\nfor an account on TheMovieDb.org, and generating one from your Account Details\npage. Once done, the PyTMDB3 module must be be given this key as follows:\n\n >>> from tmdb3 import set_key\n >>> set_key('your_api_key')\n\nCaching Engine\n--------------\n\nIn order to limit excessive usage against the online API server, the PyTMDB3\nmodule supports caching of requests. Cached data is keyed off the request URL,\nand is currently stored for one hour. API requests are limited to thirty (30)\nwithin ten (10) seconds. Requests beyond this limit are blocking until they\ncan be processed.\n\nThere are currently two engines available for use. The `null` engine merely\ndiscards all information, and is only intended for debugging use. The `file`\nengine is defualt, and will store to `/tmp/pytmdb3.cache` unless configured\notherwise. The cache engine can be configured as follows.\n\n >>> from tmdb3 import set_cache\n >>> set_cache('null')\n >>> set_cache(filename='/full/path/to/cache') # the 'file' engine is assumed\n >>> set_cache(filename='tmdb3.cache') # relative paths are put in /tmp\n >>> set_cache(engine='file', filename='~/.tmdb3cache')\n\nLocale Configuration\n--------------------\n\nThe previous v2 API supported language selection, but would fall through to\nthe defaults for any fields that did not have language-specific values. The\nv3 API no longer performs this fall through, leaving it up to clients to\noptionally implement it on their own.\n\nThe PyTMDB3 module supports the use of locales in two separate manners. One\ncan define a global locale that is automatically used if not specified\notherwise, or a specific locale can be supplied directly to searches and\ndata queries using the `locale=` keyword argument, which is then propogated\nthrough any subsequent queries made through those objects.\n\nLocale settings are controlled through two functions\n\n >>> from tmdb3 import get_locale, set_locale\n >>> get_locale()\n \n >>> set_locale()\n >>> get_locale()\n \n >>> set_locale('en', 'gb')\n >>> get_locale()\n \n >>> get_locale('fr', 'fr')\n \n\n* `set_locale()` is used to set the global default locale. It optionally accepts\n `language` and `country` keyword arguments. If not supplied, it will attempt\n to pull such information from your environment. It also accepts a\n `fallthrough` keyword argument, which is used to control the language and \n country filter fall through. This is disabled by default, meaning if a\n language is set, it will only return information specific to that language.\n\n* `get_locale()` also accepts optional `language` and `country` keyword arguments,\n and can be used to generate locales to use directly, overriding the global\n configuration. If none is given, this instead returns the global\n configuration. Note that fall through behavior is applied module-wide, and\n individual locales cannot be used to change that behavior.\n\nAuthentication\n--------------\n\nThis is not yet supported.\n\nSearching\n---------\n\nThere are currently six search methods available for use: `movies`, `people`, \n`studios`, `lists`, `collections`, and `series`. Search results from TheMovieDb\nare sent iteratively, twenty results per page. The search methods provided by\nthe PyTMDB3 module return list-like structures that will automatically grab\nnew pages as needed.\n\n >>> from tmdb3 import searchMovie\n >>> res = searchMovie('A New Hope')\n >>> res\n \n >>> len(res)\n 4\n >>> res[0]\n \n\nThe `movieSearch()` method accepts an 'adult' keyword to allow adult content\nto be returned. By default, this is set to False and such content is filtered\nout. The people search method behaves similarly.\n\n >>> from tmdb import searchPerson\n >>> res = searchPerson('Hanks')\n >>> res\n \n >>> res[0]\n \n \n >>> from tmdb import searchStudio\n >>> res = searchStudio('Sony Pictures')\n >>> res\n \n >>> res[0]\n \n\nThe `movieSearch()` method accepts a `year` keyword, which tells TMDB to\nfilter for movies of only that specific year. There is a helper method,\n`movieSearchWithYear()`, which will process the release year from movie\nnames where the year is contained in parentheses, as in:\n\n >>> from tmdb import searchMovieWithYear\n >>> list(searchMovieWithYear('Star Wars (1977)'))\n [, ]\n\n\nDirect Queries\n--------------\n\nThere are currently four data types that support direct access: `Collection`s,\n`Movie`s, `Person`s, and `Studio`s. These each take a single integer ID as an\nargument. All data attributes are implemented as properties, and populated\non-demand as used, rather than when the object is created.\n\n >>> from tmdb3 import Collection, Movie, Person, Studio\n >>> Collection(10)\n \n >>> Movie(11)\n \n >>> Person(2)\n \n >>> Studio(1)\n \n\nThe `Genre` class cannot be called by id directly, however it does have a\n`getAll` classmethod, capable of returning all available genres for a specified\nlanguage.\n\nImage Behavior\n--------------\n\nTheMovieDb currently offers three types of artwork: backdrops, posters, and\nprofiles. The three data queries above will each carry a default one of these\nand potentially a list of additionals to choose from. Each can be downloaded\ndirectly, or at one of several pre-scaled reduced resolutions. The PyTMDB3\nmodule provides a list of available sizes, and will generate a URL to download\na requested size. Invalid sizes return an error.\n\n >>> from tmdb3 import Movie\n >>> p = Movie(11).poster\n >>> p\n \n >>> p.sizes()\n [u'w92', u'w154', u'w185', u'w342', u'w500', u'original']\n >>> p.geturl()\n u'http://cf2.imgobject.com/t/p/original/tvSlBzAdRE29bZe5yYWrJ2ds137.jpg'\n >>> p.geturl('w342')\n u'http://cf2.imgobject.com/t/p/w342/tvSlBzAdRE29bZe5yYWrJ2ds137.jpg'\n >>> p.geturl('w300')\n Traceback (most recent call last):\n File \"\", line 1, in \n File \"tmdb3/tmdb_api.py\", line 101, in geturl\n raise TMDBImageSizeError\n tmdb3.tmdb_exceptions.TMDBImageSizeError: None\n\nTrailers\n--------\n\nTheMovieDb offers access to trailers on Youtube and Apple, however their use\nis slightly different. Youtube trailers offer an individual file, while Apple\ntrailers offer multiple sizes.\n\n >>> from tmdb3 import Movie\n >>> movie = Movie(27205)\n >>> movie.youtube_trailers\n [, ]\n >>> movie.youtube_trailers[0].geturl()\n 'http://www.youtube.com/watch?v=suIIHZqDR30'\n >>> movie.apple_trailers\n [, , ]\n >>> movie.apple_trailers[0].sizes()\n [u'480p', u'720p', u'1080p']\n >>> movie.apple_trailers[0].geturl()\n u'http://pdl.warnerbros.com/wbmovies/inception/Inception_TRL1_1080.mov'\n >>> movie.apple_trailers[0].geturl()\n u'http://pdl.warnerbros.com/wbmovies/inception/Inception_TRL1_480.mov'\n\nList of Available Data\n----------------------\n\n#### Collection:\n\n| type | name |\n|-----------------------|--------------------|\n| integer | id |\n| string | name |\n| string | overview |\n| Backdrop | backdrop |\n| Poster | poster |\n| list(Movie) | members |\n| list(Backdrop) | backdrops |\n| list(Poster) | posters |\n\n#### Movie:\n| type | name | notes |\n|-----------------------|--------------------|----------------------------------------|\n| integer | id | |\n| string | title | language specific |\n| string | originaltitle | origin language |\n| string | tagline | |\n| string | overview | |\n| integer | runtime | |\n| integer | budget | |\n| integer | revenue | |\n| datetime | releasedate | |\n| string | homepage | |\n| string | IMDB reference id | 'ttXXXXXXX' |\n| Backdrop | backdrop | |\n| Poster | poster | |\n| float | popularity | |\n| float | userrating | |\n| integer | votes | |\n| boolean | adult | |\n| Collection | collection | |\n| list(Genre) | genres | |\n| list(Studio) | studios | |\n| list(Country) | countries | |\n| list(Language) | languages | |\n| list(AlternateTitle) | alternate_title | |\n| list(Cast) | cast | sorted by billing |\n| list(Crew) | crew | |\n| list(Backdrop) | backdrops | |\n| list(Poster) | posters | |\n| list(Keyword) | keywords | |\n| dict(Release) | releases | indexed by country |\n| list(Translation) | translations | |\n| list(Movie) | similar | |\n| list(List) | lists | |\n| list(Movie) | getSimilar() | |\n| None | setFavorite(bool) | mark favorite status for current user |\n| None | setRating(int) | rate movie by current user |\n| None | setWatchlist(bool) | mark watchlist status for current user |\n\n#### Movie classmethod:\n| type | name | notes |\n|-----------------------|--------------------|---------------------------------------------|\n| Movie | fromIMDB(imdbid) | special constructor for use with IMDb codes |\n| Movie | latest() | gets latest movie added to database |\n| list(Movie) | nowplaying() | content currently in theater |\n| list(Movie) | mostpopular() | based off themoviedb.org page view counts |\n| list(Movie) | toprated() | based off themoviedb.org user ratings |\n| list(Movie) | upcoming() | curated list, typically contains 100 movies |\n| list(Movie) | favorites() | current user's favorite movies |\n| list(Movie) | ratedmovies() | movies rated by current user |\n| list(Movie) | watchlist() | movies marked to watch by current user |\n\n#### Series:\n| type | name |\n|-----------------------|--------------------|\n| integer | id |\n| string | name |\n| string | original_name |\n| string | overview |\n| string | homepage |\n| integer | number_of_seasons |\n| integer | number_of_episodes |\n| float | popularity |\n| float | userrating |\n| integer | votes |\n| datetime | first_air_date |\n| datetime | last_air_date |\n| bool | inproduction |\n| string | status |\n| Backdrop | backdrop |\n| Poster | poster |\n| string | imdb_id |\n| string | freebase_id |\n| string | freebase_mid |\n| string | tvdb_id |\n| string | tvrage_id |\n| list(Person) | authors |\n| list(datetime) | episode_run_time |\n| list(Genre) | genres |\n| list(string) | languages |\n| list(string) | origin_countries |\n| list(Network) | networks |\n| list(Season) | seasons |\n| list(Cast) | cast |\n| list(Crew) | crew |\n| list(Backdrop) | backdrops |\n| list(Poster) | posters |\n| list(Series) | similar |\n| list(Keyword) | keywords |\n\n#### Season:\n| type | name |\n|-----------------------|--------------------|\n| integer | id |\n| string | name |\n| datetime | air_date |\n| string | overview |\n| integer | series_id |\n| integer | season_number |\n| Poster | poster |\n| string | freebase_id |\n| string | freebase_mid |\n| string | tvdb_id |\n| string | tvrage_id |\n| list(Poster) | posters |\n| list(Episode) | episodes |\n\n#### Episode:\n\n| type | name |\n|-----------------------|--------------------|\n| integer | id |\n| integer | series_id |\n| integer | season_number |\n| integer | episode_number |\n| string | name |\n| string | overview |\n| float | userrating |\n| integer | votes |\n| datetime | air_date |\n| string | production_code |\n| Backdrop | still |\n| string | freebase_id |\n| string | freebase_mid |\n| string | tvdb_id |\n| string | tvrage_id |\n| list(Backdrop) | stills |\n| list(Cast) | cast |\n| list(Cast) | guest_stars |\n| list(Crew) | crew |\n\n#### List:\n\n| type | name | notes |\n|-----------------------|--------------------|---------------------------------------|\n| hex string | id | |\n| string | name | |\n| string | author | |\n| string | description | |\n| integer | favorites | number of users that have marked list |\n| string | language | |\n| integer | count | |\n| Poster | poster | |\n| list(Movie) | members | |\n\n#### Person:\n\n| type | name |\n|-----------------------|--------------------|\n| integer | id |\n| string | name |\n| string | biography |\n| datetime | dayofbirth |\n| datetime | dayofdeath |\n| string | homepage |\n| Profile | profile |\n| boolean | adult |\n| list(string) | aliases |\n| list(ReverseCast) | roles |\n| list(ReverseCrew) | crew |\n| list(Profile) | profiles |\n\n#### Cast (derived from `Person`):\n\n| type | name | notes |\n|-----------------------|--------------------|-----------------------|\n| string | character | |\n| integer | order | as appears in credits |\n\n#### Crew (derived from `Person`):\n\n| type | name |\n|-----------------------|--------------------|\n| string | job |\n| string | department |\n\n#### ReverseCast (derived from `Movie`):\n\n| type | name |\n|-----------------------|--------------------|\n| string | character |\n\n#### ReverseCrew (derived from `Movie`):\n\n| type | name |\n|-----------------------|--------------------|\n| string | job |\n| string | department |\n\n#### Image:\n\n| type | name | notes |\n|-----------------------|-------------------------|----------------------------------|\n| string | filename | arbitrary alphanumeric code |\n| float | aspectratio | not available for default images |\n| integer | height | not available for default images |\n| integer | width | not available for default images |\n| integer | language | not available for default images |\n| float | userrating | |\n| integer | votes | |\n| list(string) | sizes() | |\n| string | geturl(size='original') | |\n\nBackdrop (derived from `Image`) \nPoster (derived from `Image`) \nProfile (derived from `Image`) \nLogo (derived from `Image`) \n\n#### AlternateTitle:\n\n| type | name |\n|-----------------------|--------------------|\n| string | country |\n| string | title |\n\n#### Release:\n\n| type | name |\n|-----------------------|--------------------|\n| string | certification |\n| string | country |\n| datetime | releasedate |\n\n#### Translation:\n\n| type | name |\n|-----------------------|--------------------|\n| string | name |\n| string | englishname |\n| string | language |\n\n#### Genre:\n\n| type | name |\n|-----------------------|--------------------|\n| integer | id |\n| string | name |\n| list(Movie) | movies |\n\n#### Genre classmethods:\n\n| type | name | notes |\n|-----------------------|--------------------|----------------------------|\n| list(Genre) | getAll(language) | returns list of all genres |\n\n#### Studio:\n\n| type | name |\n|-----------------------|--------------------|\n| integer | id |\n| string | name |\n| string | description |\n| string | headquarters |\n| Logo | logo |\n| Studio | parent |\n| list(Movie) | movies |\n\n#### Network:\n\n| type | name |\n|-----------------------|--------------------|\n| integer | id |\n| string | name |\n\n#### Country:\n\n| type | name |\n|-----------------------|--------------------|\n| string | code |\n| string | name |\n\n#### Language:\n\n| type | name |\n|-----------------------|--------------------|\n| string | code |\n| string | name |\n\n#### Trailer:\n\n| type | name |\n|-----------------------|--------------------|\n| string | name |\n| string | size |\n| string | source |\n\n#### YoutubeTrailer (derived from `Trailer`)\n\n| type | name |\n|-----------------------|--------------------|\n| string | geturl() |\n\n#### AppleTrailer\n\n| type | name | notes |\n|----------------------|---------------------|-----------------|\n| string | name | |\n| dict(Trailer) | sources | indexed by size |\n| list(string) | sizes() | |\n| string | geturl(size=None) | |", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "tmdb3", "package_url": "https://pypi.org/project/tmdb3/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/tmdb3/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/tmdb3/0.7.2/", "requires_dist": null, "requires_python": null, "summary": "TheMovieDB.org APIv3 interface", "version": "0.7.2" }, "last_serial": 1387401, "releases": { "0.6.17": [ { "comment_text": "", "digests": { "md5": "cd259427454472164c9a2479504c9cbb", "sha256": "64a6c3f1a60a9d8bf18f96a5403f3735b334040345ac3646064931c209720972" }, "downloads": -1, "filename": "tmdb3-0.6.17.zip", "has_sig": false, "md5_digest": "cd259427454472164c9a2479504c9cbb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38179, "upload_time": "2013-10-25T08:33:46", "url": "https://files.pythonhosted.org/packages/48/b4/c8a96277338385c1e3d891359fce427f0275c9cd5af23552389bdfd89db3/tmdb3-0.6.17.zip" } ], "0.7.0": [], "0.7.1": [ { "comment_text": "built for FreeBSD-10.0-RELEASE", "digests": { "md5": "ba031d315ad96192f17e8c751e8bee04", "sha256": "66f1b95a4a1d86c35802bc2d0c297e8003ff246dc1399e08414e5bf70c9cbc63" }, "downloads": -1, "filename": "tmdb3-0.7.1.freebsd-10.0-RELEASE-amd64.tar.gz", "has_sig": false, "md5_digest": "ba031d315ad96192f17e8c751e8bee04", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 71964, "upload_time": "2014-11-16T01:10:23", "url": "https://files.pythonhosted.org/packages/f8/80/56489924a16f1fe6db577f172e098dc0a9969341b16070f089f66ddfe35e/tmdb3-0.7.1.freebsd-10.0-RELEASE-amd64.tar.gz" }, { "comment_text": "", "digests": { "md5": "a3de16b84747ddec0e40c5a54cb17173", "sha256": "f6bc660f9154cf95b50fe3ba3223aec1f26d036885a584e9f0a0cd13d9fd28f5" }, "downloads": -1, "filename": "tmdb3-0.7.1.tar.gz", "has_sig": false, "md5_digest": "a3de16b84747ddec0e40c5a54cb17173", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32294, "upload_time": "2014-11-16T01:10:19", "url": "https://files.pythonhosted.org/packages/67/2c/2ac9e01375b2c54dab1028ed6eb74f911f4b17749f47f17de35e6fe56e10/tmdb3-0.7.1.tar.gz" } ], "0.7.2": [ { "comment_text": "", "digests": { "md5": "c712bca4934230a16a8b1a41dcb987cf", "sha256": "9b6e043b8a65d159e7fc8f720badc7ffee5109296e38676c107454e03a895983" }, "downloads": -1, "filename": "tmdb3-0.7.2.tar.gz", "has_sig": false, "md5_digest": "c712bca4934230a16a8b1a41dcb987cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39545, "upload_time": "2015-01-19T01:53:21", "url": "https://files.pythonhosted.org/packages/ec/67/b248c8c4867876c7620d724e7f85f6cf86102d730813891e41b05cc744bd/tmdb3-0.7.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c712bca4934230a16a8b1a41dcb987cf", "sha256": "9b6e043b8a65d159e7fc8f720badc7ffee5109296e38676c107454e03a895983" }, "downloads": -1, "filename": "tmdb3-0.7.2.tar.gz", "has_sig": false, "md5_digest": "c712bca4934230a16a8b1a41dcb987cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39545, "upload_time": "2015-01-19T01:53:21", "url": "https://files.pythonhosted.org/packages/ec/67/b248c8c4867876c7620d724e7f85f6cf86102d730813891e41b05cc744bd/tmdb3-0.7.2.tar.gz" } ] }