schrodinger.livedesign.endpoint_server module

Local web server for testing LiveDesign JSON endpoints.

Usage:

$SCHRODINGER/run python3 -m schrodinger.livedesign.endpoint_server
$SCHRODINGER/run python3 -m schrodinger.livedesign.endpoint_server --port 8080
$SCHRODINGER/run python3 -m schrodinger.livedesign.endpoint_server --public

Opens a browser to a testing UI that allows selecting, configuring, and invoking LiveDesign JSON endpoints. Can be run with –public to allow access from other machines on the network, which is useful for testing endpoints from a local development environment.

class schrodinger.livedesign.endpoint_server.EndpointTestHandler(*args, **kwargs)

Bases: SimpleHTTPRequestHandler

HTTP handler that serves the testing UI and proxies API requests to the endpoint runner.

__init__(*args, **kwargs)
do_GET()

Serve a GET request.

do_POST()
log_message(format, *args)

Log an arbitrary message.

This is used by all other logging functions. Override it if you have specific logging wishes.

The first argument, FORMAT, is a format string for the message to be logged. If the format string contains any % escapes requiring parameters, they should be specified as subsequent arguments (it’s just like printf!).

The client ip and current date/time are prefixed to every message.

Unicode control characters are replaced with escaped hex before writing the output to stderr.

schrodinger.livedesign.endpoint_server.main()