Skip to main content

Phylm

Project description

Phylm

Actions Status Actions Status codecov PyPI version

Film data aggregation with async support.

Motivation

When deciding which film to watch next, it can be helpful to have some key datapoints at your fingertips, for example, the genre, the cast, the Metacritic score and, perhaps most importantly, the runtime. This package provides a Phylm class to gather information from various sources for a given film.

Installation

pip install phylm

Usage

>>> import asyncio
>>> from phylm import Phylm
>>> p = Phylm("The Matrix")
>>> asyncio.run(p.load_source("imdb"))
>>> p.imdb.year
1999
>>> p.imdb.rating
8.7

phylm also provides some tools around movie search results and more:

>>> from phylm.tools import search_movies, get_streaming_providers
>>> search_movies("the matrix")
[{
  'title': 'The Matrix',
  'kind': 'movie',
  'year': 1999,
  'cover_photo': 'https://some-url.com',
  'imdb_id': '0133093',
}, {
  'title': 'The Matrix Reloaded',
  'kind': 'movie',
  'year': 2003,
  'cover_photo': 'https://some-url.com',
  'imdb_id': '0234215',
}, {
...
>>> get_streaming_providers("0234215", regions=["gb"])
{
  'gb': {
    'rent': [{
      'display_priority': 8,
      'logo_path': '/pZgeSWpfvD59x6sY6stT5c6uc2h.jpg',
      'provider_id': 130,
      'provider_name': 'Sky Store',
    }],
    'flatrate': [{
      'display_priority': 8,
      'logo_path': '/ik9djlxNlex6sY6Kjsundc2h.jpg',
      'provider_id': 87,
      'provider_name': 'Netflix',
    }]
  }, {
  ...
}

Help

See the documentation for more details.

Licence

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

phylm-6.1.1.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

phylm-6.1.1-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file phylm-6.1.1.tar.gz.

File metadata

  • Download URL: phylm-6.1.1.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for phylm-6.1.1.tar.gz
Algorithm Hash digest
SHA256 5d5076b8ed51c4049376e4910e407aecedafda43d2ea8c538f74677f6a1b6929
MD5 37bab0b1eb06b2aa7b16bd817363b13e
BLAKE2b-256 76f054af0ebd8b11f7723d3acf139e1745fcb6daed804a07e9aae472b437a0f5

See more details on using hashes here.

File details

Details for the file phylm-6.1.1-py3-none-any.whl.

File metadata

  • Download URL: phylm-6.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for phylm-6.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f3214f069a6f9ab42d686f34d2b6063070ebeb29fe282a336253bacb6bc71efd
MD5 9ea77d25755e6e4a59cbb08d235b149e
BLAKE2b-256 6e27beabe5bcfc9404bb3a78828536e31195622cceff6f460e618b6e6a9c43a3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page