Metadata Client
Metadata Ingestion is a simple framework to build connectors and ingest metadata of various systems through OpenMetadata APIs. It could be used in an orchestration framework(e.g. Apache Airflow) to ingest metadata.
Usage
Install the package:
pip install metadata-client
Setup a metadata client:
from metadata.ingestion.ometa.ometa_api import OpenMetadata
from metadata.generated.schema.entity.services.connections.metadata.openMetadataConnection import OpenMetadataConnection
from metadata.generated.schema.security.client.openMetadataJWTClientConfig import OpenMetadataJWTClientConfig
server_config = OpenMetadataConnection(
hostPort="<metadata-server>/api",
authProvider="openmetadata",
securityConfig=OpenMetadataJWTClientConfig(
jwtToken="<your-token>"
),
)
client = OpenMetadata(server_config)
When developping in local (only), you may need to accept insecure transport (i.e. http).
This is NOT recommanded outside of local development environement, that is requesting localhost.
import os
os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1'
Quickstart
Create or update metadata classification:
# Create or update classification
classification_request = CreateClassificationRequest(
name="TestClassification",
displayName="TestClassification-2",
description="Sample classification: {}".format(uuid.uuid4()),
)
client.create_or_update(classification_request)
Documentation
Contributing
Before committing to this repository, you must have pre-commit installed, and install the following pre-commit hooks:
pre-commit install --install-hooks -t pre-commit -t pre-push
License
This project is licensed under the Apache 2.0 License - see the LICENSE file for details
Metadata
Release files for idg-metadata-client 1.0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| idg_metadata_client-1.0.2.0-py3-none-any.whl | Python 3 | none | any | Details for idg_metadata_client-1.0.2.0-py3-none-any.whl |
Release files / idg_metadata_client-1.0.2.0-py3-none-any.whl
| Download URL | idg_metadata_client-1.0.2.0-py3-none-any.whl |
|---|---|
| Size | 1.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
edce5f78467a05785b5fa2a143244a058cb9e8d8d4b89839d60a8084b0f1bb83
|
|
BLAKE2b-256 checksum How to use checksums |
806ed574a9bec94d4e04103c2ca199e3b218305921e1da841a12317f672fd883
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Security for idg-metadata-client 1.0.2.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.