Metadata-Version: 2.1
Name: pyusbpd
Version: 0.0.1
Summary: Unofficial USB Power Delivery toolbox for Python
Author: Jean THOMAS
Author-email: virgule@jeanthomas.me
License: ISC
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE

# pyusbpd

Python structures and decoding for USB Power Delivery exploration, testing and maybe more?

```python
from pyusbpd.message import Message
from pyusbpd.enum import SOP

msg = Message(sop=SOP.SOP, raw=b"\x41\x0C").decode()

print(msg)
# <pyusbpd.message.GoodCRCMessage object at 0x7f0a8b2ca9b0>

print(msg.message_header)
# USB Power Delivery Message Header
# ---
# Extended: False
# Number of Data Objects: 0
# MessageID: 6
# Port Power Role: False
# Cable Plug: False
# Specification Revision: Revision 2.0
# Port Data Role: False
# Message Type: 1
```

pyusbpd is mostly in a PoC state, but feel free to send pull requests ;-)

## Install

```bash
git clone https://github.com/jeanthom/pyusbpd
cd pyusbpd
python setup.py install --user
```
