Skip to content

Latest commit

 

History

History
83 lines (54 loc) · 2.09 KB

README.md

File metadata and controls

83 lines (54 loc) · 2.09 KB

sci_cases

sci_cases is a Python package for fetching and parsing Supreme Court of India case data.

Installation

You can install the package from PyPI using pip:

pip install sci_cases

Usage

Here's how you can use the sci_cases package to fetch and parse Supreme Court of India case data.

Importing the Package

First, import the necessary functions from the package:

from sci_cases import cases_query, get_judgement

Fetching Case Data

Use the cases_query function to fetch case data from the Supreme Court of India's website. You can specify various parameters to filter the results.

Example Usage:

# Fetch case data for the given parameters
case_data = cases_query(cause_title="union of india", page="23")

# Print the fetched case data
print(case_data)

Fetching Judgment Details

Use the get_judgement function to fetch detailed judgment information using the judgment ID.

Example Usage:

# Fetch judgment details for the first case in the fetched case data
if case_data["cases"]:
    judgment_id = case_data["cases"][0]["judgment_id"]
    judgement_details = get_judgement(judgment_id)

    # Print the fetched judgment details
    print(judgement_details)

Example Workflow

from sci_cases import cases_query, get_judgement

# Fetch case data for the given parameters
case_data = cases_query(cause_title="union of india", page="23")

# Fetch judgment details for the first case in the fetched case data
if case_data["cases"]:
    judgment_id = case_data["cases"][0]["judgment_id"]
    judgement_details = get_judgement(judgment_id)

    # Print the fetched judgment details
    print(judgement_details)

TODO

  • Add function to download pdf of judgement
  • Add function to check if judgement has html version and parse the same
  • Add function to check cases and acts referred to (if available)

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue.

License

This project is licensed under the MIT License. See the LICENSE file for more details.