openlineage-python 1.3.1__tar.gz → 1.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/PKG-INFO +5 -4
  2. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/README.md +2 -1
  3. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/openlineage/client/constants.py +1 -1
  4. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/openlineage/client/facet.py +3 -1
  5. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/openlineage/client/transport/factory.py +5 -1
  6. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/pyproject.toml +3 -3
  7. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/tests/test_factory.py +5 -1
  8. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/.gitignore +0 -0
  9. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/openlineage/client/__init__.py +0 -0
  10. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/openlineage/client/client.py +0 -0
  11. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/openlineage/client/filter.py +0 -0
  12. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/openlineage/client/py.typed +0 -0
  13. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/openlineage/client/run.py +0 -0
  14. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/openlineage/client/serde.py +0 -0
  15. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/openlineage/client/transport/__init__.py +0 -0
  16. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/openlineage/client/transport/console.py +0 -0
  17. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/openlineage/client/transport/file.py +0 -0
  18. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/openlineage/client/transport/http.py +0 -0
  19. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/openlineage/client/transport/kafka.py +0 -0
  20. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/openlineage/client/transport/noop.py +0 -0
  21. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/openlineage/client/transport/transport.py +0 -0
  22. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/openlineage/client/utils.py +0 -0
  23. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/tests/__init__.py +0 -0
  24. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/tests/config/config.yml +0 -0
  25. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/tests/config/exact_filter.yml +0 -0
  26. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/tests/config/http.yml +0 -0
  27. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/tests/config/openlineage.yml +0 -0
  28. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/tests/config/regex_filter.yml +0 -0
  29. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/tests/conftest.py +0 -0
  30. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/tests/nominal_time_without_end.json +0 -0
  31. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/tests/serde_example_dataset_event.json +0 -0
  32. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/tests/serde_example_job_event.json +0 -0
  33. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/tests/serde_example_run_event.json +0 -0
  34. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/tests/test_client.py +0 -0
  35. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/tests/test_events.py +0 -0
  36. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/tests/test_facet.py +0 -0
  37. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/tests/test_file.py +0 -0
  38. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/tests/test_http.py +0 -0
  39. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/tests/test_kafka.py +0 -0
  40. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/tests/transport.py +0 -0
  41. {openlineage_python-1.3.1 → openlineage_python-1.5.0}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: openlineage-python
3
- Version: 1.3.1
3
+ Version: 1.5.0
4
4
  Summary: OpenLineage Python Client
5
5
  Author-email: OpenLineage <info@openlineage.io>
6
6
  Keywords: openlineage
@@ -13,10 +13,10 @@ Classifier: Programming Language :: Python :: 3.10
13
13
  Classifier: Programming Language :: Python :: 3.11
14
14
  Classifier: Programming Language :: Python :: 3.12
15
15
  Requires-Python: >=3.8
16
- Requires-Dist: attrs>=23.1
16
+ Requires-Dist: attrs>=20.0
17
17
  Requires-Dist: python-dateutil>=2.8.2
18
18
  Requires-Dist: pyyaml>=5.4
19
- Requires-Dist: requests>=2.31
19
+ Requires-Dist: requests>=2.20.0
20
20
  Provides-Extra: kafka
21
21
  Requires-Dist: confluent-kafka>=2.1.1; extra == 'kafka'
22
22
  Provides-Extra: test
@@ -100,9 +100,10 @@ If there is no config file found, the OpenLineage client looks at environment va
100
100
  This way of configuring the client supports only `http` transport, and only a subset of its config.
101
101
 
102
102
  * `OPENLINEAGE_URL` - point to the service that will consume OpenLineage events.
103
+ * `OPENLINEAGE_ENDPOINT` - specify the endpoint to send the OpenLineage events.
103
104
  * `OPENLINEAGE_API_KEY` - set if the consumer of OpenLineage events requires a `Bearer` authentication key.
104
105
 
105
- `OPENLINEAGE_URL` and `OPENLINEAGE_API_KEY` can also be set up manually when creating a client instance.
106
+ `OPENLINEAGE_URL`, `OPENLINEAGE_ENDPOINT`, and `OPENLINEAGE_API_KEY` can also be set up manually when creating a client instance.
106
107
 
107
108
  #### Logging level
108
109
  In addition to conventional logging approaches, the OpenLineage client library provides an alternative way of configuring its logging behavior. By setting the `OPENLINEAGE_CLIENT_LOGGING` environment variable, you can establish the logging level for the `openlineage.client` and its child modules.
@@ -71,9 +71,10 @@ If there is no config file found, the OpenLineage client looks at environment va
71
71
  This way of configuring the client supports only `http` transport, and only a subset of its config.
72
72
 
