Metadata-Version: 2.2
Name: IndianConstitution
Version: 0.5.5
Summary: A Python module for accessing and managing Constitution data.
Home-page: https://github.com/Vikhram-S/IndianConstitution
Author: Vikhram S
Author-email: vikhrams@saveetha.ac.in
Maintainer: Vikhram S
Maintainer-email: vikhrams@saveetha.ac.in
License: Apache License 2.0
Project-URL: Documentation, https://github.com/Vikhram-S/IndianConstitution/blob/main/README.md
Project-URL: Source, https://github.com/Vikhram-S/IndianConstitution
Project-URL: Issue Tracker, https://github.com/Vikhram-S/IndianConstitution/issues
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Legal Industry
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Education
Classifier: Topic :: Text Processing :: General
Classifier: Topic :: Text Processing :: Linguistic
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: maintainer
Dynamic: maintainer-email
Dynamic: project-url
Dynamic: requires-python
Dynamic: summary

# IndianConstitution <small> (v0.5) </small>
Python module to interact with the Constitution of India data and retrieve articles, details, summaries, and search functionalities.

![PyPI - Python Version](https://img.shields.io/pypi/pyversions/indianconstitution?label=Python) ![PyPI - License](https://img.shields.io/pypi/l/indianconstitution?label=License&color=red) ![Maintenance](https://img.shields.io/maintenance/yes/2025?label=Maintained) ![PyPI](https://img.shields.io/pypi/v/indianconstitution?label=PyPi) ![PyPI - Status](https://img.shields.io/pypi/status/indianconstitution?label=Status)

---

## Installation
You can install the package directly from PyPI:

```bash
pip install indianconstitution
```

---

## Features
The `indianconstitution` module provides:

- Full access to the Constitution of India data.
- Retrieval of individual articles and summaries.
- Keyword-based search for articles.
- Count of total articles and search by title functionality.

---

## Usage
Hereâ€™s how to get started with `indianconstitution`:

### Configuration Requirement
Ensure you load the Constitution data file correctly. By default, the file is included in the package directory. If not, you must provide the full path to the `constitution_of_india.json` file.

**Example:**

```python
from indianconstitution import IndianConstitution

# Load the module with the correct path to the JSON file
india = IndianConstitution("D:\\indianconstitution\\indianconstitution\\indianconstitution\\constitution_of_india.json")

# Example usage
print(india.preamble())
```

### Python Module Example

```python
from indianconstitution import IndianConstitution

# Load the module with your Constitution data
india = IndianConstitution('constitution_data.json')

# Access the Preamble
print(india.preamble())

# Retrieve specific articles
print(india.get_article(14))  # Outputs details of Article 14

# List all articles
print(india.articles_list())

# Search for a keyword in the Constitution
print(india.search_keyword('equality'))

# Get a summary of an article
print(india.article_summary(21))

# Count the total number of articles
print(india.count_articles())

# Search articles by title
print(india.search_by_title('Fundamental'))
```

---

## Key Functionalities

| Function                | Description                                                   |
|-------------------------|---------------------------------------------------------------|
| `preamble()`            | Returns the Preamble of the Constitution of India.           |
| `get_article(number)`   | Retrieves the full content of the specified article.          |
| `articles_list()`       | Lists all articles in the Constitution with titles.           |
| `search_keyword(word)`  | Finds all occurrences of a specific keyword in the Constitution text. |
| `article_summary(num)`  | Returns a summary of the specified article.                   |
| `count_articles()`      | Counts the total number of articles in the Constitution.      |
| `search_by_title(title)`| Searches articles by their titles and returns matching results.|

---

## Development
This project is actively maintained. Contributions, suggestions, and feedback are welcome. Please refer to the LICENSE file for usage terms.

---

## License
This project is licensed under the Apache License 2.0.
See the LICENSE file for more details.

---

## Data Source
The Constitution data is compiled from publicly available resources, ensuring authenticity and accuracy.

---

## Developer Information
**Author**: Vikhram S  
**Email**: [vikhrams@saveetha.ac.in](mailto:vikhrams@saveetha.ac.in)

---

## Copyright
Â© 2025 Vikhram S. All rights reserved.
