Mock a real IDUN Guardian device for testing purposes
Project description
IDUN Guardian mock library / client
This is a client library for the IDUN Guardian which mocks out the physical device, intended for development and building tests for the IDUN Guardian.
The data_generator
generates random device packets.
The client
is a command-line utility that sends them to the Guardian API.
Features
- Mock device data generator
- Send mocked device data to a Cloud endpoint
Sending mock data to the cloud API (client)
You can start sending mock data to the cloud API by installing the poetry project and running the idun_mock.client
module:
# at this directory
poetry install
poetry run python -m idun_mock.client -w <websocket_url>
The websocket URL is where the data should be sent. Change the generator parameters according to what scenario you want to simulate (look in idun_mock/client/__main__.py
).
Troubleshooting: sending mock data to Kinesis, bypassing the API
If you have IDUN AWS credentials, you can also send mock data directly to Kinesis, bypassing the API:
# Set these environment variables:
# AWS_ACCESS_KEY_ID
# AWS_SECRET_ACCESS_KEY
# AWS_DEFAULT_REGION
poetry run python -m idun_mock.client -k <kinesis_stream_name> [-e <aws_endpoint>]
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for idun_mock-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6dbc714e2a7f8a5f4f48a89cb9e3f4f5642ecc314aa3d984ac5528a6c3e57872 |
|
MD5 | 9f9d49343d84e58e0f77aabe8488f505 |
|
BLAKE2b-256 | 608333373b7248967d25a43c13c26c4f977b32c75e872f0fde7baba9ba282ea4 |