Skip to main content

BlendJob

中文文档

BlendJob is a local Job Server runtime for Blender extensions. It runs long tasks in an isolated Python environment and provides a reusable Blender Operator workflow with progress, cancellation, FIFO scheduling, result delivery, and server lifecycle management.

It is designed for AI inference, model downloads, media processing, geometry computation, and other work that benefits from running outside Blender's main process.

How it works

A BlendJob feature has three parts:

  1. A Server Handler defines the Python task.
  2. JobRuntime configures the Server entrypoint, environment, and storage.
  3. A Blender Operator inherits runtime.JobOperatorBase, submits parameters, and applies the result on Blender's main thread.

Quick example

Register a backend task:

# example_job/server/__init__.py
from blendjob import JobServer


server = JobServer("Example Job Server")


@server.job("double")
def double(context, parameters):
    context.progress(0.5, "Calculating")
    return {"value": parameters["value"] * 2}

Configure the Blender runtime:

# example_job/__init__.py
from pathlib import Path

from blendjob import JobRuntime


runtime = JobRuntime(
    "server:server",
    entrypoint_root=Path(__file__).parent,
    storage_root=Path.home() / ".example-job",
    environment={
        "python": "3.10",
        "packages": ["numpy==2.4.2"],
    },
    namespace="example_job",
)

Define the Blender Operator:

# example_job/__init__.py (continued)
import bpy

JobOperatorBase = runtime.JobOperatorBase


class DoubleValue(JobOperatorBase, bpy.types.Operator):
    bl_idname = "example_job.double_value"
    bl_label = "Double Value"
    job_type = "double"

    value: bpy.props.IntProperty(default=21)

    def request(self, _context):
        return {"value": self.value}

    def response(self, _context, result):
        self.report({"INFO"}, f"Result: {result.value['value']}")

The Getting Started guide provides a complete, ready-to-run Blender extension layout with registration and UI code.

Installation

Install BlendJob in a regular Python project with pip or uv:

python -m pip install blendjob
uv add blendjob

The package has no dependencies, which keeps the Blender-side runtime lightweight. BlendJob's environment installer automatically installs FastAPI and Uvicorn in the independent server environment. To create a FastAPI app or run the server directly in an existing Python environment, install those dependencies there separately.

For a Blender extension, bundle the BlendJob wheel in wheels/ and declare it in blender_manifest.toml:

wheels = ["./wheels/blendjob-<version>-py3-none-any.whl"]

Supported runtime targets are Python 3.10+, Windows x64, macOS arm64, and Linux x64.

Documentation

Development

uv sync
uv run pytest
uv build
uv run mkdocs build --strict

Versioned documentation uses Mike:

uv run mike deploy --update-aliases 0.1 latest
uv run mike set-default latest

License

BlendJob is available under the MIT License.

Metadata

Release files for blendjob 0.1.26

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

Source distribution (sdist)

Source distribution for blendjob 0.1.26
File Size Uploaded Provenance Actions
blendjob-0.1.26.tar.gz 34.5 kB Without provenance Details for blendjob-0.1.26.tar.gz

Built distribution (wheel)

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

Total release size: 77.0 kB

Release files / blendjob-0.1.26.tar.gz

Download URL blendjob-0.1.26.tar.gz
Size 34.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e5307858e538e258ce678c836b4dd00eba824a68bdcb49cfc9d7808e6309a642
BLAKE2b-256 checksum
How to use checksums
2de12bf0fe1a80f6ae4718fb02104c4e2e711c98759dee29c33bc30332bc94c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / blendjob-0.1.26-py3-none-any.whl

Download URL blendjob-0.1.26-py3-none-any.whl
Size 42.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e0e9f64726630fbb4c86929d94361b192c8c6feac3c28f5f37c80eeac11bb68
BLAKE2b-256 checksum
How to use checksums
c487f022a3b8b7c124d79741f5bd849639e95f59c49e8cb90b26c2e7542ed4f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for blendjob 0.1.26

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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