Name | idg-metadata-client JSON |
Version |
1.0.2.0
JSON |
| download |
home_page | |
Summary | Ingestion Framework for OpenMetadata |
upload_time | 2023-07-12 01:25:02 |
maintainer | |
docs_url | None |
author | ciusji |
requires_python | >=3.7 |
license | Apache License 2.0 |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<div align="center">
<img src="./assets/metadata-client.jpg" alt="logo" height="60" />
<br />
<br />
</div>
# 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:
```sh
pip install metadata-client
```
Setup a metadata client:
```python3
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`.
```python3
import os
os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1'
```
## Quickstart
Create or update metadata classification:
```python3
# 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
- [Service of Assets Management](https://confluence.idgcapital.com/pages/viewpage.action?pageId=50725725)
- [Service of Data Building](https://confluence.idgcapital.com/pages/viewpage.action?pageId=50725719)
- [Directory of Data Platform](https://confluence.idgcapital.com/pages/viewpage.action?pageId=46401007)
## Contributing
Before committing to this repository, you must have [pre-commit](https://pre-commit.com) installed, and install
the following pre-commit hooks:
```sh
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](LICENSE) file for details
Raw data
{
"_id": null,
"home_page": "",
"name": "idg-metadata-client",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "",
"author": "ciusji",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/f8/01/27d297a3f5705c4a6795c037a2979a77df27a91c5346d3ea48cd89de43b0/idg-metadata-client-1.0.2.0.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n <img src=\"./assets/metadata-client.jpg\" alt=\"logo\" height=\"60\" />\n <br />\n <br />\n</div>\n\n# Metadata Client\n\nMetadata 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.\n\n## Usage\n\nInstall the package:\n```sh\npip install metadata-client\n```\n\nSetup a metadata client:\n```python3\nfrom metadata.ingestion.ometa.ometa_api import OpenMetadata\nfrom metadata.generated.schema.entity.services.connections.metadata.openMetadataConnection import OpenMetadataConnection\nfrom metadata.generated.schema.security.client.openMetadataJWTClientConfig import OpenMetadataJWTClientConfig\n\nserver_config = OpenMetadataConnection(\n hostPort=\"<metadata-server>/api\",\n authProvider=\"openmetadata\",\n securityConfig=OpenMetadataJWTClientConfig(\n jwtToken=\"<your-token>\"\n ),\n)\nclient = OpenMetadata(server_config)\n```\n\nWhen developping in local (only), you may need to accept insecure transport (i.e. http).\nThis is NOT recommanded outside of local development environement, that is requesting `localhost`.\n\n```python3\nimport os\n\nos.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1'\n```\n\n## Quickstart\n\nCreate or update metadata classification:\n```python3\n# Create or update classification\nclassification_request = CreateClassificationRequest(\n name=\"TestClassification\",\n displayName=\"TestClassification-2\",\n description=\"Sample classification: {}\".format(uuid.uuid4()),\n)\n\nclient.create_or_update(classification_request)\n```\n\n## Documentation\n\n- [Service of Assets Management](https://confluence.idgcapital.com/pages/viewpage.action?pageId=50725725)\n- [Service of Data Building](https://confluence.idgcapital.com/pages/viewpage.action?pageId=50725719)\n- [Directory of Data Platform](https://confluence.idgcapital.com/pages/viewpage.action?pageId=46401007)\n\n## Contributing\n\nBefore committing to this repository, you must have [pre-commit](https://pre-commit.com) installed, and install\nthe following pre-commit hooks:\n\n```sh\npre-commit install --install-hooks -t pre-commit -t pre-push\n```\n\n## License\n\nThis project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details\n",
"bugtrack_url": null,
"license": "Apache License 2.0",
"summary": "Ingestion Framework for OpenMetadata",
"version": "1.0.2.0",
"project_urls": {
"Documentation": "https://docs.open-metadata.org/",
"Source": "https://github.com/open-metadata/OpenMetadata"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f80127d297a3f5705c4a6795c037a2979a77df27a91c5346d3ea48cd89de43b0",
"md5": "5a7ab27d67a62b9944c75321efc728b1",
"sha256": "12542bf0f1f67c3503cd2e877fc1f14730732fcdcea0c2b7e7d826affaa6e1a5"
},
"downloads": -1,
"filename": "idg-metadata-client-1.0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "5a7ab27d67a62b9944c75321efc728b1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 575523,
"upload_time": "2023-07-12T01:25:02",
"upload_time_iso_8601": "2023-07-12T01:25:02.007460Z",
"url": "https://files.pythonhosted.org/packages/f8/01/27d297a3f5705c4a6795c037a2979a77df27a91c5346d3ea48cd89de43b0/idg-metadata-client-1.0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-12 01:25:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "open-metadata",
"github_project": "OpenMetadata",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "idg-metadata-client"
}