Skip to main content

YouVersion Python SDK

The un-official Python SDK for the YouVersion API. Access Bible versions, books, chapters, verses, and passages programmatically.

PyPI version Python 3.11+

Getting Started

1. Get Your API Key

Request access to the YouVersion API at platform.youversion.com/.

2. Install the SDK

pip install youversion

Or with uv:

uv add youversion

3. Initialize the Client

from youversion import YouVersionClient

client = YouVersionClient(api_key="your-api-key")

4. Make Your First Request

from youversion import YouVersionClient, is_ok

with YouVersionClient(api_key="your-api-key") as client:
    result = client.get_passage(12, "JHN.3.16")

    if is_ok(result):
        passage = result.value
        print(f"{passage.reference}")
        print(passage.content)

Output:

John 3:16
For God so loved the world, that he gave his only begotten Son,
that whosoever believeth on him should not perish, but have eternal life.

5. Display Copyright

When displaying Bible content, you must include the appropriate copyright notice:

result = client.get_version(12)
if is_ok(result):
    version = result.value
    print(version.copyright_short)  # Display with content

Installation

pip

pip install youversion

uv

uv add youversion

Poetry

poetry add youversion

Configuration

from youversion import YouVersionClient

# Basic initialization
client = YouVersionClient(api_key="your-api-key")

# With custom settings
client = YouVersionClient(
    api_key="your-api-key",
    base_url="https://api.youversion.com",  # Default
    timeout=30.0,  # Request timeout in seconds
)

# Using context manager (recommended)
with YouVersionClient(api_key="your-api-key") as client:
    # Client automatically closes when done
    pass

Environment Variables

import os
from youversion import YouVersionClient

client = YouVersionClient(api_key=os.environ["YOUVERSION_API_KEY"])

Sync vs Async Clients

The SDK provides both synchronous and asynchronous clients with identical APIs.

Synchronous Client

Use YouVersionClient for synchronous code:

from youversion import YouVersionClient, is_ok

# With context manager (recommended)
with YouVersionClient(api_key="your-api-key") as client:
    result = client.get_versions("en")
    if is_ok(result):
        for version in result.value.data:
            print(version.title)

Asynchronous Client

Use AsyncYouVersionClient for async code:

import asyncio
from youversion import AsyncYouVersionClient, is_ok

async def main():
    async with AsyncYouVersionClient(api_key="your-api-key") as client:
        result = await client.get_versions("en")
        if is_ok(result):
            for version in result.value.data:
                print(version.title)

asyncio.run(main())

Manual Client Management

If you need more control over the client lifecycle, you can manage it manually instead of using context managers.

Sync Client (Manual)

from youversion import YouVersionClient, is_ok

client = YouVersionClient(api_key="your-api-key")

try:
    result = client.get_versions("en")
    if is_ok(result):
        print(f"Found {len(result.value.data)} versions")

    result = client.get_passage(12, "JHN.3.16")
    if is_ok(result):
        print(result.value.content)
finally:
    # Always close the client to release resources
    client.close()

Async Client (Manual)

import asyncio
from youversion import AsyncYouVersionClient, is_ok

async def main():
    client = AsyncYouVersionClient(api_key="your-api-key")

    try:
        result = await client.get_versions("en")
        if is_ok(result):
            print(f"Found {len(result.value.data)} versions")

        result = await client.get_passage(12, "JHN.3.16")
        if is_ok(result):
            print(result.value.content)
    finally:
        # Always close the client to release resources
        await client.close()

asyncio.run(main())

When to Use Manual Management

  • Connection pooling: Keep a client alive across multiple operations
  • Application lifecycle: Initialize once at startup, close at shutdown
  • Custom resource management: Integration with dependency injection or frameworks

Documentation

  • API Reference - Complete API documentation with all methods, types, and error handling

Metadata

Release files for youversion 0.3.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 youversion 0.3.1
File Size Uploaded
youversion-0.3.1.tar.gz 80.3 kB Details

Built distribution (wheel)

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

Total release size: 97.3 kB

Release files / youversion-0.3.1.tar.gz

Download URL youversion-0.3.1.tar.gz
Size 80.3 kB
Tags Source
SHA-256 checksum
How to use checksums
52a964e389f79d1b9a93a55c4548c2c4f93dc36e6e37f686e88615c0f55a2f63
BLAKE2b-256 checksum
How to use checksums
3c400d9c1cad40c41d8dc8576096d6f7539c5f0b5eafaad608f83c82709793c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 28, 2026.

Transparency log

Release files / youversion-0.3.1-py3-none-any.whl

Download URL youversion-0.3.1-py3-none-any.whl
Size 17.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f5d94f195e8b3c416b1bbc8cc111674352198aec74eb3a2b4a732f346a824f3
BLAKE2b-256 checksum
How to use checksums
d25540dd9016129f2e7c59f906a41a2055a34df8f5a7656b8e33be89cf31db14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 28, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

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