EventSourceConfig
Sub classes¶
| Name | Children | Inherits |
|---|---|---|
| FileWatchConfig evented_config.configs File watching event source. |
||
| WebhookConfig evented_config.configs Webhook event source. |
||
| TimeEventConfig evented_config.configs Time-based event source configuration. |
||
| EmailConfig evented_config.configs Email event source configuration. |
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| Schema schemez.schema Base class for configuration models. |
⋔ Inheritance diagram¶
graph TD
711273161["configs.EventSourceConfig"]
330168112["schema.Schema"]
3879467795["main.BaseModel"]
2751680898["builtins.object"]
330168112 --> 711273161
3879467795 --> 330168112
2751680898 --> 3879467795
🛈 DocStrings¶
Bases: Schema
Base configuration for event sources.
Source code in src/evented_config/configs.py
enabled
class-attribute
instance-attribute
¶
Whether this event source is active.
include_metadata
class-attribute
instance-attribute
¶
Control metadata visibility in template.
include_timestamp
class-attribute
instance-attribute
¶
Control timestamp visibility in template.
name
class-attribute
instance-attribute
¶
Unique identifier for this event source.
template
class-attribute
instance-attribute
¶
template: str = Field(
default=DEFAULT_TEMPLATE,
examples=[DEFAULT_TEMPLATE, "New event: {{ content }}", "{{ timestamp }}: {{ source }}"],
title="Event template",
)
Jinja2 template for formatting events.
type
class-attribute
instance-attribute
¶
Discriminator field for event source types.
get_event_source
¶
get_event_source() -> (
FileSystemEventSource | WebhookEventSource | EmailEventSource | TimeEventSource
)
Create the event source instance.
Returns:
| Type | Description |
|---|---|
FileSystemEventSource | WebhookEventSource | EmailEventSource | TimeEventSource
|
The configured event source instance. |