HTTP runtime configuration
hololinked.server.http.config.RuntimeConfig
Bases: BaseModel
Runtime configuration for HTTP server and handlers.
Pass the attributes of this class as a dictionary to the config argument of HTTPServer.
Source code in repo/hololinked/hololinked/server/http/config.py
Attributes
cors
class-attribute
instance-attribute
use True to set CORS headers for the HTTP server, this is useful for local networks
allowed_clients
class-attribute
instance-attribute
Serves request and sets CORS only from these clients, other clients are rejected with 401. Unlike pure CORS, the server resource is not even executed if the client is not an allowed client. if None, any client is served. Not inherently a safety feature in public networks, and more useful in private networks when the remote origin is known reliably.
security_schemes
class-attribute
instance-attribute
List of security schemes to be used by the server, it is sufficient that one scheme passes for a request to be authorized. Combo security schemes are not yet supported (but will be in future).
property_handler
class-attribute
instance-attribute
handler class to be used for property interactions
action_handler
class-attribute
instance-attribute
handler class to be used for action interactions
event_handler
class-attribute
instance-attribute
handler class to be used for event interactions
RW_multiple_properties_handler
class-attribute
instance-attribute
handler class to be used for read/write multiple properties interactions
thing_description_handler
class-attribute
instance-attribute
handler class to be used for thing description
liveness_probe_handler
class-attribute
instance-attribute
handler class to be used for liveness probe
readiness_probe_handler
class-attribute
instance-attribute
handler class to be used for readiness probe
stop_handler
class-attribute
instance-attribute
handler class to be used for stopping server
Pass these as a plain dictionary to the config argument of
HTTPServer — not as a RuntimeConfig instance:
hololinked.server.http.config.HandlerMetadata
Bases: BaseModel
Specific metadata when a request handler has been initialized, in other words, handler specific metadata.