Skip to main content

prelawsql

Github CI

prelawsql validates and indexes Philippine legal-source material. It is built for two kinds of readers:

  • lawyers and legal researchers who need to trace a database record back to the exact source material; and
  • developers who need deterministic parsing, reviewable failures, and safe rebuilds.

The package does not silently repair the source corpus. Raw source bytes are kept as evidence, normalized fields are stored separately, and records that cannot be interpreted safely are placed in quarantine for review.

Quick start

# Validate statute routes and atomically publish data/stats.db.
pre build-statute-index --replace

# Create data/cases.db with the decision and justice schemas.
pre init-decision-index --replace

# Ingest Supreme Court monthly decision listings for calendar year 2024.
# --end is exclusive.
pre ingest-decision-listings --start 2024 --end 2025

These commands create derived SQLite databases. They do not edit the decision, statute, or codification repositories.

Important classification rule

The word Opinion is not classified without knowing the document's role:

  • a ponencia headed Opinion is a Decision;
  • a separate opinion headed Opinion is a Separate Opinion; and
  • an unqualified Opinion with no reliable role remains unclassified.

Explicit Concurring Opinion, Dissenting Opinion, and Separate Opinion labels are always treated as separate opinions. Kapasyahan is treated as a resolution, while the observed defective label Ecision is treated as a decision.

Command outcomes

Exit code Meaning
0 Clean completion, or reviewed policy explicitly allowed quarantine
1 System failure or an incomplete monthly retrieval
2 Invalid command usage
3 Processing completed, but one or more records were quarantined

--allow-quarantine changes only code 3 to 0. It cannot hide a failed or incomplete run.

Start with the documentation overview. The evidence and review guide explains what the database can establish—and what it cannot establish—before the data is relied upon in legal work. See Releases for the version-by-version change boundary and migration examples.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prelawsql-1.0.1.tar.gz (47.2 kB view details)

Uploaded Source

Built Distribution

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

prelawsql-1.0.1-py3-none-any.whl (56.5 kB view details)

Uploaded Python 3

File details

Details for the file prelawsql-1.0.1.tar.gz.

File metadata

  • Download URL: prelawsql-1.0.1.tar.gz
  • Upload date:
  • Size: 47.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for prelawsql-1.0.1.tar.gz
Algorithm Hash digest
SHA256 a7f0c947520cfa37fff86aaa874bed61902122dfaf61d989e628a123016ab53d
MD5 e69ab95c54cb079ac0374ce335642be4
BLAKE2b-256 cde8b37c1cf2ae5dc7237d6a835a5b597c107a82fbac5d95824d705538f4735f

See more details on using hashes here.

File details

Details for the file prelawsql-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: prelawsql-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 56.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for prelawsql-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0262ae9751fa5b9eba4d7da6b6505800851ae2e73368d3e7d915e00a4036a0f4
MD5 76904ce0d0c4afda3cdefdf929abd063
BLAKE2b-256 a9e32d133c81dc20cb8aab02fb4b2d5033c1fc7750c67fa08ffc5ae1ad58ecd7

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