Sierra Client
Sierra ClientLink
The sierra.client
module exposes the SierraDevelopmentClient
class, which orchestrates environment setup, script loading, caching, and compilation.
Initializing SierraDevelopmentClient
sierra.client
Link
ClassesLink
InvokerWithLoad
Link
Protocol for invoker scripts with a load method.
PARAMETER | DESCRIPTION |
---|---|
client
|
The client instance to use for loading the invoker script.
TYPE:
|
FunctionsLink
load
Linkload(client: SierraDevelopmentClient) -> None
Load the invoker script.
PARAMETER | DESCRIPTION |
---|---|
client
|
The client instance to use for loading the invoker script.
TYPE:
|
ClientParams
Link
A typed dictionary for passing client parameters.
ATTRIBUTE | DESCRIPTION |
---|---|
logger |
The logger instance for capturing client activity.
TYPE:
|
cache |
The cache manager instance for handling caching operations.
TYPE:
|
Notes
This TypedDict structure is used to encapsulate optional client parameters that can be provided to the SierraDevelopmentClient.
AttributesLink
SierraDevelopmentClient
Link
SierraDevelopmentClient(
environment_path: pathlib.Path = pathlib.Path.cwd(),
environment_name: str = "default_env",
**kwargs: typing.Unpack[ClientParams],
)
Initialize the Sierra Development Client.
PARAMETER | DESCRIPTION |
---|---|
environment_path
|
Path to the root of the Sierra environment. |
environment_name
|
Name of the environment configuration to load.
TYPE:
|
**kwargs
|
Optional: logger and cache manager.
TYPE:
|
AttributesLink
logger
instance-attribute
Linklogger: sierra_internal_logger.UniversalLogger = kwargs.get(
"logger", sierra_internal_logger.UniversalLogger()
)
environment
instance-attribute
Linkenvironment: sierra_core_environment.SierraDevelopmentEnvironment = sierra_core_environment.SierraDevelopmentEnvironment(
client=self,
name=environment_name,
path=environment_path,
)
cache
instance-attribute
Linkcache: sierra_internal_cache.CacheManager = kwargs.get(
"cache",
sierra_internal_cache.CacheManager(
cache_dir=self.environment.config_path / "cache"
),
)
http_client
instance-attribute
Link
loader
instance-attribute
Linkloader: sierra_core_loader.SierraSideloader = (
sierra_core_loader.SierraSideloader(client=self)
)
builder
instance-attribute
Linkbuilder = sierra_core_builder.SierraInvokerBuilder(
client=self
)
FunctionsLink
load_invoker
Linkload_invoker(invoker: sierra_invoker.InvokerScript) -> None
Register a single invoker instance with the client.
PARAMETER | DESCRIPTION |
---|---|
invoker
|
An instance of an InvokerScript.
TYPE:
|
unload_invoker
Linkunload_invoker(
invoker: sierra_invoker.InvokerScript,
) -> None
Unregister a single invoker instance from the client.
PARAMETER | DESCRIPTION |
---|---|
invoker
|
An instance of an InvokerScript.
TYPE:
|
load_invokers_from_scripts
LinkAutomatically discover and load all InvokerScript subclasses from .py files in the environment's scripts directory.