Skip to main content

jwlib

Build Status Package Status Documentation Status

Python wrappers for a few jw.org APIs.

Installation

pip install jwlib

Usage

Browsing JW Broadcasting

from jwlib.media import get_session

# Print a list of language codes
for lang in get_session().get_languages():
     print(lang.code, lang.name)

# Select a language
session = get_session(language='E')

# Browse the category tree
root = session.get_category()
for subcategory in root.get_subcategories():
    print(subcategory.key)

# Select a category
category = session.get_category('LatestVideos')

# List media items
for media in category.get_media():
    print(media.title)
    print(media.get_file().url)

See the media documentation for more details.

Searching at jw.org

from jwlib.search import search
from jwlib.search.const import FILTER_VIDEO

# Search for videos only
page = search('Caleb', filter_type=FILTER_VIDEO, language='E')

# Print result page info
print(page.pagination_label)

# Print results
for result in page.results:
    print(result.title)
    print(result.url_jw)

# Continue on next page
if page.next:
    next_page = page.next.open()
    print(next_page.pagination_label)
    for result in next_page.results:
        print(result.title)
        print(result.url_jw)

See the search documentation for more details.

Downloading publications

Alpha version, may be subject to change.

Listing languages

Alpha version, may be subject to change.

Development

An example on how to setup the dev environment:

# Create a virtual Python environment
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
# [dev,docs] if you also want to build documentation
pip install -e '.[dev]'

# Run the tests
make test

# Show more convenience functions
make help

Release files for jwlib 1.2.1

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

Source distribution (sdist)

Source distribution for jwlib 1.2.1
File Size Uploaded
jwlib-1.2.1.tar.gz 5.7 MB Details

Built distribution (wheel)

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

Total release size: 5.7 MB

Release files / jwlib-1.2.1.tar.gz

Download URL jwlib-1.2.1.tar.gz
Size 5.7 MB
Tags Source
SHA-256 checksum
How to use checksums
32eb7e94d9846b665872bc043780d6a0fd8d268e04829fb1666c6317ae12b070
BLAKE2b-256 checksum
How to use checksums
765a9d769a9f3f7bf69f72c61c9fc15beb02ea16311f5fa65f0901fa4dac52e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release files / jwlib-1.2.1-py3-none-any.whl

Download URL jwlib-1.2.1-py3-none-any.whl
Size 50.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
94114ff9e21044862ff63f729d42baa0eb61acdef9aab75358be0bd1e5697c8a
BLAKE2b-256 checksum
How to use checksums
87108a374b0d1061eb74c566cf393a91a28cc38d57de385b8500474b9637462d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.2.1 This release

2 release files

1.2.0

2 release files

1.1.2

2 release files

1.1.0

2 release files

1.0.0

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