🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

open-data-contract-standard

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

open-data-contract-standard

The Pydantic Model of the Open Data Contract Standard

3.0.3
PyPI
Maintainers
1

Open Data Contract Standard (Python)

The pip module open-data-contract-standard to read and write YAML files using the Open Data Contract Standard. The pip module was extracted from the Data Contract CLI, which is its primary user.

The version number of the pip module corresponds to the version of the Open Data Contract Standard it supports.

Version Mapping

Open Data Contract Standard VersionPip Module Version
3.0.1>=3.0.1

Note: We mirror major and minor version from the ODCS to the pip module, but not the patch version!

Installation

pip install open-data-contract-standard

Usage

from open_data_contract_standard.model import OpenDataContractStandard

# Load a data contract specification from a file
data_contract = OpenDataContractStandard.from_file('path/to/your/data_contract.yaml')
# Print the data contract specification as a YAML string
print(data_contract.to_yaml())
from open_data_contract_standard.model import OpenDataContractStandard

# Load a data contract specification from a string
data_contract_str = """
version: 1.0.0
kind: DataContract
id: 53581432-6c55-4ba2-a65f-72344a91553b
status: active
name: my_table
dataProduct: my_quantum
apiVersion: v3.0.1
"""
data_contract = OpenDataContractStandard.from_string(data_contract_str)
# Print the data contract specification as a YAML string
print(data_contract.to_yaml())

Development

uv sync --all-extras

Release

  • Change version number in pyproject.toml
  • Run ./release in your command line
  • Wait for the releases on GitHub, PyPi and PyPi (test)

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts