Python API example for creating data contract and schema assertions

Original Slack Thread

Hell All. IS there any example using Python API in order to create simple datacontract? No matter what I do, seams my assertion have something wrong. Is there any example of Schema/Freshness/DataQuality assertions for data contract available out there?

<@UV14447EU> Any idea on this?

<@U068BTAMLJJ> wed don’t really have much documentation but maybe this test can help to give you some idea ->
https://github.com/datahub-project/datahub/blob/1ce752ed6e825c12ad373cd4063083b95c252a56/metadata-ingestion/tests/unit/api/entities/datacontract/test_data_quality_assertion.py|https://github.com/datahub-project/datahub/blob/1ce752ed6e825c12ad373cd4063083b95c[…]s/unit/api/entities/datacontract/test_data_quality_assertion.py
and here you can find the api ->
https://github.com/datahub-project/datahub/tree/1ce752ed6e825c12ad373cd4063083b95c252a56/metadata-ingestion/src/datahub/api/entities/datacontract

How is your code looks like?

thanks! I will take a look.