Package: trakt
This module is designed to be a Pythonic interface to theTrakt.tv.
REST API. The official documentation for which can be foundhere.
trakt contains interfaces to all of the Trakt.tv functionality in an, ideally, easily
scriptable fashion. For more information on this module’s contents and example usages
please see thePyTrakt docs.More information about getting started and accessing the information you thirst for
can be found throughout the documentation below.InstallationThere are two ways through which you can install traktInstall Via PipTo install withpip, just run this in your terminal:$ pip install traktGet the codetrakt is available onGitHub.You can either clone the public repository:$ git clone git://github.com/moogar0880/PyTrakt.gitDownload thetarball:$ curl -OL https://github.com/moogar0880/PyTrakt/tarball/masterOr, download thezipball:$ curl -OL https://github.com/moogar0880/PyTrakt/zipball/masterOnce you have a copy of the source, you can embed it in your Python package,
or install it into your site-packages easily:$ python setup.py installContributingPull requests are graciously accepted. Any pull request should not break any tests
and should passflake8style checks (unless otherwise warranted). Additionally
the user opening the Pull Request should ensure that their username and a link to
their GitHub page appears inCONTRIBUTORS.md.TODOThe following lists define the known functionality provided by the Trakt.tv API
which this module does not yet have support for. The current plan is that
support for the following features will be added over time. As always, if you
would like a feature added sooner rather than later, pull requests are most
definitely appreciated.High Level API FeaturesPaginationSyncCreate a comment class to facilitate
- returning an instance when a comment is created, instead of None
- add ability to update and delete commentsMoviesmovies/popularmovies/played/{time_period}movies/watched/{time_period}movies/collected/{time_period}movies/anticipatedmovies/boxofficemovies/{slug}/statsShowsPlayedWatchedCollectedAnticipatedCollection ProgressWatched ProgressStatsSeasonsextended
- images
- episodes
- fullstatsEpisodesstatsUsershidden everythinglikes
- commentscommentsUserList
- commentshistorywatchlists
- seasons
- episodesRelease History3.4.0 (2022-01-11)Config boostrapping now occurs at runtime rather than load time @glensc (#162)Unit tests can now be run from any working directory @glensc (#170)Code cleanup - removed unused imports and superfluous parens from some yield statements @glensc (#171)3.3.0 (2022-01-07)Add LockedUserAccountException support @glensc (#163)Add ids property to People objects @thechicacode (#135)3.2.2 (2021-10-26)Fix an issue where the show of a TVEpisode was not always set properly @twolaw (#157)3.2.1 (2021-08-08)Fix an issue when accessing theseasonsproperty of aTVShowinstance whose slug requires a year3.2.0 (2021-06-21)Add globalsessioninstance which will allow clients to override requests behavior (#151)3.1.0 (2021-04-10)Add MethodNotAllowedException for 405 status codes (#141)Ensure CI commands use python3 (#142)3.0.0 (2021-03-16)Drop python 2 support + update dependencies (#137)Drop Travis CI in favor of CircleCI (#137)Update in-code documentation to match existing APIs (#137)Include response information in raised TraktExceptions @twolaw (#138)2.15.0 (2021-01-31)Add documentation for the sync module @p0psicles (#133)Added option for fetching extended calendar objects and cleaned up calendar building logic @p0psicles (#133)Added load_config function for standalone authentication loading @p0psicles (#133)Ensure sync functions return their responses and allow for raw json data to be used when syncing @p0psicles (#133)Added sync.get_watchlist, sync.get_watched, and sync.get_collection functions @p0psicles (#133)Added pagination options to tv.get_recommended_shows, tv.popular_shows, tv.trending_shows, and tv.updated_shows @p0psicles (#133)Added tv.recommended_shows, tv.played_shows, tv.watched_shows, tv.collected_shows, and tv.anticipated_shows functions @p0psicles (#133)Added TVShow.progress attribute for fetching the progress through a TVShow instance @p0psicles (#133)2.14.1 (2020-09-23)Ensure that only trakt username slugs are only used when forming URLs @twolaw (#128)2.14.0 (2020-07-12)TraktException now properly inherits from Exception @mindigmarton (#122)OAUTH token is automatically refreshed once a request is made within 2 days of the tokens expiration @twolaw (#121)Users custom lists can now be properly read without causing an exception @tecknicaltom (#120)Search queries are no longer slugified by default. Queries can be slugified by specifyingslugify=Truewhen running a search. (#116)2.13.0 (2020-04-26)Add support for media type when searching by id @teancom (#115)Implement TV Episode first_aired_end_time and end_time_from_custom_start methods (#114)2.12.0 (2019-10-22)Implement TV Show last_episode and next_episode @Faboor (#111)2.11.0 (2019-08-26)Implemented Checkin, fixed Scrobble & Comment @omjadas (#109)2.10.0 (2019-06-25)Add the ability to return a list of search results instead of their underlying media types (#106)2.9.1 (2019-02-24)Fix season number naming issue @StoneMonarch (#104)2.9.0 (2018-10-21)Add the ability to customize oauth authentication flow @Forcide (#95)2.8.3 (2018-08-27)Fix the case in which first_aired property of tv show is null @alexpayne482 (#88)2.8.2 (2018-08-14)Fix error code handling in the device auth flow @anongit (#83)2.8.1 (2018-08-09)Fix bug loading stored credentials for PIN auth (#84)Fix an issue with the formatting of now() timestamps on the 10th of the month2.8.0 (2018-02-25)Add support for device authentication (#81)2.7.3 (2016-11-5)Fix a bug with comment instance creation (#73)2.7.2 (2016-07-11)Properly export module contents acrosstraktmodule (#70)2.7.1 (2016-07-09)Addeddatetimerepresentation of episode first_aired date2.7.0 (2016-06-05)Add Movie and TV credit accessors to the Person class2.6.0 (2016-06-04)Add optional year to movie search parameters @justlaputa (#67)Add optional year to show, and episode searchesAdd convenience Person.search class method2.5.3 (2016-06-02)Fix missing episode ids returned from calendar @anongit (#66)2.5.2 (2016-05-29)Fix logic in _bootstrapped function @permster (#65)2.5.1 (2016-05-15)Fix TVShow id attributes @TheJake123 (#64)2.5.0 (2016-05-09)Add support for enumerate list items (#63)2.4.6 (2016-05-01)Fix adding to watchlists (#59)2.4.5 (2016-03-20)Addsixsupport for cleaner 2-3 compatibilityGeneral code cleanup and style improvements2.4.4 (2016-03-19)Updateslugifyfunction to better match trakt slugs (#51)2.4.3 (2016-03-12)Python Style Fixes (per flake8)Added mocked unit level tests to ensure API responses are handled properlyMiscellaneous bug fixes and improvements2.4.2 (2016-03-05)Fix authentication issue pointed out by @BrendanBall (#48)2.4.1 (2016-02-20)Fixed user list retrieval @permster (#42)Fixed return from generator py 2.x bug (#45)2.4.0 (2016-02-13)Cleaned up some ugliness in the auth workflowsUser GET’s now actually fetch User data from traktUser.watching no longer raises an exception if a user isn’t watching anything (#40)HTTP 204 responses now return None for more obvious error handling2.3.0 (2016-02-12)Expose documented vars, fix watching query (#39)Add easier customization for PIN Authentication url (#38)2.2.5 (2015-09-29)AddedUser.watchlist_moviesandUser.watchlist_showsproperties to thetrake.users.Userclass. Thanks @a904guy! (#32)2.2.4 (2015-09-25)Fix a bug with authentication prompts on Python 2.x. Thanks @Dreamersoul (#30)2.2.3 (2015-09-21)# Fix a bug with loading calendars ofTVEpisodeobjects. Thanks @Dreamersoul (#28)
# Fix a bug withTVEpisode.__str__(and some others) not properly escaping non-ascii characters on Python 2.x (#27)2.2.2 (2015-09-20)Fix a bug loadingtrakt.calendar.SeasonCalendar(#25)Added new personalized Calendar classes totrakt.calendarmodule2.2.1 (2015-09-16)Add default values to non-criticaldict.getcalls (#23)Updated some documentation.2.2.0 (2015-08-23)A TVSeason’sepisodesattribute is now dynamically generated from all episodes in that seasonsync.rateandsync.add_to_historynow properly make valid requests (#21)Note:sync.add_to_history’swatched_atargument is now expected to be a datetime object, in order to matchsync.rate2.1.0 (2015-07-19)Add Trakt PIN Authentication (#15)2.0.3 (2015-07-12)Fix BASE_URL to point at correct v2 API (#19)2.0.2 (2015-04-18)Fix CLIENT_SECRET assignment Bug (#16)2.0.1 (2015-03-15)Fixed TVEpisode Scrobbling Bug (#13)Fixed DEBUG logging messages to properly reflect HTTP MethodsAdded a 400 HTTP Response Code Exception type2.0.0 (2015-03-04)2.0 Version bump due to incompatible API changes relating to the location of the trakt api_key attributeAdd additional debug logging for API responsesAdd tmdb_id to theTVShow.idsattributeFixedtrakt.initto instruct users on how to create a new OAuth applicationFixedTVSeason.to_jsonto return accurately scoped season informationUpdated documentation on APIv2’s Authentication patterns1.0.3 (2015-02-28)Fixed a bug withFirst Aired Datedatetime parsing1.0.2 (2015-02-17)Fixes Generator issue detailed in #7Fixes Python 2x Unicode bug1.0.1 (2015-02-15)PyTrakt now utilizes Trakt’s new API 2.0API Keys can now obtained via thetrakt.initfunctionNote: POSTS have been hit or miss, but get’s all appear to be working0.3.6 (2015-01-15)Bug fix for the failure to process JSON API responses0.3.4 (2014-08-12)Merged @stampedeboss changes from PR #1Some small stylistic changes for consistency0.3.3 (2014-07-04)trakt.tv.TVShow improvements/changesMisc bug fixes in trakt.tvImport enhancements in trakt.moviesAdded community moduleFixed/updated documentation0.3.0 (2014-06-19)Initial Release