enconnect.philips package#
Subpackages#
Submodules#
enconnect.philips.bridge module#
Functions and routines associated with Enasis Network Remote Connect.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- class enconnect.philips.bridge.Bridge(params: BridgeParams)[source]#
Bases:
objectInteract with the local service API with various methods.
- Parameters:
params – Parameters used to instantiate the class.
- property client: HTTPClient#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- async events_async(timeout: int | None = None) AsyncIterator[dict[str, Any]][source]#
Return the response for upstream request to the server.
- Parameters:
timeout – Timeout waiting for the server response. This will override the default client instantiated.
- events_block(timeout: int | None = None) Iterator[dict[str, Any]][source]#
Return the response for upstream request to the server.
- Parameters:
timeout – Timeout waiting for the server response. This will override the default client instantiated.
- property params: BridgeParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- request(method: Literal['delete', 'get', 'post', 'patch', 'put'], path: str, params: dict[str, Any] | None = None, json: dict[str, Any] | None = None, *, timeout: int | None = None) Response[source]#
Return the response for upstream request to the server.
- Parameters:
method – Method for operation with the API server.
path – Path for the location to upstream endpoint.
params – Optional parameters included in request.
json – Optional JSON payload included in request.
timeout – Timeout waiting for the server response. This will override the default client instantiated.
- Returns:
Response from upstream request to the server.
enconnect.philips.params module#
Functions and routines associated with Enasis Network Remote Connect.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- class enconnect.philips.params.BridgeParams(*, server: Annotated[str, MinLen(min_length=1)], timeout: Annotated[int, Ge(ge=1), Le(le=300)] = 30, token: Annotated[str, MinLen(min_length=1)], ssl_verify: bool = True, ssl_capem: Annotated[str | None, MinLen(min_length=1)] = None)[source]#
Bases:
BaseModelProcess and validate the class configuration parameters.
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- server: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Server address for connection', metadata=[MinLen(min_length=1)])]#
- ssl_capem: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Verify the ceritifcate valid', metadata=[MinLen(min_length=1)])]#
- ssl_verify: Annotated[bool, FieldInfo(annotation=NoneType, required=False, default=True, description='Verify the ceritifcate valid')]#
Module contents#
Functions and routines associated with Enasis Network Remote Connect.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- class enconnect.philips.Bridge(params: BridgeParams)[source]#
Bases:
objectInteract with the local service API with various methods.
- Parameters:
params – Parameters used to instantiate the class.
- property client: HTTPClient#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- async events_async(timeout: int | None = None) AsyncIterator[dict[str, Any]][source]#
Return the response for upstream request to the server.
- Parameters:
timeout – Timeout waiting for the server response. This will override the default client instantiated.
- events_block(timeout: int | None = None) Iterator[dict[str, Any]][source]#
Return the response for upstream request to the server.
- Parameters:
timeout – Timeout waiting for the server response. This will override the default client instantiated.
- property params: BridgeParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- request(method: Literal['delete', 'get', 'post', 'patch', 'put'], path: str, params: dict[str, Any] | None = None, json: dict[str, Any] | None = None, *, timeout: int | None = None) Response[source]#
Return the response for upstream request to the server.
- Parameters:
method – Method for operation with the API server.
path – Path for the location to upstream endpoint.
params – Optional parameters included in request.
json – Optional JSON payload included in request.
timeout – Timeout waiting for the server response. This will override the default client instantiated.
- Returns:
Response from upstream request to the server.
- class enconnect.philips.BridgeParams(*, server: Annotated[str, MinLen(min_length=1)], timeout: Annotated[int, Ge(ge=1), Le(le=300)] = 30, token: Annotated[str, MinLen(min_length=1)], ssl_verify: bool = True, ssl_capem: Annotated[str | None, MinLen(min_length=1)] = None)[source]#
Bases:
BaseModelProcess and validate the class configuration parameters.
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- server: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Server address for connection', metadata=[MinLen(min_length=1)])]#
- ssl_capem: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Verify the ceritifcate valid', metadata=[MinLen(min_length=1)])]#
- ssl_verify: Annotated[bool, FieldInfo(annotation=NoneType, required=False, default=True, description='Verify the ceritifcate valid')]#