proxystore.endpoint.client¶
Utilities for client interactions with endpoints.
evict
¶
evict(
address: str,
key: str,
endpoint: UUID | str | None = None,
session: Session | None = None,
) -> None
Evict the object associated with the key.
Parameters:
-
address
(str
) –Address of endpoint.
-
key
(str
) –Key associated with object to evict.
-
endpoint
(UUID | str | None
, default:None
) –Optional UUID of remote endpoint to forward operation to.
-
session
(Session | None
, default:None
) –Session instance to use for making the request. Reusing the same session across multiple requests to the same host can improve performance.
Raises:
-
RequestException
–If the endpoint request results in an unexpected error code.
Source code in proxystore/endpoint/client.py
exists
¶
exists(
address: str,
key: str,
endpoint: UUID | str | None = None,
session: Session | None = None,
) -> bool
Check if an object associated with the key exists.
Parameters:
-
address
(str
) –Address of endpoint.
-
key
(str
) –Key potentially associated with stored object.
-
endpoint
(UUID | str | None
, default:None
) –Optional UUID of remote endpoint to forward operation to.
-
session
(Session | None
, default:None
) –Session instance to use for making the request. Reusing the same session across multiple requests to the same host can improve performance.
Returns:
-
bool
–If an object associated with the key exists.
Raises:
-
RequestException
–If the endpoint request results in an unexpected error code.
Source code in proxystore/endpoint/client.py
get
¶
get(
address: str,
key: str,
endpoint: UUID | str | None = None,
session: Session | None = None,
) -> bytes | None
Get the serialized object associated with the key.
Parameters:
-
address
(str
) –Address of endpoint.
-
key
(str
) –Key associated with object to retrieve.
-
endpoint
(UUID | str | None
, default:None
) –Optional UUID of remote endpoint to forward operation to.
-
session
(Session | None
, default:None
) –Session instance to use for making the request. Reusing the same session across multiple requests to the same host can improve performance.
Returns:
-
bytes | None
–Serialized object or
None
if the object does not exist.
Raises:
-
RequestException
–If the endpoint request results in an unexpected error code.
Source code in proxystore/endpoint/client.py
put
¶
put(
address: str,
key: str,
data: bytes,
endpoint: UUID | str | None = None,
session: Session | None = None,
) -> None
Put a serialized object in the store.
Parameters:
-
address
(str
) –Address of endpoint.
-
key
(str
) –Key associated with object to retrieve.
-
data
(bytes
) –Serialized data to put in the store.
-
endpoint
(UUID | str | None
, default:None
) –Optional UUID of remote endpoint to forward operation to.
-
session
(Session | None
, default:None
) –Session instance to use for making the request. Reusing the same session across multiple requests to the same host can improve performance.
Raises:
-
RequestException
–If the endpoint request results in an unexpected error code.