Metadata-Version: 2.4
Name: lecore
Version: 0.2.1
Summary: Logic Elements core utilities
Author-email: Jan Bartovský <jan.bartovsky@logicelements.cz>
License-Expression: MIT
Project-URL: Homepage, https://github.com/LogicElements/lecore
Project-URL: Issues, https://github.com/LogicElements/lecore/issues
Keywords: logicelements,looger,development
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pyserial
Requires-Dist: pymodbus<4,>=2.5
Requires-Dist: unittest-xml-reporting
Provides-Extra: extra
Requires-Dist: FreeSimpleGUI; extra == "extra"
Requires-Dist: python-docx; extra == "extra"
Provides-Extra: tui
Requires-Dist: textual; extra == "tui"
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Dynamic: license-file

# LE core package

[![PyPI](https://img.shields.io/pypi/v/lecore)](https://pypi.org/project/lecore/)
[![Python](https://img.shields.io/pypi/pyversions/lecore)](https://pypi.org/project/lecore/)
[![License](https://img.shields.io/pypi/l/lecore)](LICENSE)

Core Python utilities for Logic Elements:
- Looger client
- Proprietary LeBin protocol
- Proprietary Modbus RTU register map handling - VisualModbus
- Test frame
- Logic Elements devices

## Install

Requires Python 3.9 or newer.

```
pip install lecore
pip install --upgrade lecore
```

Optional extras: `lecore[extra]` (graphical UI, Word documentation) and `lecore[tui]` (terminal UI).

## Usage

```python
import lecore.Devices.RtdEmul as RE

# Create RTD emulator object and open communication at COM2 (default is COM1)
rtd = RE.RtdEmul()
rtd.open(comport='COM2')

# Read serial number
sn = rtd.read(RE.Reg.FACT_SERIAL_NUMBER)

# Write emulated temperature at output 1
rtd.write(RE.Reg.EMUL_TEMPERATURE_1, 30.5)
```

New device class (in the directory with the register map): `python -m lecore new-device MyDevice`, quick guide: `python -m lecore guide`.

## Documentation

- [Devices](doc/devices.md) - RTD Emulator, VMS-1502 RTD Meter, Phase Detector, FG-320
- [Creating a new device](doc/new-device.md)
- [Looger](doc/looger.md)
- [User interfaces](doc/user-interfaces.md) - graphical and terminal register browser
- [Build and release](doc/build.md)

## License

MIT, see [LICENSE](LICENSE).
