src package¶
Subpackages¶
Submodules¶
src.server module¶
src.utils module¶
-
class
src.utils.
RouteTableDefDocs
¶ Bases:
aiohttp.web_routedef.RouteTableDef
-
src.utils.
dumps
(obj, *, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, cls=None, indent=None, separators=None, default=<function make_serializable>, sort_keys=False, **kw)¶ A version of json.dumps that uses make serializable recursively to make objects serializable
src.views module¶
-
async
src.views.
history
(request: aiohttp.web_request.Request)¶ Get historic data from the given topic
get params: - start: the start timestamp as milliseconds since 00:00:00 Thursday, 1 January 1970 - end: (optinoal) the end timestamp as milliseconds since 00:00:00 Thursday, 1 January 1970
-
async
src.views.
index
(request: aiohttp.web_request.Request)¶ The API index
A standard HTTP request will return a sample page with a simple example of api use. A WebSocket request will initiate a websocket connection making it possible to retrieve measurement and simulation data.
Available endpoints are - /client for information about the clients websocket connections - /datasources/ for measurement data sources - /processors/ for running processors on the data - /blueprints/ for the blueprints used to create processors - /fmus/ for available FMUs (for the fmu blueprint) - /models/ for available models (for the fedem blueprint) - /topics/ for all available data sources (datasources and processors)
-
async
src.views.
models
(request: aiohttp.web_request.Request)¶ List available models for the fedem blueprint
-
async
src.views.
session_endpoint
(request: aiohttp.web_request.Request)¶ Only returns a session cookie
Generates and returns a session cookie.
-
async
src.views.
subscribe
(request: aiohttp.web_request.Request)¶ Subscribe to the given topic
-
async
src.views.
topics
(request: aiohttp.web_request.Request)¶ Lists the available data sources for plotting or processors
Append the id of a topic to get details about only that topic Append the id of a topic and /subscribe to subscribe to a topic Append the id of a topic and /unsubscribe to unsubscribe to a topic Append the id of a topic and /history to get historic data from a topic
-
async
src.views.
topics_detail
(request: aiohttp.web_request.Request)¶ Show a single topic
Append /subscribe to subscribe to the topic Append /unsubscribe to unsubscribe to the topic Append /history to get historic data from a topic
-
async
src.views.
unsubscribe
(request: aiohttp.web_request.Request)¶ Unsubscribe to the given topic