Skip to main content

Wrapper for jw.org APIs

Project description

Build Status Package Status Documentation Status

Python wrappers for a few jw.org APIs.

Installation

pip install jwlib

Usage

Video API

import jwlib.media as jw

# Select Swedish
session = jw.Session(language='Z')

# Fetch the JW Broadcasting category
studio_category = session.get_category('VODStudio')

# Iterate through all its subcategories
# (this will make more API requests as needed)
for subcategory in studio_category.get_subcategories():

    # Print a category header
    print(f'\n{subcategory.name}\n-----------')

    # Print title and URL of all media items
    for media in subcategory.get_media():
        print(media.title)
        print(media.get_file().url)

See the media documentation for more details.

Publication API

TODO

Search API

TODO

Language API

TODO

Development

An example on how to setup the dev environment:

# Create a virtual Python environement
python -m venv venv
. venv/bin/activate

# Install dependencies
# -e keeps the installed jwlib in sync with your changes
# [dev] installs the dependencies for testing
pip install -e '.[dev]'

# If you also want to build documentation:
pip install -e '.[dev,docs]'

# Show some convenience functions
make help

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

jwlib-1.0.0.tar.gz (5.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jwlib-1.0.0-py3-none-any.whl (34.6 kB view details)

Uploaded Python 3

File details

Details for the file jwlib-1.0.0.tar.gz.

File metadata

  • Download URL: jwlib-1.0.0.tar.gz
  • Upload date:
  • Size: 5.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for jwlib-1.0.0.tar.gz
Algorithm Hash digest
SHA256 be784ef48aacaa10e8803ab54544c03a0e433b8bffa78dd40c269cc75c65d68b
MD5 39ac02670a0e5aaded0c0f9259cf6bfd
BLAKE2b-256 17ee726deac1819175d4c712e0cf0de7f6b317943d4711c255f609f61fd38312

See more details on using hashes here.

Provenance

The following attestation bundles were made for jwlib-1.0.0.tar.gz:

Publisher: build.yml on allejok96/jwlib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jwlib-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: jwlib-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 34.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for jwlib-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bda97f552cfd4c409693dbfd6f6e370fafe53a88093efb53c7e2ac60ae53b830
MD5 ac7f28b64bf9426874c5468078b06ba6
BLAKE2b-256 ad504e2cc39395454622b13701e575876eacc0bacd483d43fbcb707ee92cea06

See more details on using hashes here.

Provenance

The following attestation bundles were made for jwlib-1.0.0-py3-none-any.whl:

Publisher: build.yml on allejok96/jwlib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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