Skip to main content

Jubilant, the joyful library for driving Juju

Jubilant is a Python library that wraps the Juju CLI, primarily for use in charm integration tests. It provides methods that map 1:1 to Juju CLI commands, but with a type-annotated, Pythonic interface.

You should consider switching to Jubilant if your integration tests currently use pytest-operator (and they probably do). Jubilant has an API you'll pick up quickly, and it avoids some of the pain points of python-libjuju, such as websocket failures and having to use async. Read our design goals.

Jubilant 1.0.0 was released in April 2025. We'll avoid making breaking changes to the API after this point.

Read the full documentation

Using Jubilant

Jubilant is published to PyPI, so you can install and use it with your favorite Python package manager:

$ pip install jubilant
# or
$ uv add jubilant

Because Jubilant calls the Juju CLI, you'll also need to install Juju.

To use Jubilant in Python code:

import jubilant

juju = jubilant.Juju()
juju.deploy('snappass-test')
juju.wait(jubilant.all_active)

# Or only wait for specific applications:
juju.wait(lambda status: jubilant.all_active(status, 'snappass-test', 'another-app'))

Below is an example of a charm integration test. First we define a module-scoped pytest fixture named juju which creates a temporary model and runs the test with a Juju instance pointing at that model. Jubilant'stemp_model context manager creates the model during test setup and destroys it during teardown:

# conftest.py
@pytest.fixture(scope='module')
def juju():
    with jubilant.temp_model() as juju:
        yield juju


# test_deploy.py
def test_deploy(juju: jubilant.Juju):  # Use the "juju" fixture
    juju.deploy('snappass-test')  # Deploy the charm
    status = juju.wait(jubilant.all_active)  # Wait till the app and unit are 'active'

    # Hit the Snappass HTTP endpoint to ensure it's up and running.
    address = status.apps['snappass-test'].units['snappass-test/0'].address
    response = requests.get(f'http://{address}:5000/', timeout=10)
    response.raise_for_status()
    assert 'snappass' in response.text.lower()

You don't have to use pytest with Jubilant, but it's what we recommend. Pytest's assert-based approach is a straight-forward way to write tests, and its fixtures are helpful for structuring setup and teardown.

Metadata

Release files for jubilant 1.13.0

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

Source distribution (sdist)

Source distribution for jubilant 1.13.0
File Size Uploaded
jubilant-1.13.0.tar.gz 37.2 kB Details

Built distribution (wheel)

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

Total release size: 76.6 kB

Release files / jubilant-1.13.0.tar.gz

Download URL jubilant-1.13.0.tar.gz
Size 37.2 kB
Tags Source
SHA-256 checksum
How to use checksums
38131c1f07a05d83e42a24866450949717783edfc2307558e7d4aa0bdfd388a6
BLAKE2b-256 checksum
How to use checksums
cddb73a1732d9f6ad8521f05f31abcf6afca4df8908cd545e1acd19e7042e0ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Aug 31, 2026.

Transparency log

Release files / jubilant-1.13.0-py3-none-any.whl

Download URL jubilant-1.13.0-py3-none-any.whl
Size 39.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a31ffd77dea7045004f6abddc71bf72082c3d003374bf22ea41b5d5588dc83a8
BLAKE2b-256 checksum
How to use checksums
70565dace82567f6ed14fec490fd8314a0db80a0baedbdaa946d292661bf6455
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Aug 31, 2026.

Transparency log
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