Skip to main content

Python 3.6+ wrapper for the Letterboxd API

Project description

Letterboxd

v0.1.0a

THE CODE IS CURRENTLY IN AN ALPHA STATE, AND MAY BE VERY BROKEN, AND/OR WHAT IS WORKING NOW MAY BREAK IN THE FUTURE.

A Python 3 implementation of the Letterboxd API v0. Python 3.6+ is required, because this uses formatted strings.

Currently a WORK-IN-PROGRESS, focusing first on retrieving watchlists and other lists.

Letterboxd has posted an example ruby client, but as they say in the readme there:

Although the Letterboxd API isn’t public yet (as at 2017-06-12), we have seeded some developers with API keys.

If you need more information about API access, please see https://letterboxd.com/api-coming-soon/

API Coverage

The library currently covers these Letterboxd API endpoints:

Film

  • /film/{id}
  • /film/{id}/availability — this does not seem to return any data at this time
  • /film/{id}/me

Me

  • /me

Member

  • /member/{id}/watchlist

Contributions

Code files should be passed through the Black Python code formatter before check-in.

Usage

Instantiate the Letterboxd class, and provide it with the api_base URL for the API, your api_key, and your api_secret. You can pass it as a variable to the class initializer, or add it to your environment variables as:

export LBXD_API_KEY="YOUR_KEY_HERE"
export LBXD_API_SECRET="YOUR_SECRET_HERE"

If you do not provide an api_base, it currently defaults to https://api.letterboxd.com/api/v0.

For testing, you can also add environment variables for an account user name and password, and the location of your Charles proxy SSL certificate.

export LBXD_USERNAME="YOUR_USERNAME"
export LBXD_PASSWORD="YOUR_PASSWORD"
export CHARLES_CERTIFICATE="/path/to/charles-ssl-proxying-certificate.pem"

Set the CHARLES environment variable to True to turn the proxy settings on. For example, if you want to use it on a case-by-case basis for testing, run the tests like this:

$ CHARLES="True" py.test

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

letterboxd-0.1.0a5.tar.gz (7.6 kB view hashes)

Uploaded Source

Built Distribution

letterboxd-0.1.0a5-py3-none-any.whl (10.2 kB view hashes)

Uploaded Python 3

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