OpenLineage Python Client
Project description
OpenLineage-python
To install from source, run:
$ python setup.py install
Configuration
Config file
Main way of configuring OpenLineage Client is by yaml file, which contains all the details of how to connect to your OpenLineage backend.
Config file is located by
- looking at
OPENLINEAGE_CONFIGenvironment variable - looking for file
openlineage.ymlat current working directory - looking for file
openlineage.ymlat$HOME/.openlineagedirectory.
Different ways of connecting to OpenLineage backend are supported
by standarized Transport interface.
This is example config that specifies http transport:
transport:
type: "http"
url: "https://backend:5000"
auth:
type: "api_key"
api_key: "f048521b-dfe8-47cd-9c65-0cb07d57591e"
type property is required. It can be one of the build-in transports, or custom one.
There are three build-in transports, http, kafka or console.
Custom transports type is fully qualified class name that can be imported.
Rest of the properties are defined by particular transport.
Specification of build-in ones are below.
HTTP
url- required string parameter specifyingendpoint- optional string parameter specifying endpoint to which events are sent. By defaultapi/v1/lineage.timeout- optional float parameter specifying timeout when sending event. By default 5 seconds.verifyoptional boolean attribute specifying if client should verify TLS certificates of backend. By default true.auth- optional dictionary specifying authentication options. Type property is required.type: required property if auth dictionary is set. Set toapi_keyor to fully qualified class name of your TokenProviderapi_key: ifapi_keytype is set, it sets value atAuthenticationHTTP header asBearer
Kafka
config- required string parameter - dictionary that contains Kafka producer config as in Kafka producer configtopic- required string parameter - topic on what events will be sendflush- optional boolean parameter - if it's set to True, then Kafka will flush after each event. By default set to true.
Custom transport
To implement custom transport, follow instructions in openlineage/client/transport/transport.py file.
Config as env vars
If there is no config file found, OpenLineage client looks at environment variables.
This way of configuring supports only http transport, and only subset of it's config.
OPENLINEAGE_URL- point to service which will consume OpenLineage eventsOPENLINEAGE_API_KEY- set if consumer of OpenLineage events requiresBearerauthentication key
OPENLINEAGE_URL and OPENLINEAGE_API_KEY can also be set up manually when creating client instance.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openlineage-python-0.14.0.tar.gz.
File metadata
- Download URL: openlineage-python-0.14.0.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63e175846403e345aeebde2a206f97e356a19fcd28df563748f36fd689820f7a
|
|
| MD5 |
c6b773109f5e2f766d4a33126f64cc6f
|
|
| BLAKE2b-256 |
758bac33c2ced0905810e4605044b7cde380ac85b8ba124b41789907385c3eb0
|
File details
Details for the file openlineage_python-0.14.0-py3-none-any.whl.
File metadata
- Download URL: openlineage_python-0.14.0-py3-none-any.whl
- Upload date:
- Size: 14.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57a2377bbf6f4485ec166041d8430de9aee1b8998054349b79eacf1bc79481fa
|
|
| MD5 |
4de520a6509847fc0f4f65b148d158a2
|
|
| BLAKE2b-256 |
1fa5fb3ec44b2e9e4cf9e0b350861f125b38f91fbe8caa8e9f15ece8fdddbfaf
|