schrodinger.livedesign.endpoints module

schrodinger.livedesign.endpoints.parse_args(endpoint_module_options)
schrodinger.livedesign.endpoints.get_endpoints_dict()
schrodinger.livedesign.endpoints.livedesign_endpoint(func, endpoint_name=None)

Wrapper for a function that can be called with JSON data. Functions must have annotated args and return values. Only primitive types (int, float, str, bool) and collections (list, dict) are allowed as type annotations. Collections must have JSON-serializable types as their elements.

Note: this decorator fails if annotations is imported from __future__; this stringifies annotations, and we need to validate them as actual types

schrodinger.livedesign.endpoints.get_endpoint_runner(module_name, func_name)

Get the JSON endpoint function for the given module and function name.

Parameters:
  • module_name – Name of the module containing the endpoint function.

  • func_name – Name of the function to get.

Returns:

The JSON endpoint function.

schrodinger.livedesign.endpoints.run_endpoint(module_name, func_name, json_input)

Run a JSON endpoint function with the provided input.

Parameters:
  • module_name – Name of the module containing the endpoint function.

  • func_name – Name of the function to run.

  • json_input – Path to the JSON input file.

schrodinger.livedesign.endpoints.main()