Metadata-Version: 2.1
Name: deserial
Version: 0.1.2
Summary: 
Author: Bohdan Vanieiev
Author-email: warchantua@gmail.com
Requires-Python: >=3.9,<4.0
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
Requires-Dist: coloredlogs (>=15.0.1,<16.0.0)
Requires-Dist: dataclass-factory (>=2.16,<3.0)
Requires-Dist: pyserial (>=3.5,<4.0)
Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
Description-Content-Type: text/markdown

# deserial

A tool that connects to a serial port and executes scenarios - sends specified commands, and checks the responses.

## Scenario example

For every step, only `input` is required. If `output` is not specified, the step is considered successful if the response is received within `response_timeout_sec` seconds.

```yaml
baudrate: 115200
device: /dev/ttyUSB0
serial_timeout_sec: 5
steps:
- input: AT
  output:
  - OK
- input: ATI
  output:
  - LENA-R8001M10-00C-00
  - ''
  - OK
  post_delay_sec: 1   # before executing the command, wait this long
  pre_delay_sec: 2    # after executing the command, wait this long
  response_timeout_sec: 10  # waiting for the response this long
- input: AT+COPS?
  output:
  - '+COPS: .*'  # every line here is a regex
  - ''
  - OK
  fail_ok: true  # if step fails, it is considered successful
```

