BaseResource
Sub classes¶
| Name | Children | Inherits |
|---|---|---|
| PathResource llmling.config.models Resource loaded from a file or URL. |
||
| TextResource llmling.config.models Raw text resource. |
||
| CLIResource llmling.config.models Resource from CLI command execution. |
||
| RepositoryResource llmling.config.models Git repository content. |
||
| SourceResource llmling.config.models Resource from Python source code. |
||
| CallableResource llmling.config.models Resource from executing a Python callable. |
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| Schema schemez.schema Base class for configuration models. |
⋔ Inheritance diagram¶
graph TD
1028592330["models.BaseResource"]
330168112["schema.Schema"]
3879467795["main.BaseModel"]
2751680898["builtins.object"]
330168112 --> 1028592330
3879467795 --> 330168112
2751680898 --> 3879467795
🛈 DocStrings¶
Bases: Schema
Base class for all resource types.
Source code in src/llmling/config/models.py
description
class-attribute
instance-attribute
¶
Human-readable description of the resource.
mime_type
property
¶
Get the MIME type for this resource.
This should be overridden by subclasses that can determine their MIME type. Default is text/plain.
name
class-attribute
instance-attribute
¶
Technical identifier (automatically set from config key during registration).
processors
class-attribute
instance-attribute
¶
processors: list[ProcessingStep] = Field(default_factory=list)
Processing steps to apply when loading this resource.
supports_watching
property
¶
Whether this resource instance supports watching.
type
class-attribute
instance-attribute
¶
Type identifier for this resource.
uri
class-attribute
instance-attribute
¶
Canonical URI for this resource, set during registration if unset.
watch
class-attribute
instance-attribute
¶
watch: WatchConfig | None = None
Configuration for file system watching, if supported.
get_watch_path
¶
is_templated
¶
is_watched
¶
validate_resource
¶
Validate resource at runtime.
This validation is intentionally separated from Pydantic's model validation to handle: - Remote resources and URLs - Template/placeholder paths that don't exist during config loading - Resources that may become available after config loading - Validation of actual resource availability separate from config structure
Returns:
| Type | Description |
|---|---|
list[str]
|
List of validation warnings (empty if all valid) |