Skip to content

cli

doppler-cli — signal processing pipeline orchestration.

The importable surface is the block API a pipeline is extended with: Block, the base class of a pipeline stage the CLI spawns; BlockConfig, the pydantic model its settings are declared on; and register, the decorator that makes a block reachable by name. They live in doppler.cli.blocks and are exported here (#3005). They need the CLI extra, pip install 'doppler-dsp[cli]'.

The export is lazy on purpose. Every console script lives under this package (doppler-source and doppler-fir need no pydantic, and doppler prints how to install the extra when it is missing), so an eager import here would load pydantic for all of them and break each one on an install without the extra. The TYPE_CHECKING import is what the generated reference and type checkers read; at run time __getattr__ imports doppler.cli.blocks on first use of a name.

Modules:

Name Description
blocks

Block base class and registry.

compose

doppler compose — init, up, down.

dopplerfile

doppler dopplerfile — YAML-defined custom block loader.

fir

doppler-fir — streaming FIR filter chain block.

ports

Auto port allocation for doppler pipeline blocks.

ps

doppler ps / stop / kill / logs / inspect commands.

source

doppler-source — streaming IQ source entry point.

state

Chain state persistence in ~/.doppler/chains/.

tests

Classes:

Name Description
Block

Base class for all doppler pipeline blocks.

BlockConfig

Base config for all blocks.

Functions:

Name Description
register

Decorator to register a Block subclass by name.

__version__ module-attribute

__version__ = '0.1.0'

__all__ module-attribute

__all__ = ['Block', 'BlockConfig', 'register']

Block

Bases: ABC

Base class for all doppler pipeline blocks.

Subclasses declare a name and a Config pydantic model. The CLI uses the Config schema to scaffold compose file defaults and to validate user-supplied overrides.

A block has zero or one input port and zero or one output port:

  • source: no input, one output (binds PUSH)
  • chain: one input (connects PULL), one output (binds PUSH)
  • sink: one input (connects PULL), no output

Methods:

Name Description
command

Return the argv list to spawn this block as a subprocess.

status_lines

Return human-readable status lines printed after the block starts.

Attributes:

Name Type Description
name str
Config Type[BlockConfig]
role str

name class-attribute

name: str

Config class-attribute

Config: Type[BlockConfig]

role class-attribute

role: str

command abstractmethod

command(
    config: BlockConfig,
    input_addr: str | None,
    output_addr: str | None,
) -> list[str]

Return the argv list to spawn this block as a subprocess.

status_lines

status_lines(config: BlockConfig) -> list[str]

Return human-readable status lines printed after the block starts.

Override in sink/source subclasses to surface URLs, ports, etc.

BlockConfig

Bases: BaseModel

Base config for all blocks.

register

register(cls: Type[Block]) -> Type[Block]

Decorator to register a Block subclass by name.

__getattr__

__getattr__(name: str) -> object