gooddata-flexfun


Namegooddata-flexfun JSON
Version 1.28.0 PyPI version JSON
download
home_pageNone
SummarySet of gooddata-flight-server methods to host custom functions for GoodData Cloud
upload_time2024-10-03 14:36:18
maintainerNone
docs_urlNone
authorGoodData
requires_python>=3.9.0
licenseMIT
keywords gooddata flight rpc flight rpc custom functions analytics headless business intelligence headless-bi cloud native semantic layer sql metrics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # GoodData FlexFun

The GoodData FlexFun package is a GoodData Flight Server-compatible extension
that provides a framework for hosting custom pluggable functions called FlexFuns.
These can be used to act as a dataset for GoodData FlightRPC data sources.

## What is a FlexFun?

In essence, FlexFun is a class that provides a set of methods that can be called by the GoodData Cloud when data is
requested from the corresponding FlightRPC data source dataset.

Each FlexFun provides a `name` used to identify the FlexFun in the GoodData Cloud.
FlexFuns can provide a set of `metadata` that can further influence when and how they are called by GoodData Cloud.
They also provide a `schema` (defined in terms
of [pyarrow.Schema](https://arrow.apache.org/docs/python/generated/pyarrow.Schema.html))
that describes the shape of data that the FlexFun can provide.
Finally, they provide a set of methods that can be called to provide data in response to queries:
* `call` - called to provide data in response to a query
* `cancel` - called to cancel a query if GoodData Cloud decides to stop requesting data (e.g. if there is a timeout)
* `on_load` - called when the FlexFun is created before any `call` or `cancel` methods are called

## Getting Started using the FlexFun Template

The easiest way to get started writing FlexFuns is to use [the template repository](https://github.com/gooddata/gooddata-flexfun-template).
It provides a simple example of a FlexFun that can be used as a starting point for your own FlexFun with all the necessary infrastructure in place.
It also has a README that explains how to get started with the template and some general tips on how to write FlexFuns.

## Getting started using the FlexFun package directly

Install the package alongside the gooddata-flight-server using pip:

```bash
pip install gooddata-flight-server gooddata-flexfun
```

Next, update the GoodData Flight Server configuration to load the FlexFun methods.

```toml
[flexfun]

# specify one or more modules that contain your FlexFun implementations
#
functions = [
    "flexfun.your_function"
]
```

Then when running the GoodData Flight Server, use the `--methods-provider` option to load the FlexFun methods.
For example:

```bash
#!/bin/bash

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
SERVER_CMD="${SCRIPT_DIR}/.venv/bin/gooddata-flight-server"

export PYTHONPATH="${SCRIPT_DIR}/src"
export CONFIG_ENV="${1:-dev}"

$SERVER_CMD start \
              --methods-provider gooddata_flexfun \
              --config \
                config/${CONFIG_ENV}.server.toml \
                config/flexfun.config.toml \
              --logging-config config/default.logging.ini \
              --dev-log
```

This will start the GoodData Flight Server with the FlexFun methods loaded.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "gooddata-flexfun",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9.0",
    "maintainer_email": null,
    "keywords": "gooddata, flight, rpc, flight rpc, custom functions, analytics, headless, business, intelligence, headless-bi, cloud, native, semantic, layer, sql, metrics",
    "author": "GoodData",
    "author_email": "support@gooddata.com",
    "download_url": "https://files.pythonhosted.org/packages/64/52/6787c3826eee703cd32dae369c5ca8676ec7c759fe14879f93ee3a8d1fae/gooddata_flexfun-1.28.0.tar.gz",
    "platform": null,
    "description": "# GoodData FlexFun\n\nThe GoodData FlexFun package is a GoodData Flight Server-compatible extension\nthat provides a framework for hosting custom pluggable functions called FlexFuns.\nThese can be used to act as a dataset for GoodData FlightRPC data sources.\n\n## What is a FlexFun?\n\nIn essence, FlexFun is a class that provides a set of methods that can be called by the GoodData Cloud when data is\nrequested from the corresponding FlightRPC data source dataset.\n\nEach FlexFun provides a `name` used to identify the FlexFun in the GoodData Cloud.\nFlexFuns can provide a set of `metadata` that can further influence when and how they are called by GoodData Cloud.\nThey also provide a `schema` (defined in terms\nof [pyarrow.Schema](https://arrow.apache.org/docs/python/generated/pyarrow.Schema.html))\nthat describes the shape of data that the FlexFun can provide.\nFinally, they provide a set of methods that can be called to provide data in response to queries:\n* `call` - called to provide data in response to a query\n* `cancel` - called to cancel a query if GoodData Cloud decides to stop requesting data (e.g. if there is a timeout)\n* `on_load` - called when the FlexFun is created before any `call` or `cancel` methods are called\n\n## Getting Started using the FlexFun Template\n\nThe easiest way to get started writing FlexFuns is to use [the template repository](https://github.com/gooddata/gooddata-flexfun-template).\nIt provides a simple example of a FlexFun that can be used as a starting point for your own FlexFun with all the necessary infrastructure in place.\nIt also has a README that explains how to get started with the template and some general tips on how to write FlexFuns.\n\n## Getting started using the FlexFun package directly\n\nInstall the package alongside the gooddata-flight-server using pip:\n\n```bash\npip install gooddata-flight-server gooddata-flexfun\n```\n\nNext, update the GoodData Flight Server configuration to load the FlexFun methods.\n\n```toml\n[flexfun]\n\n# specify one or more modules that contain your FlexFun implementations\n#\nfunctions = [\n    \"flexfun.your_function\"\n]\n```\n\nThen when running the GoodData Flight Server, use the `--methods-provider` option to load the FlexFun methods.\nFor example:\n\n```bash\n#!/bin/bash\n\nSCRIPT_DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" &> /dev/null && pwd )\"\nSERVER_CMD=\"${SCRIPT_DIR}/.venv/bin/gooddata-flight-server\"\n\nexport PYTHONPATH=\"${SCRIPT_DIR}/src\"\nexport CONFIG_ENV=\"${1:-dev}\"\n\n$SERVER_CMD start \\\n              --methods-provider gooddata_flexfun \\\n              --config \\\n                config/${CONFIG_ENV}.server.toml \\\n                config/flexfun.config.toml \\\n              --logging-config config/default.logging.ini \\\n              --dev-log\n```\n\nThis will start the GoodData Flight Server with the FlexFun methods loaded.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Set of gooddata-flight-server methods to host custom functions for GoodData Cloud",
    "version": "1.28.0",
    "project_urls": {
        "Documentation": "https://gooddata-flexfun.readthedocs.io/en/v1.28.0",
        "Source": "https://github.com/gooddata/gooddata-python-sdk"
    },
    "split_keywords": [
        "gooddata",
        " flight",
        " rpc",
        " flight rpc",
        " custom functions",
        " analytics",
        " headless",
        " business",
        " intelligence",
        " headless-bi",
        " cloud",
        " native",
        " semantic",
        " layer",
        " sql",
        " metrics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cbaa561fa8a28dab47ed96d5117c1620a04a9d5e281891bf98152098d20e526a",
                "md5": "8ccfca1b19d4c8f073978ce0a20fcf27",
                "sha256": "ac2d25bbaf7d5cf95a125ed773ddda98edf4fca4372054039a4b380960153d49"
            },
            "downloads": -1,
            "filename": "gooddata_flexfun-1.28.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8ccfca1b19d4c8f073978ce0a20fcf27",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9.0",
            "size": 29757,
            "upload_time": "2024-10-03T14:36:14",
            "upload_time_iso_8601": "2024-10-03T14:36:14.494495Z",
            "url": "https://files.pythonhosted.org/packages/cb/aa/561fa8a28dab47ed96d5117c1620a04a9d5e281891bf98152098d20e526a/gooddata_flexfun-1.28.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "64526787c3826eee703cd32dae369c5ca8676ec7c759fe14879f93ee3a8d1fae",
                "md5": "9f866957f57393f4e20ac0bf8626d093",
                "sha256": "3da3294a83bbcc0a1089a8eb1d4816eae31798d3a67703e51e3711e61add4b1b"
            },
            "downloads": -1,
            "filename": "gooddata_flexfun-1.28.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9f866957f57393f4e20ac0bf8626d093",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9.0",
            "size": 28910,
            "upload_time": "2024-10-03T14:36:18",
            "upload_time_iso_8601": "2024-10-03T14:36:18.787785Z",
            "url": "https://files.pythonhosted.org/packages/64/52/6787c3826eee703cd32dae369c5ca8676ec7c759fe14879f93ee3a8d1fae/gooddata_flexfun-1.28.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-03 14:36:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "gooddata",
    "github_project": "gooddata-python-sdk",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "gooddata-flexfun"
}
        
Elapsed time: 0.43022s