MCPcopy Create free account
hub / github.com/anomalyco/opencode-sdk-python / ResourcesProxy

Class ResourcesProxy

src/opencode_ai/_utils/_resources_proxy.py:9–21  ·  view source on GitHub ↗

A proxy for the `opencode_ai.resources` module. This is used so that we can lazily import `opencode_ai.resources` only when needed *and* so that users can just import `opencode_ai` and reference `opencode_ai.resources`

Source from the content-addressed store, hash-verified

7
8
9class ResourcesProxy(LazyProxy[Any]):
10 """A proxy for the `opencode_ai.resources` module.
11
12 This is used so that we can lazily import `opencode_ai.resources` only when
13 needed *and* so that users can just import `opencode_ai` and reference `opencode_ai.resources`
14 """
15
16 @override
17 def __load__(self) -> Any:
18 import importlib
19
20 mod = importlib.import_module("opencode_ai.resources")
21 return mod
22
23
24resources = ResourcesProxy().__as_proxied__()

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected