Skip to main content

Python client for the public Pasal.id REST API for Indonesian legal data.

Project description

pasal

Python SDK for Pasal.id - Indonesia's open legal data platform.

This package is a working Python client for the public Pasal.id REST API.

What is Pasal.id?

Pasal.id provides structured, searchable access to 40,000+ Indonesian government regulations. Free for everyone to read, with an API and MCP server for developers.

Installation

pip install pasal

Usage

from pasal import create_client, get_law, list_laws, search

client = create_client()

results = search("upah minimum", limit=3)
laws = list_laws(type="UU", limit=5)
law = get_law("/akn/id/act/uu/2003/13")

print(results["total"])
print(laws["laws"][0]["title"])
print(len(law["articles"]))

Included Methods

  • search(query, ...) -> search Indonesian legal materials
  • list_laws(...) -> list laws with filters and pagination
  • get_law(frbr_uri) -> fetch a law and its article content
  • create_client(...) -> create a reusable client instance

Links

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

pasal-0.1.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

pasal-0.1.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file pasal-0.1.0.tar.gz.

File metadata

  • Download URL: pasal-0.1.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for pasal-0.1.0.tar.gz
Algorithm Hash digest
SHA256 06381b4ee32caa75ef4e6379d4a3e3714db54cb6bac1f9854c24943997696301
MD5 d000247dd0b5aada9b12f22ebbf1829d
BLAKE2b-256 d9efc2e7e2b8daf308c2b8cfd17db33df8f188ee2b5254f0630c3d9db4767430

See more details on using hashes here.

File details

Details for the file pasal-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pasal-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for pasal-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 16326fcc55482464812a6f698aee91d8ec421d6405d2374fda68ec4bba9b4d46
MD5 9fbe6ffd5a92daa79b778014e296b17b
BLAKE2b-256 10913cb26192028b1df00a439520fc1b1956b2454a4437e3296693f8b450e27d

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