Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

physionlabs

Official Python client for the Galileo video evaluation API.

Not published yet. This repository is under construction; the package does not exist on PyPI and the API surface below is not final.

What Galileo does

Submit a generated video and a prompt; get back the places where the video has visual defects and the places where it does not do what the prompt asked.

from physionlabs import Galileo

galileo = Galileo()  # reads GALILEO_API_KEY

evaluation = galileo.evaluations.create_and_wait(
    prompt="A red ball rolls off a table and bounces twice.",
    video={"url": "https://cdn.example.com/red-ball.mp4"},
)

# `result` is None on a failed run, so it is worth branching rather than
# reaching straight in — a failed evaluation is an outcome, not an exception.
if evaluation.status.value == "failed":
    print("failed:", evaluation.error.message if evaluation.error else "no reason given")
else:
    for finding in (evaluation.result.glitches if evaluation.result else []):
        print(finding.type.value, finding.description)

partial is also terminal and DOES carry a result: one detector finished and another did not, and detectors says which of them to trust. A caller waiting for completed alone waits forever.

Uploading a local file instead of pointing at a URL — three calls behind one, and the bytes are streamed rather than held in memory:

video = galileo.videos.upload("./clip.mp4")
evaluation = galileo.evaluations.create_and_wait(
    prompt="A red ball rolls off a table and bounces twice.",
    video={"upload_id": video.id},
)

Walking a large account, and retrying what failed:

for ev in galileo.evaluations.iterate(status=["failed"]):
    nxt = galileo.evaluations.retry(ev.id)   # idempotent, unlike create
    print(ev.id, "->", nxt.id)

retry() is the only idempotent submission in this API: press it in a burst and every caller is handed the same successor. create() is not, which is why this client never retries it — see the note in resources/evaluations.py.

The contract

This client is not hand-written against a running server. openapi/galileo-v1.yaml is a copy of the API's OpenAPI description, and the models in physionlabs/models.py are generated from it — so a field cannot be wrong here without being wrong in the contract.

openapi/SOURCE records which upstream revision the copy is. python scripts/check_contract.py fails if the copy has been edited locally, or if the generated models are not what the contract produces.

The Node client, @physionlabs/galileo, is built from the same copy of the same file.

Development

uv sync
uv run python scripts/generate_models.py   # regenerate models from the contract
uv run python scripts/check_contract.py    # verify the copy and the models are in step
uv run pytest
uv run mypy

License

Apache-2.0. Chosen over MIT for the explicit patent grant: MIT is silent on patents, which is one more thing for a reviewer to think about, and Apache-2.0's retaliation clause protects everyone using it.

Metadata

Release files for physionlabs 0.1.0rc1

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

Source distribution (sdist)

Source distribution for physionlabs 0.1.0rc1
File Size Uploaded Provenance Actions
physionlabs-0.1.0rc1.tar.gz 154.8 kB With provenance Details for physionlabs-0.1.0rc1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for physionlabs 0.1.0rc1
File Interpreter ABI Platform Actions
physionlabs-0.1.0rc1-py3-none-any.whl Python 3 none any Details for physionlabs-0.1.0rc1-py3-none-any.whl

Total release size: 182.2 kB

Release files / physionlabs-0.1.0rc1.tar.gz

Download URL physionlabs-0.1.0rc1.tar.gz
Size 154.8 kB
Tags Source
SHA-256 checksum
How to use checksums
08b4adaded241158fdfe35844e0739b7c55817cc5788904e76084eece5a72c7d
BLAKE2b-256 checksum
How to use checksums
f9f62e8aea642329df2f8e36003419a38337c3cd151b47862cb0fdf8f742b43c
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 Aug 27, 2026.

Transparency log

Release files / physionlabs-0.1.0rc1-py3-none-any.whl

Download URL physionlabs-0.1.0rc1-py3-none-any.whl
Size 27.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7186818254abd079178ec34671ba175dc7c46a4f3eca0f101c0ce6ba6b67a7fb
BLAKE2b-256 checksum
How to use checksums
a652706ff13ef860e3b60f2600495043d8fd8370607a840e1f1eca8a9bbc8699
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 Aug 27, 2026.

Transparency log

Security for physionlabs 0.1.0rc1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for physionlabs-0.1.0rc1.tar.gz

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 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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