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)
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 querycancel- 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 anycallorcancelmethods are called
Getting Started using the FlexFun Template
The easiest way to get started writing FlexFuns is to use the template repository. 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:
pip install gooddata-flight-server gooddata-flexfun
Next, update the GoodData Flight Server configuration to load the FlexFun methods.
[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:
#!/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.
Metadata
Release files for gooddata-flexfun 1.30.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gooddata_flexfun-1.30.0.tar.gz | 46.6 kB | Without provenance | Details for gooddata_flexfun-1.30.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gooddata_flexfun-1.30.0-py3-none-any.whl | Python 3 | none | any | Details for gooddata_flexfun-1.30.0-py3-none-any.whl |
Total release size: 94.2 kB
Release files / gooddata_flexfun-1.30.0.tar.gz
| Download URL | gooddata_flexfun-1.30.0.tar.gz |
|---|---|
| Size | 46.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8f7655590d65cc453ea911ffebdd49552f47e7821fc610cedc70480d09ebf156
|
|
BLAKE2b-256 checksum How to use checksums |
1922c49be251099dda029e7784a06dbe0553b706a3412d004fed85f9e2ea03be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.20
|
Release files / gooddata_flexfun-1.30.0-py3-none-any.whl
| Download URL | gooddata_flexfun-1.30.0-py3-none-any.whl |
|---|---|
| Size | 47.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e38e7d7e481acb09308540ddb853eacb19b71241d677a969f2fb8e3e3710a86e
|
|
BLAKE2b-256 checksum How to use checksums |
6b4ba5e5be270a924006f29fbe7b600df303b43f3d086a0a559be9f227d4532a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.20
|
Security for gooddata-flexfun 1.30.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.