People

Interfaces to all of the People objects offered by the Trakt.tv API

class trakt.people.Person(name, slug=None, **kwargs)

A Class representing a trakt.tv Person such as an Actor or Director

ext
ext_full
ext_movie_credits
ext_tv_credits
images

All of the artwork associated with this Person

images_ext
movie_credits

Return a collection of movie credits that this Person was a cast or crew member on

classmethod search(name, year=None)

Perform a search for an episode with a title matching title

Parameters:
  • name – The name of the person to search for
  • year – Optional year to limit results to
tv_credits

Return a collection of TV Show credits that this Person was a cast or crew memeber on

class trakt.people.ActingCredit(character, media)

An individual credit for a Person who played a character in a Movie or TV Show

class trakt.people.CrewCredit(job, media)

An individual crew credit for a Person who had an off-screen job on a Movie or a TV Show

class trakt.people.Credits(**kwargs)

A base type representing a Person‘s credits for Movies or TV Shows

MEDIA_KEY = None
class trakt.people.MovieCredits(**kwargs)

A collection of cast and crew credits for a Movie

MEDIA_KEY = 'movie'
class trakt.people.TVCredits(**kwargs)

A collection of cast and crew credits for a TV Show

MEDIA_KEY = 'show'

Example Usage

The trakt.people module is pretty straightforward, it contains all of the tooling for collecting information about the cast and crew of TV Shows and Movies.

To collect information about a specific person, you need only to create a Person instance with their name as a parameter. Like so,

>>> from trakt.people import Person
>>> heyy = Person('Matthew McConaughey')

If you don’t know the person’s exact name, or believe it could be obscured by another person’s name, you can also search

>>> heyy = Person.search('Matthew McConaughey')[0]

Once you have your Person instance, it’s easy to collect information about them

>>> heyy.birthday
'1969-11-04
>>> heyy.birthplace
'Uvalde, Texas, USA'
>>> heyy.biography
'\u200bFrom Wikipedia, the free encyclopedia. \xa0\n\nMatthew David McConaughey (born November 4, 1969) is an American actor.\n...'
>>> heyy.images
{'headshot': 'http://slurm.trakt.us/images/poster-dark.jpg'}

As of PyTrakt version 2.7.0, you can also access a Person‘s Movie and television credits

>>> heyy.movie_credits.crew
{'production': [<CrewCredit> Producer - Surfer, Dude, <CrewCredit> Executive Producer - Sahara]}
>>> heyy.movie_credits.cast
[<ActingCredit> Man in Black - The Dark Tower,
<ActingCredit> Arthur Brennan - The Sea of Trees,
<ActingCredit> Beetle (voice) - Kubo and the Two Strings,
...