A simple JustWatch Python API
Project description
Simple JustWatch Python API
A simple unofficial JustWatch Python API which uses GraphQL to access JustWatch data, built with httpx and Python3.11.
Installation
Project is available in PyPi:
pip install simple-justwatch-python-api
Usage
Currently, there's only one function available - search JustWatch:
from simplejustwatchpythonapi.justwatch import search
results = search("title", "US", "en", 5, True)
Only the first argument is required, it specifies a title to search.
Other arguments in order are:
strcountry code to search for offers, have to be a 2-letter code, e.g.US,GB,FR, etc. It should be uppercase, however lowercase codes are automatically converted to uppercase. By defaultUSis used.strlanguage code, usually 2-letter lowercase code, e.g.en,fr, etc. By defaultenis used.inthow many results should be returned. Actual response can contain fewer entries if fewer are found. By default4is used.boolspecify if only best offers should be returned (True) or all offers (False). By defaultTrueis used.
Returned value is a list of MediaEntry objects:
class MediaEntry(NamedTuple):
entry_id: str
object_id: int
object_type: str
title: str
url: str
release_year: int
release_date: str
genres: list[str]
imdb_id: str | None
poster: str
backdrops: list[str]
offers: list[Offer]
class Offer(NamedTuple):
monetization_type: str
presentation_type: str
url: str
price_string: str | None
price_value: float | None
price_currency: str
name: str
technical_name: str
icon: str
Disclaimer
This API is in no way affiliated, associated, authorized, endorsed by, or in any way officially connected with JustWatch. This is an independent and unofficial project. Use at your own risk.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file simple-justwatch-python-api-0.4.tar.gz.
File metadata
- Download URL: simple-justwatch-python-api-0.4.tar.gz
- Upload date:
- Size: 17.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f480b8aafc5fb20a05aba073f90c8c8454ec5171839348eb90f54ff1cf044c8
|
|
| MD5 |
0bbf913d0322b5086d7d833409448db4
|
|
| BLAKE2b-256 |
8a4a04c3a89c9f0b8a9d0463c9e62d87b92d52355f37956d5190cf62e1e61f60
|