semvec/pypi-packages huggingface dataset:
yttp 0.0.2
Add your description here
Requires Python: >=3.13

# YTTP - Custom HTTP Parser

## Project Objective

This project implements a custom HTTP parser that supports messages with or without request lines, unlike h11 which requires request lines.

### Key Features

- **Flexible Message Parsing**: Supports both standard HTTP requests and header-only messages (like LSP/MCP protocols)
- **Event-driven Architecture**: Compatible with h11's interface using Request, Headers, Data, and EndOfMessage events
- **Content-Length Body Parsing**: Handles fixed-length message bodies
- **Chunked Transfer Encoding**: Supports chunked message parsing with hex size indicators
- **Error Handling**: Uses Result[T] pattern for consistent error handling without exceptions

### Technical Implementation

The parser uses a state machine approach:
1. `WANT_REQUEST_OR_HEADERS`: Determines if first line is HTTP request or header
2. `WANT_HEADERS`: Parses header section  
3. `WANT_BODY`: Parses message body based on Content-Length or Transfer-Encoding
4. `COMPLETE`: Message fully parsed

### Use Case

Enables parsing of protocols that send header-only messages without HTTP request lines, which h11 cannot handle due to its strict HTTP compliance requirements.
ha-philipsjs 3.2.4
jointSPACE API for Home-Assistant
Requires Python: >=3.9
Keywords: jointSPACE

# ha-philipsjs
Wrapper library to integrate Philips TVs with jointSPACE API into Home-Assistant

This is just being used to wrap the API into a nice object. Nothing fancy.

* Support version 1 and 6 of the jointspace API
* Support pairing process
* Python typing information on endpoints
* NotifyChange support for supported tv's

Print system data
```python
from haphilipsjs import PhilipsTV

tv = PhilipsTV("tv2.example.com", 6)
tv.getSystem()
print(tv.system)
```

Pairing with TV
```python
from haphilipsjs import PhilipsTV

tv = PhilipsTV("tv2.example.com", 6)
tv.getSystem()

state = tv.pairRequest("my_test_app", "My Test App", "mox", "OSX", "native")

pin = input("Enter pin:")

username, password = tv.pairGrant(state, pin)

print(username)
print(password)
```


Command line utility:
```
usage: python -m haphilipsjs [-h] [-d] -i HOST -a API [-u USERNAME] [-p PASSWORD] {status,monitor,ambilight,pair} ...

positional arguments:
  {status,monitor,ambilight,pair}
                        commands
    status              Show current tv status
    monitor             Monitor current tv status
    ambilight           Control ambilight
    pair                Pair with tv

optional arguments:
  -h, --help            show this help message and exit
  -d, --debug           Debug output
  -i HOST, --host HOST
  -a API, --api API
  -u USERNAME, --username USERNAME
                        Username
  -p PASSWORD, --password PASSWORD
                        Password
```