semvec/pypi-packages huggingface dataset:
datacontract-specification 1.2.3
The Pydantic Model of the Data Contract Specification
Requires Python: >=3.10

# Data Contract Specification (Python)

The pip module `datacontract-specification` to read and write YAML files using the [Data Contract Specification](https://datacontract.com). The pip module was extracted from the [Data Contract CLI](https://github.com/datacontract/datacontract-cli), which is its primary user.

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

## Version Mapping

| Data Contract Specification Version | Pip Module Version |
|-------------------------------------|--------------------|
| 1.2.0                               | >=1.2.0            |
| 1.1.0                               | >=1.1.0            |

**Note**: We mirror major and minor version from the Data Contract Specification to the pip module, but not the patch version!

## Installation

```bash
pip install datacontract-specification
```

## Usage

```python
from datacontract_specification.model import DataContractSpecification

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

```python
from datacontract_specification.model import DataContractSpecification

# Load a data contract specification from a string
data_contract_str = """
dataContractSpecification: 1.2.0
id: urn:datacontract:checkout:orders-latest
info:
  title: Orders Latest
  version: 2.0.0
  description: |
    Successful customer orders in the webshop.
    All orders since 2020-01-01.
    Orders with their line items are in their current state (no history included).
  owner: Checkout Team
  status: active
  contact:
    name: John Doe (Data Product Owner)
    url: https://teams.microsoft.com/l/channel/example/checkout
"""
data_contract = DataContractSpecification.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](https://github.com/datacontract/datacontract-specification-python/releases), [PyPi](https://test.pypi.org/project/datacontract-specification/) and [PyPi (test)](https://test.pypi.org/project/datacontract-specification/)
curl-session 0.1.18
Initialize from a curl command string and get equivalent requests.Session and httpx.Client objects
Requires Python: >=3.8

# CurlSession
```
pip install curl-session
```

Initialize from a curl command string and get equivalent `requests.Session` and `httpx.Client` objects with the same headers, cookies, proxies, TLS options, and redirect/http2 behavior.

## Usage

```python
from curl_session import CurlSession

curl = 'curl -H "Accept: application/json" -b "a=1; b=2" https://example.com/api'
cs = CurlSession(curl)

# httpx
with cs.get_httpx_client() as client:
    r = client.get(cs._parsed.url)  # provide a URL as in original curl if needed
    print(r.text)

# requests
with cs.get_requests_session() as s:
    r = s.get(cs._parsed.url)
    print(r.text)

# run original curl
cp = cs.run()
print(cp.stdout)
```

## MultiCurl Usage

Use `MultiCurl` to parse and execute multiple cURL commands from a string, with optional filtering and delays.

```python
from curl_session import multi_curl

curl_commands = """
curl 'https://example.com/api1'
curl 'https://example.com/api2' -H 'Authorization: Bearer token'
"""

mc = multi_curl.MultiCurl(curl_commands)
results = mc.run(delay=1.0, url_filter='api1')  # Run with 1s delay, filter by URL substring

for curl in results:
    print(f"URL: {curl.url}, Status: {curl.status_code}, Response: {curl.response}")
```

## Tests

- Install deps

```sh
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pytest -q
```

## Build and Deploy to PyPI

run release.sh

## Notes

- This is a pragmatic parser covering common curl flags for headers, cookies, data, proxies, TLS, auth, redirect, and http2 options.
- If `--cookie` is a filename, it's ignored for safety. Provide explicit cookie strings instead.
- Timeouts and other runtime-only flags are intentionally not persisted to the session defaults.
mpylab 0.9.5
A framework to simplify development of measurement 'scripts' for measurements in laboratories over e.g pyvisa.
Requires Python: >=3.8
Keywords: pyvisa, gpib, measurements, laboratory

# mpylab

This is **mpylab**. Mpylab is a framework for automatic measurement application and 
hardware device drivers (TCP/IP, GPIB, serial, USB).

This software is distributed unter GPL-3 or higher. See LICENCE for details.

## Installation

```
pip3 install mpylab
```

## License

GPL-3 or higher

## Repository

[https://github.com/hgkdd/Mpy](https://github.com/hgkdd/Mpy)

## Contact

Prof. Dr. Hans Georg Krauthäuser (hgk@ieee.org)  
Chair for Electromagnetic Theory and Compatibility  
Technische Universität Dresden, Dresden, Germany