proxystore.endpoint.serve¶
Endpoint serving.
create_app
¶
create_app(
endpoint: Endpoint,
max_content_length: int | None = None,
body_timeout: int = 300,
) -> Quart
Create quart app for endpoint and registers routes.
Parameters:
-
endpoint
(Endpoint
) –Initialized endpoint to forward quart routes to.
-
max_content_length
(int | None
, default:None
) –Max request body size in bytes.
-
body_timeout
(int
, default:300
) –Number of seconds to wait for the body to be completely received.
Returns:
-
Quart
–Quart app.
Source code in proxystore/endpoint/serve.py
serve
¶
serve(
config: EndpointConfig,
*,
log_level: int | str = logging.INFO,
log_file: str | None = None,
use_uvloop: bool = True
) -> None
Initialize endpoint and serve Quart app.
Warning
This function does not return until the Quart app is terminated.
Parameters:
-
config
(EndpointConfig
) –Configuration object.
-
log_level
(int | str
, default:INFO
) –Logging level of endpoint.
-
log_file
(str | None
, default:None
) –Optional file path to append log to.
-
use_uvloop
(bool
, default:True
) –Install uvloop as the default event loop implementation.
Source code in proxystore/endpoint/serve.py
endpoint_handler
async
¶
Route handler for GET /endpoint
.
Responses:
Status Code 200
: JSON containing the keyuuid
with the value as the string UUID of this endpoint.
Source code in proxystore/endpoint/serve.py
evict_handler
async
¶
Route handler for POST /evict
.
Responses:
Status Code 200
: If the operation succeeds. The response message will be empty.Status Code 400
: If the key argument is missing or the endpoint UUID argument is present but not a valid UUID.Status Code 500
: If there was a peer request error. The response will contain the string representation of the internal error.
Source code in proxystore/endpoint/serve.py
exists_handler
async
¶
Route handler for GET /exists
.
Responses:
Status Code 200
: If the operation succeeds. The response message will be empty.Status Code 400
: If the key argument is missing or the endpoint UUID argument is present but not a valid UUID.Status Code 500
: If there was a peer request error. The response will contain the string representation of the internal error.
Source code in proxystore/endpoint/serve.py
get_handler
async
¶
Route handler for GET /get
.
Responses:
Status Code 200
: If the operation succeeds. The response message will contain the octet-stream of the requested data.Status Code 400
: If the key argument is missing or the endpoint UUID argument is present but not a valid UUID.Status Code 404
: If there is no data associated with the provided key.Status Code 500
: If there was a peer request error. The response will contain the string representation of the internal error.
Source code in proxystore/endpoint/serve.py
set_handler
async
¶
Route handler for POST /set
.
Responses:
Status Code 200
: If the operation succeeds. The response message will be empty.Status Code 400
: If the key argument is missing, the endpoint UUID argument is present but not a valid UUID, or the request is missing the data payload.Status Code 500
: If there was a peer request error. The response will contain the string representation of the internal error.