Name | llama-index-readers-graphql JSON |
Version |
0.1.2
JSON |
| download |
home_page | |
Summary | llama-index readers graphql integration |
upload_time | 2024-02-13 20:53:39 |
maintainer | jexp |
docs_url | None |
author | Your Name |
requires_python | >=3.8.1,<3.12 |
license | MIT |
keywords |
apollo
gql
graphql
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# GraphQL Loader
This loader loads documents via GraphQL queries from a GraphQL endpoint.
The user specifies a GraphQL endpoint URL with optional credentials to initialize the reader.
By declaring the GraphQL query and optional variables (parameters) the loader can fetch the nested result docs.
## Usage
Here's an example usage of the GraphQLReader.
You can test out queries directly [on the site](https://countries.trevorblades.com/)
```python
from llama_index import download_loader
import os
GraphQLReader = download_loader("GraphQLReader")
uri = "https://countries.trevorblades.com/"
headers = {}
query = """
query getContinents {
continents {
code
name
}
}
"""
reader = GraphQLReader(uri, headers)
documents = reader.query(query, variables={})
```
This loader is designed to be used as a way to load data into [LlamaIndex](https://github.com/run-llama/llama_index/tree/main/llama_index)
and/or subsequently used as a Tool in a [LangChain](https://github.com/hwchase17/langchain) Agent.
See [here](https://github.com/emptycrown/llama-hub/tree/main) for examples.
It uses the [gql GraphQL library](https://pypi.org/project/gql/) for the GraphQL queries.
Raw data
{
"_id": null,
"home_page": "",
"name": "llama-index-readers-graphql",
"maintainer": "jexp",
"docs_url": null,
"requires_python": ">=3.8.1,<3.12",
"maintainer_email": "",
"keywords": "apollo,gql,graphql",
"author": "Your Name",
"author_email": "you@example.com",
"download_url": "https://files.pythonhosted.org/packages/6f/af/334e94025f54639a1ebf80895927dc03546f86b6b07723f5d2526ecb5733/llama_index_readers_graphql-0.1.2.tar.gz",
"platform": null,
"description": "# GraphQL Loader\n\nThis loader loads documents via GraphQL queries from a GraphQL endpoint.\nThe user specifies a GraphQL endpoint URL with optional credentials to initialize the reader.\nBy declaring the GraphQL query and optional variables (parameters) the loader can fetch the nested result docs.\n\n## Usage\n\nHere's an example usage of the GraphQLReader.\nYou can test out queries directly [on the site](https://countries.trevorblades.com/)\n\n```python\nfrom llama_index import download_loader\nimport os\n\nGraphQLReader = download_loader(\"GraphQLReader\")\n\nuri = \"https://countries.trevorblades.com/\"\nheaders = {}\nquery = \"\"\"\n query getContinents {\n continents {\n code\n name\n }\n }\n\"\"\"\nreader = GraphQLReader(uri, headers)\ndocuments = reader.query(query, variables={})\n```\n\nThis loader is designed to be used as a way to load data into [LlamaIndex](https://github.com/run-llama/llama_index/tree/main/llama_index)\nand/or subsequently used as a Tool in a [LangChain](https://github.com/hwchase17/langchain) Agent.\nSee [here](https://github.com/emptycrown/llama-hub/tree/main) for examples.\n\nIt uses the [gql GraphQL library](https://pypi.org/project/gql/) for the GraphQL queries.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "llama-index readers graphql integration",
"version": "0.1.2",
"project_urls": null,
"split_keywords": [
"apollo",
"gql",
"graphql"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "471f475f6454cfb6392c47071a8b593c4117c438db30078d48e0520fd9504344",
"md5": "5c8609d88558afc71ef73796537b3eb5",
"sha256": "e9d7d18d6d3744ef090106ea9ac6ec237765c89955733dc6f505cb3cd5ef6b7e"
},
"downloads": -1,
"filename": "llama_index_readers_graphql-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5c8609d88558afc71ef73796537b3eb5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8.1,<3.12",
"size": 3148,
"upload_time": "2024-02-13T20:53:37",
"upload_time_iso_8601": "2024-02-13T20:53:37.996681Z",
"url": "https://files.pythonhosted.org/packages/47/1f/475f6454cfb6392c47071a8b593c4117c438db30078d48e0520fd9504344/llama_index_readers_graphql-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6faf334e94025f54639a1ebf80895927dc03546f86b6b07723f5d2526ecb5733",
"md5": "6973231a7662c3116c378778e65244fb",
"sha256": "f4cbef968b093682d1651621fe688b85d553ca89ffb2c2d9b4de5487e73e24c9"
},
"downloads": -1,
"filename": "llama_index_readers_graphql-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "6973231a7662c3116c378778e65244fb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8.1,<3.12",
"size": 2745,
"upload_time": "2024-02-13T20:53:39",
"upload_time_iso_8601": "2024-02-13T20:53:39.595336Z",
"url": "https://files.pythonhosted.org/packages/6f/af/334e94025f54639a1ebf80895927dc03546f86b6b07723f5d2526ecb5733/llama_index_readers_graphql-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-13 20:53:39",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "llama-index-readers-graphql"
}