intrinsic.solutions.providers.ResourceProvider
![]() View source on GitHub |
Provides access resources from a solution.
Methods
append
View source
@abc.abstractmethodappend( handle_or_proto: Union[provided.ResourceHandle, resource_handle_pb2.ResourceHandle] ) -> None
Appends a handle to the resources.
If an item is appended with special characters not allowed in Python field names, it generates a sanitized version replacing special characters by underscores. Consider a handle called "special:name". It will be accessible through: list.special_name list["special_name"] list["special:name"] The handle's proto will always contain special:name as its name.
| Args | |
|---|---|
| Resource handle to add, either wrapper or proto |
update
View source
@abc.abstractmethodupdate() -> None
Fetches current resources from registry.
| Raises | |
|---|---|
| When gRPC call to resource registry fails. |
getitem
View source
@abc.abstractmethodgetitem( name: str ) -> provided.ResourceHandle
Returns the resource handle for the given name.
