seungbae/dev/: iot-simulator-0.1.0 metadata and description

Simple index

author Seungbae Ji
author_email seungbae.ji@gmail.com
classifiers
  • Programming Language :: Python :: 3
  • Programming Language :: Python :: 3.12
  • Programming Language :: Python :: 3.13
description_content_type text/markdown
requires_dist
  • fastapi (>=0.115.14)
  • mrml-common (>=0.1.0,<0.2.0)
  • opentelemetry-instrumentation-fastapi (>=0.55b1)
  • paho-mqtt (>=2.1.0)
  • pydantic-settings (>=2.10.1)
  • uvicorn[standard] (>=0.35.0)
requires_python >=3.12

Because this project isn't in the mirror_whitelist, no releases from root/pypi are included.

File Tox results History
iot_simulator-0.1.0-py3-none-any.whl
Size
9 KB
Type
Python Wheel
Python
3
iot_simulator-0.1.0.tar.gz
Size
7 KB
Type
Source

simulator

The simulator is a core component of the IoT MLOps Lab project. It acts as a FastAPI-based IoT data simulator, generating and publishing synthetic sensor data to an MQTT broker for downstream processing and MLOps experimentation.


Features


Directory Structure

simulator/
├── config/
│   ├── config.toml         # Main simulator configuration
│   ├── logger.toml         # Logging configuration
│   └── mosquitto.conf/     # (Optional) MQTT broker config
├── src/
│   └── simulator/
│       ├── __init__.py
│       ├── configs.py
│       ├── main.py
│       ├── observability.py
│       ├── router.py
│       ├── simulator.py
│       └── ...
├── tests/
│   ├── __init__.py
│   ├── conftest.py
│   ├── mocks.py
│   ├── test_api.py
│   ├── test_config.py
│   └── test_simulator.py
├── Dockerfile
├── pyproject.toml
├── README.md
└── ...

Getting Started

1. Prerequisites

2. Installation

# install Tools
brew install pipx
pipx install uv

# install dependencies
uv venv --python 3.12
uv python pin 3.12
uv sync

3. Configuration

Edit config/config.toml to set your MQTT broker, device simulation, and publishing parameters. Edit config/logger.toml for logging preferences.

4. Running the Service

Standalone (local):

poetry run python -m simulator.main --config config/config.toml --log-config config/logger.toml

With Docker Compose (recommended for full stack):

docker compose up --build

Configuration Example (config.toml)

[simulator]
device_count = 10
publish_interval = 2

[mqtt]
host = "mqtt"
port = 1883
topic = "sensors/{device_id}"
qos = 0

[observability]
trace_endpoint = "http://otel-collector:4318/v1/traces"
service_name = "simulator"
prometheus_port = 8000

Observability


Health & Resilience


Testing

poetry run pytest

Acknowledgements