Metadata-Version: 2.4
Name: qanuni-sdk
Version: 0.2.1
Summary: Arabic-first free legal intelligence SDK for Saudi-focused legal workflows.
Author: BandAI
License-Expression: MIT
License-File: LICENSE
Keywords: arabic,compliance,legal,openai,saudi,sdk
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: jinja2>=3.1.4
Requires-Dist: openai<3.0.0,>=2.0.0
Requires-Dist: pydantic-settings>=2.3.4
Requires-Dist: pydantic>=2.8.2
Requires-Dist: pyyaml>=6.0.2
Provides-Extra: cli
Requires-Dist: rich>=13.7.1; extra == 'cli'
Requires-Dist: typer>=0.12.3; extra == 'cli'
Provides-Extra: dev
Requires-Dist: build>=1.2.2.post1; extra == 'dev'
Requires-Dist: mypy>=1.11.1; extra == 'dev'
Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
Requires-Dist: pytest>=8.3.2; extra == 'dev'
Requires-Dist: ruff>=0.6.1; extra == 'dev'
Requires-Dist: twine>=6.1.0; extra == 'dev'
Provides-Extra: pdf
Requires-Dist: pdfplumber>=0.11.4; extra == 'pdf'
Provides-Extra: release
Requires-Dist: build>=1.2.2.post1; extra == 'release'
Requires-Dist: twine>=6.1.0; extra == 'release'
Description-Content-Type: text/markdown

# Qanuni SDK

Qanuni is an Arabic-first Python SDK for Saudi legal workflows.

This build is the **fully free distribution**:

- no activation
- no license token
- no premium gate
- all shipped tools are available immediately

Users bring their own OpenAI API key for prompt-backed tools. Deterministic tools such as Saudi labor calculations work without OpenAI.

## Install

```bash
python -m pip install --upgrade qanuni-sdk
```

## Quickstart

```python
import os

from dotenv import load_dotenv
from qanuni import LegalClient

load_dotenv()
client = LegalClient(api_key=os.getenv("OPENAI_API_KEY"))

benefit = client.labor.end_of_service(
    monthly_salary=12000,
    years_of_service=7.5,
    termination_reason="resignation",
    contract_type="indefinite",
)

print(benefit.total_amount)
```

```python
result = client.contracts.gap_analysis(
    contract_text="يلتزم الطرف الثاني بتنفيذ الأعمال، ويتم السداد لاحقًا.",
    contract_type="service_agreement",
)

print(result.summary)
```

## Included Tools

- `labor.end_of_service`
- `labor.probation_check`
- `contracts.gap_analysis`
- `contracts.generate_nda`
- `contracts.generate_mou`
- `drafting.improve`
- `drafting.summarize`
- `drafting.simplify`
- `compliance.generate_privacy_policy`
- `compliance.demand_letter`
- `policies.generate_hr_policy`
- `policies.job_description`

## Examples Command

```bash
qanuni-examples --list
```

## Default Behavior

- Arabic-first prompts and outputs
- Saudi-oriented legal framing
- structured Pydantic outputs
- async methods available in this free build
