llama-index-readers-airbyte-typeform


Namellama-index-readers-airbyte-typeform JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
Summaryllama-index readers airbyte_typeform integration
upload_time2024-08-22 14:21:21
maintainerflash1293
docs_urlNone
authorYour Name
requires_python<4.0,>=3.8.1
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Airbyte Typeform Loader

```bash
pip install llama-index-readers-airbyte-typeform
```

The Airbyte Typeform Loader allows you to access different Typeform objects.

## Usage

Here's an example usage of the AirbyteTypeformReader.

```python
from llama_index.readers.airbyte_typeform import AirbyteTypeformReader

typeform_config = {
    # ...
}
reader = AirbyteTypeformReader(config=typeform_config)
documents = reader.load_data(stream_name="forms")
```

## Configuration

Check out the [Airbyte documentation page](https://docs.airbyte.com/integrations/sources/typeform/) 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-typeform/source_typeform/spec.json](https://github.com/airbytehq/airbyte/blob/master/airbyte-integrations/connectors/source-typeform/source_typeform/spec.json).

The general shape looks like this:

```python
{
    "credentials": {
        "auth_type": "Private Token",
        "access_token": "<your auth token>",
    },
    "start_date": "<date from which to start retrieving records from in ISO format, e.g. 2020-10-20T00:00:00Z>",
    "form_ids": [
        "<id of form to load records for>"
    ],  # if omitted, records from all forms will be loaded
}
```

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 = AirbyteTypeformReader(
    config=typeform_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 = AirbyteTypeformReader(config={...})
documents = reader.load_data(stream_name="forms")
current_state = reader.last_state  # can be pickled away or stored otherwise

updated_documents = reader.load_data(
    stream_name="forms", 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-typeform",
    "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/bc/f7/fdb2a461d3cf3d3341c4561bb9f0ffde0a61c04dc04521bf5621b3a259f9/llama_index_readers_airbyte_typeform-0.2.0.tar.gz",
    "platform": null,
    "description": "# Airbyte Typeform Loader\n\n```bash\npip install llama-index-readers-airbyte-typeform\n```\n\nThe Airbyte Typeform Loader allows you to access different Typeform objects.\n\n## Usage\n\nHere's an example usage of the AirbyteTypeformReader.\n\n```python\nfrom llama_index.readers.airbyte_typeform import AirbyteTypeformReader\n\ntypeform_config = {\n    # ...\n}\nreader = AirbyteTypeformReader(config=typeform_config)\ndocuments = reader.load_data(stream_name=\"forms\")\n```\n\n## Configuration\n\nCheck out the [Airbyte documentation page](https://docs.airbyte.com/integrations/sources/typeform/) 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-typeform/source_typeform/spec.json](https://github.com/airbytehq/airbyte/blob/master/airbyte-integrations/connectors/source-typeform/source_typeform/spec.json).\n\nThe general shape looks like this:\n\n```python\n{\n    \"credentials\": {\n        \"auth_type\": \"Private Token\",\n        \"access_token\": \"<your auth token>\",\n    },\n    \"start_date\": \"<date from which to start retrieving records from in ISO format, e.g. 2020-10-20T00:00:00Z>\",\n    \"form_ids\": [\n        \"<id of form to load records for>\"\n    ],  # if omitted, records from all forms will be loaded\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 = AirbyteTypeformReader(\n    config=typeform_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 = AirbyteTypeformReader(config={...})\ndocuments = reader.load_data(stream_name=\"forms\")\ncurrent_state = reader.last_state  # can be pickled away or stored otherwise\n\nupdated_documents = reader.load_data(\n    stream_name=\"forms\", 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_typeform integration",
    "version": "0.2.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "218ad8f3791276145d17895f120cf72e7707bf601ec0a17bdf242724554f4afb",
                "md5": "c343c4ef52e8f3ebe890167fc59899f8",
                "sha256": "06f28d83fad21e40529b52546f5915bcdf77f23d4fe30e06eee3a12f5fc6d36d"
            },
            "downloads": -1,
            "filename": "llama_index_readers_airbyte_typeform-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c343c4ef52e8f3ebe890167fc59899f8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8.1",
            "size": 3137,
            "upload_time": "2024-08-22T14:21:20",
            "upload_time_iso_8601": "2024-08-22T14:21:20.059934Z",
            "url": "https://files.pythonhosted.org/packages/21/8a/d8f3791276145d17895f120cf72e7707bf601ec0a17bdf242724554f4afb/llama_index_readers_airbyte_typeform-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bcf7fdb2a461d3cf3d3341c4561bb9f0ffde0a61c04dc04521bf5621b3a259f9",
                "md5": "9a73c07a0b609721cd05f43f986b38df",
                "sha256": "fb2db7126a3dc129bab727a6d06c0215940a1f2b50251cd8ae08aca935d729a0"
            },
            "downloads": -1,
            "filename": "llama_index_readers_airbyte_typeform-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9a73c07a0b609721cd05f43f986b38df",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8.1",
            "size": 2829,
            "upload_time": "2024-08-22T14:21:21",
            "upload_time_iso_8601": "2024-08-22T14:21:21.004890Z",
            "url": "https://files.pythonhosted.org/packages/bc/f7/fdb2a461d3cf3d3341c4561bb9f0ffde0a61c04dc04521bf5621b3a259f9/llama_index_readers_airbyte_typeform-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-22 14:21:21",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "llama-index-readers-airbyte-typeform"
}
        
Elapsed time: 0.66611s