Metadata-Version: 2.5
Name: scellance-sdk
Version: 0.1.0
Summary: Client Python officiel du registre de decision Scellance
Project-URL: Homepage, https://scellance.com
Project-URL: Documentation, https://scellance.com/developpeurs.html
Project-URL: Source, https://github.com/RailsNft/scellance
Author-email: Philippe Mouniama <contact@prestadev.com>
License: Apache-2.0
Keywords: ai-act,audit,compliance,recrutement,registre,scellance
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Description-Content-Type: text/markdown

# scellance-sdk

Client Python officiel du registre de decision Scellance.

## Installation

```bash
pip install -e ./sdk        # depuis le repo, en attendant la publication PyPI
```

## Usage

```python
from scellance_sdk import ScellanceClient, Criterion

with ScellanceClient("https://api.scellance.com", api_key="sc_live_...") as sc:
    # 1. Sceller la fiche de poste AVANT toute decision
    sc.seal_referential(
        "fiche-de-poste:1024:v2",
        {"titre": "Technicien de maintenance", "criteres": [...]},
    )

    # 2. Journaliser une decision de tri (chaque critere cite a sa source)
    sc.screening(
        candidate_ref="cand-42",
        job_id="job-1",
        referential="fiche-de-poste:1024:v2",
        decision="shortlist",
        criteria=[
            Criterion("exp-3ans", "fiche-de-poste:1024:v2#ligne-12",
                      score=0.8, threshold=0.6, passed=True),
        ],
        score_total=0.74,
    )

    # 3. Supervision humaine (le motif est obligatoire pour un override)
    sc.human_override(
        candidate_ref="cand-42", job_id="job-1",
        referential="fiche-de-poste:1024:v2",
        decision="rejet", original_decision="shortlist",
        motif="Disponibilite incompatible confirmee en entretien.",
        recruiter_id="marie",
    )

    # 4. Verifier l'integrite de la chaine
    assert sc.verify_chain(strict=True).verified
```

## Ce que le SDK garantit cote appelant

- `Criterion.source_ref` est requis : un critere sans citation source est
  refuse par l'API (422). Le SDK ne masque pas cette regle, il la respecte.
- `human_override` sans `motif` est refuse par l'API.
- `verify_chain(strict=True)` leve `ChainBrokenError` si la chaine est rompue.

## Objets

`ScellanceClient`, `Criterion`, `Event`, `Referential`, `ChainVerification`,
`ScellanceError`, `ChainBrokenError`.

Dependance unique : `httpx`.
