Skip to main content

Current support documents:

  • Bộ luật dân sự 2015
  • Bộ luật hình sự 2015
  • Bộ luật lao động 2019
  • Bộ luật hàng hải Việt Nam 2015
  • Bộ luật tố tụng dân sự 2015
  • Bộ luật tố tụng hình sự 2015

Installation

git clone https://github.com/Th1nhNg0/law-query
cd law-query

python -m venv .env
source .env/bin/activate

# make sure you are using the latest pip
python -m pip install -U pip setuptools wheel

pip install --no-build-isolation --editable .

Usage

from lawquery import Engine, list_documents

# list of document paths
document_paths = list_documents()
print(document_paths)

# create engine
engine = Engine(filepath=document_paths[0])
# print info of document
print(engine)
# print outline tree
engine.print_tree()

# query
# node_type: root,phần,chương,mục,điều,khoản,điểm
# node_id: '1','2','I','II','nhất','hai','a','b'...
results = engine.query(node_type='điều', node_id='1')
results = engine.query( node_id='1')
results = engine.query( node_type='phần')
results = engine.query( name='hôn nhân')

# query by path: from parent to child
# param is list of dict, the parameter of engine.query function
results = engine.query_by_path([
    {
        'node_type': 'phần',
        'node_id': 'hai'
    },
    {
        'node_type': 'chương',
        'node_id': 'I'
    },
    {
        'node_type': 'mục',
        'node_id': '1'
    },
    {
        'node_type': 'điều',
        'node_id': '50'
    }
])

Metadata

Release files for lawquery 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lawquery 0.0.2
File Size Uploaded Provenance
lawquery-0.0.2.tar.gz 1.1 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for lawquery 0.0.2
File Interpreter ABI Platform
lawquery-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 2.1 MB

Release files / lawquery-0.0.2.tar.gz

Download URL lawquery-0.0.2.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
a9f4c4b0ea9ca3ee0e783d1053a16a2685278445af750839f08d929ea5536636
BLAKE2b-256 checksum
How to use checksums
f9243343b785ca49f0aa3b2f0e66eae7373b38eee11ae8fd56c3c0b4a72a128f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.17

Release files / lawquery-0.0.2-py3-none-any.whl

Download URL lawquery-0.0.2-py3-none-any.whl
Size 1.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
24250b630d940ac271d3934cfd5b1e2158837b5c4f6fd1132ef578a3e119c0ef
BLAKE2b-256 checksum
How to use checksums
50447cd609026e0b785c07230fdf8c8377d9ab9763f00d1b0d31d61351dc4bd2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.17

Security for lawquery 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page