Metadata-Version: 2.4
Name: osdp-pt
Version: 0.2.1
Summary: Python library for testing OSDP packets.
Author: Armen, Grigori
License-Expression: MIT
Project-URL: Homepage, https://github.com/arm362/osdp-pt
Project-URL: Repository, https://github.com/arm362/osdp-pt
Project-URL: Issues, https://github.com/arm362/osdp-pt/issues
Keywords: osdp,osdp-test,access-control,protocol,packet,structure,testing,test,validator,validation
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

![PyPI](https://img.shields.io/pypi/v/osdp-pt)
![Python](https://img.shields.io/pypi/pyversions/osdp-pt)
![License](https://img.shields.io/github/license/arm362/osdp-pt)

# OSDP Packet Tester

Python library that tests OSDP (Open Supervised Device Protocol) packets.

## Installation
```bash
pip install osdp-pt
```
## Example
```python

# Single packet test case

from osdp_pt import PacketTester

packet_0 = bytes([0x53, 0x00, 0x09, 0x00, 0x00, 0x60, 0x00, 0xBC])

PacketTester.run_test(packet_0)

# Multi packet test case

packet_1 = bytes([0x53, 0x00, 0x09, 0x00, 0x00, 0x61, 0x00, 0xBC])
PacketTester.save_packet(packet_1)

packet_2 = bytes([0x53, 0x00, 0x09, 0x00, 0x00, 0x40, 0x00, 0xBC])
PacketTester.save_packet(packet_2)

PacketTester.view_saved_packets() # View saved packets

PacketTester.run_full_test()

PacketTester.reset_saved_packets() # Clear saved packets

```
## OSDP Support

Currently supports:

- Packet tests with CRC or CSUM
- Strict packet structure
- Both reply and command packet types

Currently unsupported:

- Secure channel

## Status

This project is under active development.

## Links

- PyPI: https://pypi.org/project/osdp-pt/
- GitHub: https://github.com/arm362/osdp-pt

