Metadata-Version: 2.4
Name: oslp-sender
Version: 0.1.0
Summary: OSLP sender SDK: seal, operator-sign, and publish labels (canonical protocol surface)
Project-URL: Repository, https://github.com/Open-Secure-Label-Protocol/oslp-python
License-Expression: Apache-2.0
Requires-Python: >=3.10
Requires-Dist: cbor2>=5.6
Requires-Dist: cryptography>=42
Requires-Dist: grpcio>=1.60
Requires-Dist: oslp-pre-sender<0.2,>=0.1
Requires-Dist: protobuf>=4.25
Description-Content-Type: text/markdown

# oslp-sender

The OSLP sender SDK for Python — seal a label's content to its delegators,
have the operator sign it, render it, and publish it. This is the canonical
protocol surface (sender / delegator / delegatee nouns); verticals speak their
own vocabulary through a facade package such as `oslp-sender-logistics`.

```python
from oslp.sender import Oslp

oslp = Oslp(transport=..., directory=..., renderer=..., dek_store=...)
published = oslp.new_label(profile).label_id("...").publish()
oslp.add_delegators(label_id, ["dlg_..."])       # lazy enrollment over the retained DEK
oslp.update_label(label_id).set_online_attribute("delivery_note", "...").apply()
```

The confidentiality floor is the clean-room PRE sender binding (`oslp-pre-sender`):
this SDK holds no long-term key, cannot decrypt, and the operator it publishes
through stores only material it structurally cannot read. Label *authenticity* is
the operator's COSE_Sign1 — the sender sends the canonical outer map up and gets
the signed label back (`SignLabel`), then renders and publishes (`PublishLabel`).

What's inside:

- `Oslp` / `LabelDraft` / `PublishedLabel` / `LabelUpdateDraft` — the engine
- `spi` — `SenderTransport`, `DelegatorDirectorySource`, `LabelRenderer`,
  `DekStore` protocols and the wire value types
- `directory` — the anchor-signed delegator directory: verify + cache
- `operator` — `HostedOperator`: the operator distribution's provisioning file
  (endpoint, pinned anchors, ceremony URLs)
- `credentials` — `Credentials.discover()`: the registration-token machine
  ceremony and the self-refreshing token-desk badge
- `transport` — the gRPC `SenderService` client

Diagnostics ride the stdlib `logging` module under the `oslp.sender` logger —
redacted by construction (event codes and sizes, never content or tokens).
