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.0.tar.gz (45.9 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.0-py3-none-any.whl (56.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: prelawsql-1.0.0.tar.gz
  • Upload date:
  • Size: 45.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","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.0.tar.gz
Algorithm Hash digest
SHA256 0b729f3d1418b4f9e019477b1ee41e6f12247acb8c1d1fcc2a21aa1de4b7d75a
MD5 58c24edfd1b842eea114f789b8d5713a
BLAKE2b-256 48970062232fac0f4a4218965a95f81fb9d3892159ed9164d6840107c6f9cc37

See more details on using hashes here.

File details

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

File metadata

  • Download URL: prelawsql-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 56.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 111998d1adc793bfcf594159faab5931d4dee29a471e0f76153d066d8d06757d
MD5 e575ad46e98550e52e42bccb768b8eb3
BLAKE2b-256 395d7eb43433f7aec1f8960e80759c6c2d48d7e03c18b9f1ec8e332dfa6a0c1c

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