73
73
  * `OPENLINEAGE_URL` - point to the service that will consume OpenLineage events.
74
+ * `OPENLINEAGE_ENDPOINT` - specify the endpoint to send the OpenLineage events.
74
75
  * `OPENLINEAGE_API_KEY` - set if the consumer of OpenLineage events requires a `Bearer` authentication key.
75
76
 
76
- `OPENLINEAGE_URL` and `OPENLINEAGE_API_KEY` can also be set up manually when creating a client instance.
77
+ `OPENLINEAGE_URL`, `OPENLINEAGE_ENDPOINT`, and `OPENLINEAGE_API_KEY` can also be set up manually when creating a client instance.
77
78
 
78
79
  #### Logging level
79
80
  In addition to conventional logging approaches, the OpenLineage client library provides an alternative way of configuring its logging behavior. By setting the `OPENLINEAGE_CLIENT_LOGGING` environment variable, you can establish the logging level for the `openlineage.client` and its child modules.
@@ -2,7 +2,7 @@
2
2
  # SPDX-License-Identifier: Apache-2.0
3
3
  from __future__ import annotations
4
4
 
5
- __version__ = "1.3.1"
5
+ __version__ = "1.5.0"
6
6
 
7
7
  DEFAULT_TIMEOUT_MS = 5000
8
8
  DEFAULT_NAMESPACE_NAME = "default"
@@ -345,11 +345,13 @@ class OwnershipDatasetFacet(BaseFacet):
345
345
 
346
346
 
347
347
  @attr.s
348
- class ColumnLineageDatasetFacetFieldsAdditionalInputFields:
348
+ class ColumnLineageDatasetFacetFieldsAdditionalInputFields(RedactMixin):
349
349
  namespace: str = attr.ib()
350
350
  name: str = attr.ib()
351
351
  field: str = attr.ib()
352
352
 
353
+ _skip_redact: List[str] = ["namespace", "name", "field"]
354
+
353
355
 
354
356
  @attr.s
355
357
  class ColumnLineageDatasetFacetFieldsAdditional:
@@ -73,7 +73,7 @@ class DefaultTransportFactory(TransportFactory):
73
73
  )
74
74
 
75
75
  # backwards compatibility: create Transport from
76
- # OPENLINEAGE_URL and OPENLINEAGE_API_KEY
76
+ # OPENLINEAGE_URL, OPENLINEAGE_ENDPOINT, and OPENLINEAGE_API_KEY
77
77
  if "OPENLINEAGE_URL" not in os.environ:
78
78
  log.error("Did not find openlineage.yml and OPENLINEAGE_URL is not set")
79
79
  return None
@@ -86,4 +86,8 @@ class DefaultTransportFactory(TransportFactory):
86
86
  },
87
87
  ),
88
88
  )
89
+ endpoint = os.environ.get("OPENLINEAGE_ENDPOINT", None)
90
+ if endpoint is not None:
91
+ config.endpoint = endpoint
92
+
89
93
  return HttpTransport(config)
@@ -6,7 +6,7 @@ requires = [
6
6
 
7
7
  [project]
8
8
  name = "openlineage-python"
9
- version = "1.3.1"
9
+ version = "1.5.0"
10
10
  description = "OpenLineage Python Client"
11
11
  readme = "README.md"
12
12
  keywords = [
@@ -25,10 +25,10 @@ classifiers = [
25
25
  "Programming Language :: Python :: 3.12",
26
26
  ]
27
27
  dependencies = [
28
- "attrs>=23.1",
28
+ "attrs>=20.0",
29
29
  "python-dateutil>=2.8.2",
30
30
  "pyyaml>=5.4",
31
- "requests>=2.31",
31
+ "requests>=2.20.0",
32
32
  ]
33
33
  optional-dependencies.kafka = [
34
34
  "confluent-kafka>=2.1.1",
@@ -23,11 +23,15 @@ if TYPE_CHECKING:
23
23
  from pytest_mock import MockerFixture
24
24
 
25
25
 
26
- @patch.dict(os.environ, {"OPENLINEAGE_URL": "http://mock-url:5000"})
26
+ @patch.dict(
27
+ os.environ,
28
+ {"OPENLINEAGE_URL": "http://mock-url:5000", "OPENLINEAGE_ENDPOINT": "endpoint"},
29
+ )
27
30
  def test_client_uses_default_http_factory() -> None:
28
31
  client = OpenLineageClient()
29
32
  assert isinstance(client.transport, HttpTransport)
30
33
  assert client.transport.url == "http://mock-url:5000"
34
+ assert client.transport.endpoint == "endpoint"
31
35
 
32
36
 
33
37
  def test_factory_registers_new_transports(mocker: MockerFixture) -> None: