MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / get

Method get

misc/python/materialize/zippy/framework.py:83–91  ·  view source on GitHub ↗

Get all capabilities of the specified type.

(self, capability: type[T])

Source from the content-addressed store, hash-verified

81 return len(self.get(capability)) > 0
82
83 def get(self, capability: type[T]) -> list[T]:
84 """Get all capabilities of the specified type."""
85 matches: list[T] = [
86 # NOTE: unfortunately pyright can't handle this
87 cap
88 for cap in self._capabilities
89 if type(cap) == capability # type: ignore
90 ]
91 return matches
92
93 def get_capability_names(self, capability: type[T]) -> list[str]:
94 return [t.name for t in self.get(capability)]

Callers 15

providesMethod · 0.95
get_capability_namesMethod · 0.95
benchmarkFunction · 0.45
ingest_webhookFunction · 0.45
run_queryFunction · 0.45
print_workload_statsFunction · 0.45
_copy_chunkFunction · 0.45
_kafka_chunkFunction · 0.45

Calls

no outgoing calls

Tested by 2

test_partsMethod · 0.36
__init__Method · 0.36