Metadata-Version: 2.4
Name: faketelemetry
Version: 0.1.0
Summary: Real-time Fake Telemetry Stream Generator
Home-page: https://github.com/adkvi/faketelemetry
Author: Adam Billekvist
Author-email: adam.billeqvist@example.com
Project-URL: Documentation, https://github.com/adkvi/faketelemetry#readme
Project-URL: Source, https://github.com/adkvi/faketelemetry
Project-URL: Tracker, https://github.com/adkvi/faketelemetry/issues
Keywords: telemetry,signal,generator,iot,testing,simulation,waveform,python
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-python
Dynamic: summary

[![PyPI version](https://img.shields.io/pypi/v/faketelemetry.svg)](https://pypi.org/project/faketelemetry/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![CI](https://github.com/adkvi/faketelemetry/actions/workflows/python-package.yml/badge.svg)](https://github.com/adkvi/faketelemetry/actions)

# FakeTelemetry

**A minimal Python package to generate real-time, timestamped fake telemetry streams for testing, simulation, and development.**

## Features
- Sine, cosine, square, sawtooth, triangle, pulse, and random noise waveforms
- Custom user-defined waveform support
- Adjustable amplitude, frequency, offset, and sample rate
- Optional Gaussian noise injection
- Real-time streaming of (datetime, value) tuples
- Multi-channel (parallel) telemetry generation
- Well-tested and extensible

## Example Usage

```python
from faketelemetry import TelemetryGenerator, WaveformType, NoiseInjector, MultiChannelTelemetryGenerator

# Single channel with noise (sine wave)
noise = NoiseInjector(noise_level=0.2)
gen = TelemetryGenerator(
    waveform=WaveformType.SINE,
    frequency=1.0,
    amplitude=1.0,
    offset=0.0,
    noise_injector=noise
)
for timestamp, value in gen.stream(sampling_rate=2.0, duration=3):
    print(timestamp, value)

# Multi-channel example (sine and cosine)
ch1 = TelemetryGenerator(WaveformType.SINE, frequency=1.0)
ch2 = TelemetryGenerator(WaveformType.COSINE, frequency=0.5)
multi = MultiChannelTelemetryGenerator([ch1, ch2])
for sample in multi.stream(sampling_rate=2.0, duration=3):
    print({k: (v[0], v[1]) for k, v in sample.items()})

# Triangle and pulse waveforms
tri = TelemetryGenerator(WaveformType.TRIANGLE, frequency=1.0)
pulse = TelemetryGenerator(WaveformType.PULSE, frequency=1.0)
print('Triangle:', next(tri.stream(1)))
print('Pulse:', next(pulse.stream(1)))

# Custom waveform (e.g., constant 42)
def custom_func(t):
    return 42.0
gen_custom = TelemetryGenerator(WaveformType.CUSTOM, custom_func=custom_func)
print('Custom:', next(gen_custom.stream(1)))
```

## Installation

Clone this repo and install locally:

```sh
pip install .
```

Or install in editable/development mode:

```sh
pip install -e .
```

## Testing

Run all tests:

```sh
python -m unittest discover -s tests
```

## License
MIT
