Skip to main content
logo

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)

Table of built distributions (wheels) for idg-metadata-client 1.0.2.0
File Interpreter ABI Platform
idg_metadata_client-1.0.2.0-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

1.0.2.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page