Skip to content

configs

configs

DVM service configuration models.

See Also

Dvm: The service class that consumes these configurations. BaseServiceConfig: Base class providing interval, max_consecutive_failures, and metrics fields. KeysConfig: Mixin providing Nostr key management fields.

Classes

DvmConfig

Bases: BaseServiceConfig, KeysConfig

Configuration for the DVM service.

Inherits key management from KeysConfig for Nostr signing.

Attributes:

  • relays (Annotated[list[Relay], BeforeValidator(lambda v: safe_parse(v, parse_relay_url))]) –

    Relay URLs to listen on and publish to.

  • kind (int) –

    NIP-90 request event kind (result = kind + 1000).

  • default_page_size (int) –

    Default limit when not specified.

  • max_page_size (int) –

    Hard ceiling on query limit.

  • tables (dict[str, TableConfig]) –

    Per-table policies (enable/disable, pricing).

  • announce (bool) –

    Whether to publish a NIP-89 handler announcement at startup.

  • fetch_timeout (float) –

    Timeout in seconds for relay event fetching.

Functions