Metadata-Version: 2.4
Name: edc-client
Version: 1.1.0
Summary: Python client for the EDC (Eclipse Dataspace Connector) management-api
Author: Enno Mueller
License: Apache-2.0
Project-URL: Homepage, https://github.com/CIR4FUN-EU/edc-client
Project-URL: Repository, https://github.com/CIR4FUN-EU/edc-client
Project-URL: Issues, https://github.com/CIR4FUN-EU/edc-client/issues
Keywords: OpenAPI,OpenAPI-Generator,EDC,management-api,dataspace
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: urllib3<3.0.0,>=2.5.0
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: pydantic>=2.11
Requires-Dist: typing-extensions>=4.7.1

# edc-client
REST API documentation for the management-api

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 4.1.0
- Package version: 1.0.0
- Generator version: 7.23.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.

Python 3.10+

## Installation & Usage
### pip install

```sh
pip install edc-client
```

Then import the package:
```python
import edc_client
```

### Minimal usage

```python
from edc_client.connector import Connector

# one object per connector; the first argument is the type
provider = Connector("samples", PROVIDER_MGMT_URL, PROVIDER_ID, PROVIDER_DSP_URL)
consumer = Connector("samples", CONSUMER_MGMT_URL, CONSUMER_ID, CONSUMER_DSP_URL)

# provider: offer some data
provider.create_asset("asset-1", "https://jsonplaceholder.typicode.com/users")
provider.create_policy("policy-1")
provider.create_contract_definition("contract-def-1", "policy-1", "policy-1")

# consumer: negotiate, transfer and fetch it in one call
response = consumer.negotiate_and_transfer(provider, "asset-1")
print(response.json())
```

### Tests

Execute `pytest` to run the tests.

## Reference

- **[Runnable examples](https://github.com/CIR4FUN-EU/edc-client/blob/main/examples/README.md)** — end-to-end flow and per-step
  scripts for negotiation and transfer (the hand-written usage of this client).
- **[API & model reference](https://github.com/CIR4FUN-EU/edc-client/blob/main/docs/API_REFERENCE.md)** — full index of endpoint
  classes and request/response models.

