MCPcopy
hub / github.com/redis/redis-py / get_endpoint

Function get_endpoint

tests/conftest.py:777–791  ·  view source on GitHub ↗
(endpoint_name: str)

Source from the content-addressed store, hash-verified

775
776
777def get_endpoint(endpoint_name: str):
778 endpoints_config = os.getenv("REDIS_ENDPOINTS_CONFIG_PATH", None)
779
780 if not (endpoints_config and os.path.exists(endpoints_config)):
781 raise FileNotFoundError(f"Endpoints config file not found: {endpoints_config}")
782
783 try:
784 with open(endpoints_config, "r") as f:
785 data = json.load(f)
786 db = data[endpoint_name]
787 return db["endpoints"][0]
788 except Exception as e:
789 raise ValueError(
790 f"Failed to load endpoints config file: {endpoints_config}"
791 ) from e
792
793
794def wait_for_command(client, monitor, command, key=None):

Callers 2

endpointFunction · 0.90
endpointFunction · 0.90

Calls 2

existsMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected