### AskJSON
As the name suggests, `AskJSON` helps you fetch answers or data from your json using natural language. It uses OpenAI API.
#### How to Use AskJSON:
1. Install the package using pip:
```
pip install AskJSON
```
2. Set your OpenAI API key as an environment variable:
```
export OPENAI_API_KEY='your_api_key_here'
```
3. In your Python script, import `ask_json` and call it with your JSON and query:
```python
from askjson import ask_json
my_json_data = {...} # Your JSON data here
my_query = "How many items are in the list?"
result_code = ask_json(my_json_data, my_query)
print(result_code)
```
#### Todo:
- have support for codellama
Raw data
{
"_id": null,
"home_page": "https://github.com/somnath6646/AskJSON",
"name": "AskJSON",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "json query ai openai python code generation",
"author": "Somnath",
"author_email": "somnathmishra6646@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/d1/a1/65913dc135170cb94d60b74148a2dd59c3b7809fc41cf69364fe0fa368b5/AskJSON-0.1.2.tar.gz",
"platform": null,
"description": "\n### AskJSON\n\nAs the name suggests, `AskJSON` helps you fetch answers or data from your json using natural language. It uses OpenAI API.\n\n#### How to Use AskJSON:\n\n1. Install the package using pip:\n\n ```\n pip install AskJSON\n ```\n2. Set your OpenAI API key as an environment variable:\n\n ```\n export OPENAI_API_KEY='your_api_key_here'\n ```\n3. In your Python script, import `ask_json` and call it with your JSON and query:\n\n ```python\n from askjson import ask_json\n\n my_json_data = {...} # Your JSON data here\n my_query = \"How many items are in the list?\"\n\n result_code = ask_json(my_json_data, my_query)\n print(result_code)\n ```\n\n#### Todo:\n\n- have support for codellama\n",
"bugtrack_url": null,
"license": "",
"summary": "A library to ask questions to JSON data and get Python code in response.",
"version": "0.1.2",
"project_urls": {
"Bug Tracker": "https://github.com/Somnath6646/AskJSON/issues",
"Documentation": "https://github.com/Somnath6646/AskJSON#readme",
"Homepage": "https://github.com/somnath6646/AskJSON",
"Source Code": "https://github.com/Somnath6646/AskJSON"
},
"split_keywords": [
"json",
"query",
"ai",
"openai",
"python",
"code",
"generation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "92bac8fd1a0005f6b6f6f83cde5064aa2ebe2b5108657cb2058c0feec7f387b9",
"md5": "44d9dc68984c09b3d9e8c461156211e7",
"sha256": "1763dd7aa59b82ed53df0852db2e4c7dcc141051d12724fe192dd78b27ea618e"
},
"downloads": -1,
"filename": "AskJSON-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "44d9dc68984c09b3d9e8c461156211e7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 9232,
"upload_time": "2023-11-12T13:02:41",
"upload_time_iso_8601": "2023-11-12T13:02:41.418395Z",
"url": "https://files.pythonhosted.org/packages/92/ba/c8fd1a0005f6b6f6f83cde5064aa2ebe2b5108657cb2058c0feec7f387b9/AskJSON-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d1a165913dc135170cb94d60b74148a2dd59c3b7809fc41cf69364fe0fa368b5",
"md5": "b43a7dc7d20bc3e8636e932036948ff0",
"sha256": "95f2e61460b457c4099b741fcb3150cb44df2d8d26a3321dbeb0b9b932e7464e"
},
"downloads": -1,
"filename": "AskJSON-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "b43a7dc7d20bc3e8636e932036948ff0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 13537,
"upload_time": "2023-11-12T13:02:42",
"upload_time_iso_8601": "2023-11-12T13:02:42.863993Z",
"url": "https://files.pythonhosted.org/packages/d1/a1/65913dc135170cb94d60b74148a2dd59c3b7809fc41cf69364fe0fa368b5/AskJSON-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-12 13:02:42",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "somnath6646",
"github_project": "AskJSON",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "openai",
"specs": []
},
{
"name": "termcolor",
"specs": []
},
{
"name": "python-dotenv",
"specs": []
},
{
"name": "stdlib-list",
"specs": []
}
],
"lcname": "askjson"
}