mxcubeweb.core.server.resource_handler#
Functions
Make sure that all the arguments of func are typehinted as pydantic model, float, int, str or bool |
|
|
Validate that |
|
Validates that the input string contains only alphanumeric characters and/or dot (.). |
Classes
|
AdapterResourceHandler is a Flask resource handler that dynamically creates routes for hardware objects based on their attributes and methods. |
|
AdapterResourceHandler is a Flask resource handler that dynamically creates routes for hardware objects based on their attributes and methods. |
|
|
|
- class mxcubeweb.core.server.resource_handler.AdapterResourceHandler(name: str, url_prefix: str, handler_dict: dict[str, object], app: object, exports: list[dict[str, str]], commands: list[str], attributes: list[str])[source]#
Bases:
ResourceHandler
AdapterResourceHandler is a Flask resource handler that dynamically creates routes for hardware objects based on their attributes and methods. It supports GET and PUT requests for attributes and commands respectively.
- class mxcubeweb.core.server.resource_handler.ComponentResourceHandler(name: str, url_prefix: str, handler_dict: dict[str, object], app: object, exports: list[dict[str, str]], commands: list[str], attributes: list[str])[source]#
Bases:
ResourceHandler
AdapterResourceHandler is a Flask resource handler that dynamically creates routes for hardware objects based on their attributes and methods. It supports GET and PUT requests for attributes and commands respectively.
- mxcubeweb.core.server.resource_handler.assert_valid_type_arguments(func)[source]#
Make sure that all the arguments of func are typehinted as pydantic model, float, int, str or bool
- mxcubeweb.core.server.resource_handler.valid_object_id(object_id: str) bool [source]#
Validate that
object_id
contains onlyA-Z
,a-z
, and.
,_
.