configs
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| EmailConfig evented_config.configs Email event source configuration. |
||
| EventSourceConfig evented_config.configs Base configuration for event sources. |
||
| FileWatchConfig evented_config.configs File watching event source. |
||
| TimeEventConfig evented_config.configs Time-based event source configuration. |
||
| WebhookConfig evented_config.configs Webhook event source. |
🛈 DocStrings¶
Event source configuration.
This is a lightweight config-only package for fast imports.
For the actual event sources, use from evented import ....
EmailConfig
¶
Bases: EventSourceConfig
Email event source configuration.
Monitors an email inbox for new messages and converts them to events.
Source code in src/evented_config/configs.py
check_interval
class-attribute
instance-attribute
¶
check_interval: int = Field(
default=60,
gt=0,
description="Seconds between inbox checks",
examples=[30, 60, 300],
title="Check interval",
)
How often to check for new emails (in seconds)
filters
class-attribute
instance-attribute
¶
filters: dict[str, str] = Field(
default_factory=dict, description="Email filtering criteria", title="Email filters"
)
Filtering rules for emails (subject, from, etc)
folder
class-attribute
instance-attribute
¶
Folder/mailbox to monitor
host
class-attribute
instance-attribute
¶
host: str = Field(
description="IMAP server hostname",
examples=["imap.gmail.com", "outlook.office365.com", "imap.example.com"],
title="IMAP server host",
)
IMAP server hostname (e.g. 'imap.gmail.com')
mark_seen
class-attribute
instance-attribute
¶
Whether to mark processed emails as seen
max_size
class-attribute
instance-attribute
¶
max_size: int | None = Field(
default=None,
description="Maximum email size in bytes",
examples=[1048576, 5242880, 10485760],
title="Maximum email size",
)
Size limit for processed emails
password
class-attribute
instance-attribute
¶
Account password or app-specific password
port
class-attribute
instance-attribute
¶
Server port (defaults to 993 for IMAP SSL)
ssl
class-attribute
instance-attribute
¶
Whether to use SSL/TLS connection
type
class-attribute
instance-attribute
¶
Email event.
username
class-attribute
instance-attribute
¶
Email account username/address
get_event_source
¶
get_event_source() -> EmailEventSource
EventSourceConfig
¶
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. |
FileWatchConfig
¶
Bases: EventSourceConfig
File watching event source.
Source code in src/evented_config/configs.py
debounce
class-attribute
instance-attribute
¶
Minimum time (ms) between trigger events.
extensions
class-attribute
instance-attribute
¶
extensions: list[str] | None = Field(
default=None,
examples=[[".py", ".md"], [".js", ".ts", ".json"], [".yaml", ".yml"]],
title="File extensions",
)
File extensions to monitor (e.g. ['.py', '.md']).
ignore_paths
class-attribute
instance-attribute
¶
ignore_paths: list[str] | None = Field(
default=None,
examples=[["__pycache__", ".git"], ["node_modules"], ["*.tmp"]],
title="Ignore patterns",
)
Paths or patterns to ignore.
paths
class-attribute
instance-attribute
¶
paths: list[str] = Field(
examples=[["./src", "./docs"], ["/home/user/projects"], ["*.py", "config/*.yaml"]],
title="Watch paths",
)
Paths or patterns to watch for changes.
recursive
class-attribute
instance-attribute
¶
Whether to watch subdirectories.
type
class-attribute
instance-attribute
¶
File / folder content change events.
get_event_source
¶
get_event_source() -> FileSystemEventSource
Create file system event source instance.
TimeEventConfig
¶
Bases: EventSourceConfig
Time-based event source configuration.
Source code in src/evented_config/configs.py
prompt
class-attribute
instance-attribute
¶
prompt: str = Field(
examples=["Daily status check", "Generate weekly report", "Check system health"],
title="Trigger prompt",
)
Prompt to send to the agent when the schedule triggers.
schedule
class-attribute
instance-attribute
¶
Cron expression for scheduling (e.g. '0 9 * * 1-5' for weekdays at 9am)
skip_missed
class-attribute
instance-attribute
¶
Whether to skip executions missed while agent was inactive
timezone
class-attribute
instance-attribute
¶
timezone: str | None = Field(
default=None, examples=["UTC", "America/New_York", "Europe/London"], title="Schedule timezone"
)
Timezone for schedule (defaults to system timezone)
type
class-attribute
instance-attribute
¶
Time event.
get_event_source
¶
get_event_source() -> TimeEventSource
WebhookConfig
¶
Bases: EventSourceConfig
Webhook event source.
Source code in src/evented_config/configs.py
host
class-attribute
instance-attribute
¶
Interface to bind to. Loopback by default; set a secret when binding a public one.
path
class-attribute
instance-attribute
¶
URL path to handle requests.
port
class-attribute
instance-attribute
¶
Port to listen on.
secret
class-attribute
instance-attribute
¶
secret: SecretStr | None = Field(
default=None, examples=["webhook_secret_123", "github_webhook_key"], title="Validation secret"
)
Optional secret for request validation (HMAC signature, see the docs).
type
class-attribute
instance-attribute
¶
webhook-based event.
get_event_source
¶
get_event_source() -> WebhookEventSource