Skip to main content

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

  1. looking at OPENLINEAGE_CONFIG environment variable
  2. looking for file openlineage.yml at current working directory
  3. 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 specifying
  • endpoint - optional string parameter specifying endpoint to which events are sent. By default api/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 to api_key or to fully qualified class name of your TokenProvider
    • api_key: if api_key type is set, it sets value at Authentication HTTP header as Bearer

Kafka

  • config - required string parameter - dictionary that contains Kafka producer config as in Kafka producer config
  • topic - required string parameter - topic on what events will be send
  • flush - 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 events
  • OPENLINEAGE_API_KEY - set if consumer of OpenLineage events requires Bearer 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

openlineage-python-0.14.1.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

openlineage_python-0.14.1-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file openlineage-python-0.14.1.tar.gz.

File metadata

  • Download URL: openlineage-python-0.14.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.13

File hashes

Hashes for openlineage-python-0.14.1.tar.gz
Algorithm Hash digest
SHA256 1d4537806204a578a6301438c9608b1c0e866ccc563d801bf1ea282c386efc07
MD5 ed1c1effdc69bebebf7fd3332ead0096
BLAKE2b-256 734aba351855127d1fd1d6d42673603c08a499b5ef9b152d94742d9f8ad9fcc1

See more details on using hashes here.

File details

Details for the file openlineage_python-0.14.1-py3-none-any.whl.

File metadata

File hashes

Hashes for openlineage_python-0.14.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b1f61388af8fcb67d550b3e89a27c1d699134cd4d397fa7a392ba2c499282384
MD5 654945cd7ac1456d2ef5b5b45e8abb8d
BLAKE2b-256 5eea6226bafc151f49a1da10095b526dbbfd92e3fc6113e6e6b556fadf5b4091

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page