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


---
## 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 is 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.
Raw data
{
"_id": null,
"home_page": "https://github.com/Vikhram-S/IndianConstitution",
"name": "IndianConstitution",
"maintainer": "Vikhram S",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "vikhrams@saveetha.ac.in",
"keywords": null,
"author": "Vikhram S",
"author_email": "vikhrams@saveetha.ac.in",
"download_url": "https://files.pythonhosted.org/packages/5a/49/610ca645decd39fde1b121e7fa764f4fb67ebdfab7f7c9af50700e8d85ee/indianconstitution-0.5.8.tar.gz",
"platform": null,
"description": "# IndianConstitution <small> (v0.5.8) </small>\r\nPython module to interact with the Constitution of India data and retrieve articles, details, summaries, and search functionalities.\r\n\r\n    \r\n \r\n\r\n\r\n---\r\n\r\n## Installation\r\nYou can install the package directly from PyPI:\r\n\r\n```bash\r\npip install indianconstitution\r\n```\r\n\r\n---\r\n\r\n## Features\r\nThe `indianconstitution` module provides:\r\n\r\n- Full access to the Constitution of India data.\r\n- Retrieval of individual articles and summaries.\r\n- Keyword-based search for articles.\r\n- Count of total articles and search by title functionality.\r\n\r\n---\r\n\r\n## Usage\r\nHere is how to get started with `indianconstitution`:\r\n\r\n### Configuration Requirement\r\nEnsure 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.\r\n\r\n**Example:**\r\n\r\n```python\r\nfrom indianconstitution import IndianConstitution\r\n\r\n# Load the module with the correct path to the JSON file\r\nindia = IndianConstitution(\"D:\\\\indianconstitution\\\\indianconstitution\\\\indianconstitution\\\\constitution_of_india.json\")\r\n\r\n# Example usage\r\nprint(india.preamble())\r\n```\r\n\r\n### Python Module Example\r\n\r\n```python\r\nfrom indianconstitution import IndianConstitution\r\n\r\n# Load the module with your Constitution data\r\nindia = IndianConstitution('constitution_data.json')\r\n\r\n# Access the Preamble\r\nprint(india.preamble())\r\n\r\n# Retrieve specific articles\r\nprint(india.get_article(14)) # Outputs details of Article 14\r\n\r\n# List all articles\r\nprint(india.articles_list())\r\n\r\n# Search for a keyword in the Constitution\r\nprint(india.search_keyword('equality'))\r\n\r\n# Get a summary of an article\r\nprint(india.article_summary(21))\r\n\r\n# Count the total number of articles\r\nprint(india.count_articles())\r\n\r\n# Search articles by title\r\nprint(india.search_by_title('Fundamental'))\r\n```\r\n\r\n---\r\n\r\n## Key Functionalities\r\n\r\n| Function | Description |\r\n|-------------------------|---------------------------------------------------------------|\r\n| `preamble()` | Returns the Preamble of the Constitution of India. |\r\n| `get_article(number)` | Retrieves the full content of the specified article. |\r\n| `articles_list()` | Lists all articles in the Constitution with titles. |\r\n| `search_keyword(word)` | Finds all occurrences of a specific keyword in the Constitution text. |\r\n| `article_summary(num)` | Returns a summary of the specified article. |\r\n| `count_articles()` | Counts the total number of articles in the Constitution. |\r\n| `search_by_title(title)`| Searches articles by their titles and returns matching results.|\r\n\r\n---\r\n\r\n## Development\r\nThis project is actively maintained. Contributions, suggestions, and feedback are welcome. Please refer to the LICENSE file for usage terms.\r\n\r\n---\r\n\r\n## License\r\nThis project is licensed under the Apache License 2.0.\r\nSee the LICENSE file for more details.\r\n\r\n---\r\n\r\n## Data Source\r\nThe Constitution data is compiled from publicly available resources, ensuring authenticity and accuracy.\r\n\r\n---\r\n\r\n## Developer Information\r\n**Author**: Vikhram S \r\n**Email**: [vikhrams@saveetha.ac.in](mailto:vikhrams@saveetha.ac.in)\r\n\r\n---\r\n\r\n## Copyright\r\n\u00c2\u00a9 2025 Vikhram S. All rights reserved.\r\n",
"bugtrack_url": null,
"license": "Apache License 2.0",
"summary": "A Python module for accessing and managing Constitution data.",
"version": "0.5.8",
"project_urls": {
"Documentation": "https://pypi.org/project/IndianConstitution/",
"Homepage": "https://github.com/Vikhram-S/IndianConstitution",
"Issue Tracker": "https://github.com/Vikhram-S/IndianConstitution/issues",
"Source": "https://github.com/Vikhram-S/IndianConstitution"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "adc2108e17999668448fcea5937e1365c8dd61f1a0c2ab8bfe5d6256f0d3525c",
"md5": "0e088f2f1a219e50073784c38dedaefd",
"sha256": "08eedbf756125abbdd89489959b1fb5c30fa7235ebb86d466277aec8a7ad170a"
},
"downloads": -1,
"filename": "IndianConstitution-0.5.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0e088f2f1a219e50073784c38dedaefd",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 6093,
"upload_time": "2025-02-02T13:03:27",
"upload_time_iso_8601": "2025-02-02T13:03:27.319497Z",
"url": "https://files.pythonhosted.org/packages/ad/c2/108e17999668448fcea5937e1365c8dd61f1a0c2ab8bfe5d6256f0d3525c/IndianConstitution-0.5.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5a49610ca645decd39fde1b121e7fa764f4fb67ebdfab7f7c9af50700e8d85ee",
"md5": "7fa88165beadb04d714419cfbefe89d1",
"sha256": "57b329492711d96be4829e597503f002010c264872cec3d029941d887d25f594"
},
"downloads": -1,
"filename": "indianconstitution-0.5.8.tar.gz",
"has_sig": false,
"md5_digest": "7fa88165beadb04d714419cfbefe89d1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 5644,
"upload_time": "2025-02-02T13:03:29",
"upload_time_iso_8601": "2025-02-02T13:03:29.500507Z",
"url": "https://files.pythonhosted.org/packages/5a/49/610ca645decd39fde1b121e7fa764f4fb67ebdfab7f7c9af50700e8d85ee/indianconstitution-0.5.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-02 13:03:29",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Vikhram-S",
"github_project": "IndianConstitution",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "indianconstitution"
}