Skip to main content

Arabic-first free legal intelligence SDK for Saudi-focused legal workflows.

Project description

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

python -m pip install --upgrade qanuni-sdk

Quickstart

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)
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

qanuni-examples --list
qanuni-acceptance --list
qanuni-acceptance --mode mocked

Optional MCP Extra

To expose the SDK through an MCP server for external agentic clients:

python -m pip install "qanuni-sdk[mcp]"

Then configure:

QANUNI_MCP_AUTH_TOKEN=change-this-long-random-token

And serve:

qanuni-mcp-server serve --host 127.0.0.1 --port 8088

To smoke-test the curated MCP surface after installing the extra:

qanuni-mcp-smoke --mode mocked

Default Behavior

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

Project details


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.2.7.tar.gz (202.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qanuni_sdk-0.2.7-py3-none-any.whl (323.6 kB view details)

Uploaded Python 3

File details

Details for the file qanuni_sdk-0.2.7.tar.gz.

File metadata

  • Download URL: qanuni_sdk-0.2.7.tar.gz
  • Upload date:
  • Size: 202.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for qanuni_sdk-0.2.7.tar.gz
Algorithm Hash digest
SHA256 23f8a134394f8befa6da589b79d83f6dec1990c2b15b36d3bfbe9d77bd0a8fcf
MD5 8e05bbeab936e3c13e8ece7d38dcedd6
BLAKE2b-256 7d9478d9089451ab5e68ed7d0a678f8907862c9013d27400c1e9ffd4ab7c5fe4

See more details on using hashes here.

File details

Details for the file qanuni_sdk-0.2.7-py3-none-any.whl.

File metadata

  • Download URL: qanuni_sdk-0.2.7-py3-none-any.whl
  • Upload date:
  • Size: 323.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for qanuni_sdk-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 10a1d4c7adf1c07b24d520a00a985e9c0f5eed3672507740c4ee90e1180891ad
MD5 f2cbef0588cf51b083b8dc0594876180
BLAKE2b-256 d40e664789c8d961d77eb1810b31863cad10ebb3098efa39255be98a062aa355

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page