Wrapper for jw.org APIs
Project description
Python wrappers for a few jw.org APIs.
Installation
pip install jwlib
Usage
Browsing JW Broadcasting
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.
Searching at jw.org
import jwlib.search as jw
# Search for videos only
page = jw.search('Caleb', filter_type=jw.FILTER_VIDEO, language='S')
for result in page.results:
print(result.title, result.url_jw)
# Print page number info
print(page.pagination_label)
# Continue on next page
if page.next:
next_page = page.next.open()
for result in next_page.results:
print(result.title, 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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jwlib-1.1.2.tar.gz.
File metadata
- Download URL: jwlib-1.1.2.tar.gz
- Upload date:
- Size: 5.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1587d64794676afd678bdafd35a16f83d7cb91a0200cf7ade9de0bee27863b5a
|
|
| MD5 |
c6118875fd085f9f168d52f5e203b72e
|
|
| BLAKE2b-256 |
ff30588cbde059610896c125e66601dd512faab248da05eabcd9b619cebf12a0
|
Provenance
The following attestation bundles were made for jwlib-1.1.2.tar.gz:
Publisher:
build.yml on allejok96/jwlib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jwlib-1.1.2.tar.gz -
Subject digest:
1587d64794676afd678bdafd35a16f83d7cb91a0200cf7ade9de0bee27863b5a - Sigstore transparency entry: 1388793279
- Sigstore integration time:
-
Permalink:
allejok96/jwlib@425b519af8b146eddbc1f00c8406cd8a8bd81e72 -
Branch / Tag:
refs/tags/v1.1.2 - Owner: https://github.com/allejok96
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@425b519af8b146eddbc1f00c8406cd8a8bd81e72 -
Trigger Event:
push
-
Statement type:
File details
Details for the file jwlib-1.1.2-py3-none-any.whl.
File metadata
- Download URL: jwlib-1.1.2-py3-none-any.whl
- Upload date:
- Size: 38.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
089a47cfe34bd0b8088b8e0e618cd0d4281bad67e8eace5f5d908a11bcf9a95b
|
|
| MD5 |
f4e56326a9eea5af7fe4e492b82865a7
|
|
| BLAKE2b-256 |
f52efd531f032ccb15f072408184679fb25ea33d55e6ac0c253fbb9f0b9f71df
|
Provenance
The following attestation bundles were made for jwlib-1.1.2-py3-none-any.whl:
Publisher:
build.yml on allejok96/jwlib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jwlib-1.1.2-py3-none-any.whl -
Subject digest:
089a47cfe34bd0b8088b8e0e618cd0d4281bad67e8eace5f5d908a11bcf9a95b - Sigstore transparency entry: 1388793394
- Sigstore integration time:
-
Permalink:
allejok96/jwlib@425b519af8b146eddbc1f00c8406cd8a8bd81e72 -
Branch / Tag:
refs/tags/v1.1.2 - Owner: https://github.com/allejok96
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@425b519af8b146eddbc1f00c8406cd8a8bd81e72 -
Trigger Event:
push
-
Statement type: