Metadata-Version: 2.4
Name: kobil-sign
Version: 3.0.0
Summary: KOBIL digital signature client for Python with automatic OAuth token management.
License: MIT
Project-URL: Repository, https://github.com/uveysservetoglu/kobil-sdks
Keywords: kobil,signature,pdf,esign
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: kobil-core>=1.0

# kobil-sign

KOBIL digital signature client for Python, with automatic OAuth token management.

```bash
pip install kobil-sign
```

```python
from kobil.sign import SignClient

sign = SignClient(
    sign_base_url="https://idp.cloud.kobil.com/auth/realms/{TENANT}/mpower/v1/users/{USER_ID}",
    tenant_name="acme",
    default_callback_url="https://yourapi.com/signature-callback",
    # credentials optional if KOBIL_* env vars are set
)

res = sign.initiate_pdf_signature(
    user_id=user_id,
    file=open("Agreement.pdf", "rb").read(),
    position={"page_number": 1, "bottom_left_x": 59, "bottom_left_y": 89, "top_right_x": 85, "top_right_y": 96},
    file_name="Agreement.pdf",
    message_text="Please sign here",
)
# res["messageId"], res["instanceId"]
```

`POST {sign_base_url}/signature` as multipart (`signatureFile` PDF + `signatureData` JSON).
The signed PDF is delivered to your callback; download it via `kobil.chat`'s
`get_attachment_file`. Failures raise `kobil.sign.KobilSignError`.

## License

MIT
