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.1.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.1-py3-none-any.whl (59.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: conda_broker-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 4e0fa11c6ebb38f2c93b2610ef19a233ded867749047586e8f702c37c941bce9
MD5 48f7e751b7c8c977b84b2ed48fa5f42b
BLAKE2b-256 66c78fb8dcecdfdcbfd873ae7b0f3cd3a41c7ab91d4a0ab2aaa1b5fb3fa95c4e

See more details on using hashes here.

Provenance

The following attestation bundles were made for conda_broker-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: conda_broker-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 59.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e0f1f450a508902d499538703e03658b3caf6f6077e54ecd028a8b60350602db
MD5 fde8d49cc5726c5cc83e4451ba1f58ca
BLAKE2b-256 f752688b94d962329f60c84778f60bd40b67608b5d5f82eaf633d1051ac37223

See more details on using hashes here.

Provenance

The following attestation bundles were made for conda_broker-0.1.1-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