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_CONFIG
environment variable - looking for file
openlineage.yml
at current working directory - looking for file
openlineage.yml
at$HOME/.openlineage
directory.
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.verify
optional 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_key
or to fully qualified class name of your TokenProviderapi_key
: ifapi_key
type is set, it sets value atAuthentication
HTTP 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 requiresBearer
authentication 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
File details
Details for the file openlineage-python-0.16.1.tar.gz
.
File metadata
- Download URL: openlineage-python-0.16.1.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51007f4db170bb0e3340dfbeb381f989551d969ea8496881f86501345f3f75c8 |
|
MD5 | da7d834b73b12150f7638d86db8103f5 |
|
BLAKE2b-256 | f1fb7e2413c228dac610557779ec2c84ff054d030605b142d47867cc1fa4ef69 |
File details
Details for the file openlineage_python-0.16.1-py3-none-any.whl
.
File metadata
- Download URL: openlineage_python-0.16.1-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ebc04b7922e5acc38bfc2bd40990ae25c9e5026cc5be4efcb85ae1ef0454697 |
|
MD5 | ad1e0507d9070a6aaca2f6625542a6cf |
|
BLAKE2b-256 | 23d50e2d94892817b15d2eb784c159a2de4cee5282c9efdfbed18579b14e9eca |