Skip to main content

User-visible service supervision for long-running conda-adjacent processes

Project description

conda-broker

conda-broker is a conda plugin that supervises user-visible, opt-in long-running services for conda-adjacent workflows.

It provides:

  • conda broker and cb CLI entry points
  • a local user-scoped broker process
  • process supervision with restart policies, health checks, logs, and events
  • a private pluggy broker-provider API owned by this package
  • a lightweight Broker API for other plugins to check service state without starting the broker

Install

Add conda-broker as a PyPI dependency with Pixi:

pixi add --pypi conda-broker
pixi run cb --help

Or, in a conda installation, use conda-pypi from the base environment:

conda activate base
conda install conda-pypi
conda pypi install conda-broker
conda broker --help

See the documentation for a quickstart, tutorials, task-focused guides, API and CLI reference, and architecture explanations.

Provider API

Broker providers expose services through the conda_broker pluggy project, not through conda's own hook API:

import sys

from conda_broker.hookspec import hookimpl
from conda_broker.models import CondaService, ProcessSpec


@hookimpl
def conda_broker_services():
    yield CondaService(
        name="package-cache",
        summary="Local conda package metadata cache",
        source="conda-package-cache",
        process=ProcessSpec(
            argv=(sys.executable, "-m", "conda_package_cache", "--serve")
        ),
    )

Register the provider module under:

[project.entry-points.conda_broker]
"my-provider" = "my_provider.broker"

Plugins can make runtime decisions without starting the broker:

from conda_broker import Broker

if endpoint := Broker.current().service("package-cache").endpoint(ready=True):
    use_package_cache(endpoint.url)

Development

pixi install
pixi run cb status
pixi run -e test test
pixi run -e dev check
pixi run -e dev demo-check
pixi run -e docs docs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

conda_broker-0.1.0.tar.gz (2.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

conda_broker-0.1.0-py3-none-any.whl (59.5 kB view details)

Uploaded Python 3

File details

Details for the file conda_broker-0.1.0.tar.gz.

File metadata

  • Download URL: conda_broker-0.1.0.tar.gz
  • Upload date:
  • Size: 2.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for conda_broker-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3004f18f1ba4a1790deaeb1e974a457f6073ca077359b502d7b8d7e8c1b357ee
MD5 a92b101fcf6e43420a4e9c416bed2001
BLAKE2b-256 bc59e6af38d3ebb17cc25f90828468be2895859fb48c378c201f49c44d783100

See more details on using hashes here.

Provenance

The following attestation bundles were made for conda_broker-0.1.0.tar.gz:

Publisher: release.yml on jezdez/conda-broker

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file conda_broker-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: conda_broker-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 59.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for conda_broker-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 23ca25d23d0c6f16303695a3c97b22cfbcf8489dcedac19e19e0b458aa41f49c
MD5 40bd52a267e47e3f2d9d232fe81e5b0a
BLAKE2b-256 0d4a52f880015f45138656f218c8147d14d785dae0733f89c19d7e56c4eac1db

See more details on using hashes here.

Provenance

The following attestation bundles were made for conda_broker-0.1.0-py3-none-any.whl:

Publisher: release.yml on jezdez/conda-broker

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page