Arabic-first legal intelligence SDK for Saudi-focused legal workflows.
Project description
Qanuni SDK
Qanuni is an Arabic-first Python SDK for Saudi legal workflows.
It supports two usage styles in one package:
- direct legal tools for focused tasks
- workflows and a deterministic legal agent for harder multi-step matters
Install
python -m pip install --upgrade qanuni-sdk
Optional MCP support:
python -m pip install "qanuni-sdk[mcp]"
Quickstart
from qanuni import LegalClient
client = LegalClient()
result = client.contracts.gap_analysis(
contract_text="""
يلتزم الطرف الثاني بتنفيذ الأعمال،
ويتم السداد لاحقًا وفق ما يراه الطرف الأول مناسبًا،
ويجوز إنهاء العقد عند الحاجة.
""",
contract_type="service_agreement",
)
print(result.summary)
Workflow Example
workflow_result = client.workflow.contract_review(
document_text="""
اتفق الطرف الأول مع الطرف الثاني على تقديم خدمات تقنية،
ويتم السداد بعد الفاتورة، ويجوز إنهاء العقد عند الحاجة.
""",
contract_type="service_agreement",
)
print(workflow_result.executive_summary)
print(workflow_result.risk_level)
Agent Example
agent_result = client.agent.run(
goal="راجع العقد وحدد المخاطر ثم جهز تصورًا لمطالبة قانونية مناسبة.",
documents=[
{
"name": "contract.md",
"text": """
اتفق الطرف الأول مع الطرف الثاني على تقديم خدمات تقنية،
ويتم السداد بعد الفاتورة، ويجوز إنهاء العقد عند الحاجة.
""",
}
],
)
print(agent_result.status)
print(agent_result.answer_text)
Included Surfaces
- tools:
labor,legal,contracts,compliance,drafting,policies - workflows:
client.workflow - agent runtime:
client.agent - optional signed-license operations:
client.license - acceptance CLI and human-testing examples
- optional MCP server
Built-in Operational Features
- structured outputs
- cost estimation
- selective caching
- observability events
- dated agent logs
Optional Commands
qanuni-examples --list
qanuni-acceptance --list
qanuni-mcp-smoke --mode mocked
qanuni-mcp-server serve --host 127.0.0.1 --port 8088
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
qanuni_sdk-0.3.0.tar.gz
(297.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
qanuni_sdk-0.3.0-py3-none-any.whl
(443.0 kB
view details)
File details
Details for the file qanuni_sdk-0.3.0.tar.gz.
File metadata
- Download URL: qanuni_sdk-0.3.0.tar.gz
- Upload date:
- Size: 297.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55a368d034074ec70825701c4bb33ccdfdacdac7ab4fcf1fad837f070accbe59
|
|
| MD5 |
5fc4fd6b7bf2f2583acfed06dc7e8151
|
|
| BLAKE2b-256 |
dd8c8712f1de15744593d2c40d538193d0a8fa328fc31fe5628431ac44dd261f
|
File details
Details for the file qanuni_sdk-0.3.0-py3-none-any.whl.
File metadata
- Download URL: qanuni_sdk-0.3.0-py3-none-any.whl
- Upload date:
- Size: 443.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71d81ef7b4246859cba0f121469980ac8d11b9562edf87209e9356c45676861f
|
|
| MD5 |
a0ec0c3dc5da9a0e619d9ffce1c9a17a
|
|
| BLAKE2b-256 |
ef6ea4d61b2eb7c9a85b65d1ee94395621246323fc430e98592b0e5573e1ad51
|