Skip to main content

MyApiMovies API Client

This client facilitates MyApiMovies API calls. You only need a token that you can obtain by registering here

Init the client

Initialize the class MyApiMovies with your token

from myapimovies import MyApiMovies

client = MyApiMovies('<TOKEN>')

Examples

Getting movie by id

from myapimovies import MyApiMovies

client = MyApiMovies('<TOKEN>')

IMDB_ID_AVENGERS_ENDGAME = 'tt4154796'

response = client.movie(imdb_id=IMDB_ID_AVENGERS_ENDGAME)
first_result = response.data[0]

print(f'ImdbId: {first_result.imdbId}')
print(f'Title: {first_result.title}')
print(f'Year: {first_result.year}')
print(f'Poster: {first_result.posterUrl}')

Search movie

from myapimovies import MyApiMovies

client = MyApiMovies('<TOKEN>')

title = 'Yesterday'
year = 2019

response = client.movie_search(title=title, year=year)
first_result = response.data[0]

print(f'ImdbId: {first_result.imdbId}')
print(f'Title: {first_result.title}')
print(f'Year: {first_result.year}')
print(f'Poster: {first_result.posterUrl}')

Similar movies

from myapimovies import MyApiMovies

client = MyApiMovies('<TOKEN>')

IMDB_ID_AVENGERS_ENDGAME = 'tt4154796'

response = client.similar_movies(imdb_id=IMDB_ID_AVENGERS_ENDGAME)
first_result = response.data[0]

print(f'ImdbId: {first_result.imdbId}')
print(f'Title: {first_result.title}')
print(f'Year: {first_result.year}')
print(f'Poster: {first_result.posterUrl}')

Several data at the same time about a movie

from myapimovies import MyApiMovies

client = MyApiMovies('<TOKEN>')

args = {
    'imdbId': 'tt0133093',
    'actors': 'main==true;page==1',
    'akas': ''
}

response = client.movie_all_in_one(args=args)
first_result = response.data[0]

actors_first_result = first_result.actors.data[0]

print(f'Character: {actors_first_result.character}')
print(f'Character url: {actors_first_result.characterUrl}')
print(f'Main: {actors_first_result.main}')

aka_first_result = first_result.akas.data[0]

print(f'Title: {aka_first_result.title}')
print(f'Country: {aka_first_result.country.country}')

movie_first_result = first_result.movie.data

print(f'ImdbId: {movie_first_result.imdbId}')
print(f'Title: {movie_first_result.title}')
print(f'Year: {movie_first_result.year}')
print(f'Poster: {movie_first_result.posterUrl}')

Search person

from myapimovies import MyApiMovies

client = MyApiMovies('<TOKEN>')

IMDB_ID_JIM_PARSONS = 'nm1433588'

response = client.name(imdb_id=IMDB_ID_JIM_PARSONS)
first_result = response.data[0]

print(f'ImdbId: {first_result.imdbId}')
print(f'Actor: {first_result.actorActress}')
print(f'Biography: {first_result.biography}')
print(f'Photo: {first_result.photoUrl}')

Several data at the same time about a person

from myapimovies import MyApiMovies

client = MyApiMovies('<TOKEN>')

IMDB_ID_JIM_PARSONS = 'nm1433588'

args = {
    'imdbId': IMDB_ID_JIM_PARSONS,
    'alternative': ''
}

response = client.name_all_in_one(args=args)
first_result = response.data[0]

name_first_result = first_result.name.data

print(f'ImdbId: {name_first_result.imdbId}')
print(f'Actor: {name_first_result.actorActress}')
print(f'Biography: {name_first_result.biography}')
print(f'Photo: {name_first_result.photoUrl}')

alternative_not_found = first_result.alternative

# No alternate name
print(f'Code: {alternative_not_found.code}')
print(f'Error: {alternative_not_found.error}')

Metadata

Release files for myapimovies 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for myapimovies 0.0.3
File Size Uploaded
myapimovies-0.0.3.tar.gz 23.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for myapimovies 0.0.3
File Interpreter ABI Platform
myapimovies-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 41.0 kB

Release files / myapimovies-0.0.3.tar.gz

Download URL myapimovies-0.0.3.tar.gz
Size 23.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b23b9b454bf06d45d860e3c1d317be909601d9c554d4445d6d81f4e28ec9fff9
BLAKE2b-256 checksum
How to use checksums
cd09771857e6bea1bdcbe527db8d8be817670ee26f69910630202954ab4ffb3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.0

Release files / myapimovies-0.0.3-py3-none-any.whl

Download URL myapimovies-0.0.3-py3-none-any.whl
Size 17.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f6dd18d8290995e226a23e6de1076353bdefdaa8faabd5b082b50a75762084b3
BLAKE2b-256 checksum
How to use checksums
4653ed7e34d38d9b246e792919e06667b33eeb0ff8c412ca47f9e39643394449
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.0

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page