Name | llama-index-readers-airbyte-zendesk-support JSON |
Version |
0.2.0
JSON |
| download |
home_page | None |
Summary | llama-index readers airbyte_zendesk_support integration |
upload_time | 2024-08-22 14:22:08 |
maintainer | flash1293 |
docs_url | None |
author | Your Name |
requires_python | <4.0,>=3.8.1 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Airbyte ZendeskSupport Loader
```bash
pip install llama-index-readers-airbyte-zendesk-support
```
The Airbyte ZendeskSupport Loader allows you to access different ZendeskSupport objects.
## Usage
Here's an example usage of the AirbyteZendeskSupportReader.
```python
from llama_index.readers.airbyte_zendesk_support import (
AirbyteZendeskSupportReader,
)
zendesk_support_config = {
# ...
}
reader = AirbyteZendeskSupportReader(config=zendesk_support_config)
documents = reader.load_data(stream_name="tickets")
```
## Configuration
Check out the [Airbyte documentation page](https://docs.airbyte.com/integrations/sources/zendesk-support/) for details about how to configure the reader.
The JSON schema the config object should adhere to can be found on Github: [https://github.com/airbytehq/airbyte/blob/master/airbyte-integrations/connectors/source-zendesk-support/source_zendesk_support/spec.json](https://github.com/airbytehq/airbyte/blob/master/airbyte-integrations/connectors/source-zendesk-support/source_zendesk_support/spec.json).
The general shape looks like this:
```python
{
"subdomain": "<your zendesk subdomain>",
"start_date": "<date from which to start retrieving records from in ISO format, e.g. 2020-10-20T00:00:00Z>",
"credentials": {
"credentials": "api_token",
"email": "<your email>",
"api_token": "<your api token>",
},
}
```
By default all fields are stored as metadata in the documents and the text is set to the JSON representation of all the fields. Construct the text of the document by passing a `record_handler` to the reader:
```python
def handle_record(record, id):
return Document(
doc_id=id, text=record.data["title"], extra_info=record.data
)
reader = AirbyteZendeskSupportReader(
config=zendesk_support_config, record_handler=handle_record
)
```
## Lazy loads
The `reader.load_data` endpoint will collect all documents and return them as a list. If there are a large number of documents, this can cause issues. By using `reader.lazy_load_data` instead, an iterator is returned which can be consumed document by document without the need to keep all documents in memory.
## Incremental loads
This loader supports loading data incrementally (only returning documents that weren't loaded last time or got updated in the meantime):
```python
reader = AirbyteZendeskSupportReader(config={...})
documents = reader.load_data(stream_name="tickets")
current_state = reader.last_state # can be pickled away or stored otherwise
updated_documents = reader.load_data(
stream_name="tickets", state=current_state
) # only loads documents that were updated since last time
```
This loader is designed to be used as a way to load data into [LlamaIndex](https://github.com/run-llama/llama_index/).
Raw data
{
"_id": null,
"home_page": null,
"name": "llama-index-readers-airbyte-zendesk-support",
"maintainer": "flash1293",
"docs_url": null,
"requires_python": "<4.0,>=3.8.1",
"maintainer_email": null,
"keywords": null,
"author": "Your Name",
"author_email": "you@example.com",
"download_url": "https://files.pythonhosted.org/packages/8d/3e/e91a7d7692b4fee2e3aa7d63c569da6f2cdc4217fa273f1e894a091f2c87/llama_index_readers_airbyte_zendesk_support-0.2.0.tar.gz",
"platform": null,
"description": "# Airbyte ZendeskSupport Loader\n\n```bash\npip install llama-index-readers-airbyte-zendesk-support\n```\n\nThe Airbyte ZendeskSupport Loader allows you to access different ZendeskSupport objects.\n\n## Usage\n\nHere's an example usage of the AirbyteZendeskSupportReader.\n\n```python\nfrom llama_index.readers.airbyte_zendesk_support import (\n AirbyteZendeskSupportReader,\n)\n\nzendesk_support_config = {\n # ...\n}\nreader = AirbyteZendeskSupportReader(config=zendesk_support_config)\ndocuments = reader.load_data(stream_name=\"tickets\")\n```\n\n## Configuration\n\nCheck out the [Airbyte documentation page](https://docs.airbyte.com/integrations/sources/zendesk-support/) for details about how to configure the reader.\nThe JSON schema the config object should adhere to can be found on Github: [https://github.com/airbytehq/airbyte/blob/master/airbyte-integrations/connectors/source-zendesk-support/source_zendesk_support/spec.json](https://github.com/airbytehq/airbyte/blob/master/airbyte-integrations/connectors/source-zendesk-support/source_zendesk_support/spec.json).\n\nThe general shape looks like this:\n\n```python\n{\n \"subdomain\": \"<your zendesk subdomain>\",\n \"start_date\": \"<date from which to start retrieving records from in ISO format, e.g. 2020-10-20T00:00:00Z>\",\n \"credentials\": {\n \"credentials\": \"api_token\",\n \"email\": \"<your email>\",\n \"api_token\": \"<your api token>\",\n },\n}\n```\n\nBy default all fields are stored as metadata in the documents and the text is set to the JSON representation of all the fields. Construct the text of the document by passing a `record_handler` to the reader:\n\n```python\ndef handle_record(record, id):\n return Document(\n doc_id=id, text=record.data[\"title\"], extra_info=record.data\n )\n\n\nreader = AirbyteZendeskSupportReader(\n config=zendesk_support_config, record_handler=handle_record\n)\n```\n\n## Lazy loads\n\nThe `reader.load_data` endpoint will collect all documents and return them as a list. If there are a large number of documents, this can cause issues. By using `reader.lazy_load_data` instead, an iterator is returned which can be consumed document by document without the need to keep all documents in memory.\n\n## Incremental loads\n\nThis loader supports loading data incrementally (only returning documents that weren't loaded last time or got updated in the meantime):\n\n```python\nreader = AirbyteZendeskSupportReader(config={...})\ndocuments = reader.load_data(stream_name=\"tickets\")\ncurrent_state = reader.last_state # can be pickled away or stored otherwise\n\nupdated_documents = reader.load_data(\n stream_name=\"tickets\", state=current_state\n) # only loads documents that were updated since last time\n```\n\nThis loader is designed to be used as a way to load data into [LlamaIndex](https://github.com/run-llama/llama_index/).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "llama-index readers airbyte_zendesk_support integration",
"version": "0.2.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "af0abaee2979a08eea9ba95bc72d9099c43913bf65ebc6cc88b452d6a48b8d6d",
"md5": "8bd0c642d20f889507b51f64c28d0a6e",
"sha256": "0a5275c6f1913030091aad3ae5b44f404e8bc3fdc3d6831729737da7d2469c30"
},
"downloads": -1,
"filename": "llama_index_readers_airbyte_zendesk_support-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8bd0c642d20f889507b51f64c28d0a6e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8.1",
"size": 3213,
"upload_time": "2024-08-22T14:22:07",
"upload_time_iso_8601": "2024-08-22T14:22:07.332344Z",
"url": "https://files.pythonhosted.org/packages/af/0a/baee2979a08eea9ba95bc72d9099c43913bf65ebc6cc88b452d6a48b8d6d/llama_index_readers_airbyte_zendesk_support-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8d3ee91a7d7692b4fee2e3aa7d63c569da6f2cdc4217fa273f1e894a091f2c87",
"md5": "e4b17d6d32ab7260c69ad4447e678987",
"sha256": "bf32d93cc9c0320843dac9201d29ae9546e47027e21b6cd9faa84d27ec04eb24"
},
"downloads": -1,
"filename": "llama_index_readers_airbyte_zendesk_support-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "e4b17d6d32ab7260c69ad4447e678987",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8.1",
"size": 2855,
"upload_time": "2024-08-22T14:22:08",
"upload_time_iso_8601": "2024-08-22T14:22:08.923430Z",
"url": "https://files.pythonhosted.org/packages/8d/3e/e91a7d7692b4fee2e3aa7d63c569da6f2cdc4217fa273f1e894a091f2c87/llama_index_readers_airbyte_zendesk_support-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-22 14:22:08",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "llama-index-readers-airbyte-zendesk-support"
}