Skip to main content

Python client

API version: 0.1.0

Requirements

Installation & Usage

  1. If you don't have Poetry installed run:
pip install poetry
  1. Install dependencies:
poetry config virtualenvs.in-project true
poetry install --no-root
  1. Running tests:
poetry run pytest

You can test the application for multiple versions of Python. To do this, you need to install the required Python versions on your operating system, specify these versions in the tox.ini file, and then run the tests:

poetry run tox

Add the tox.ini file to client/.openapi-generator-ignore so that it doesn't get overwritten during client generation.

  1. Building package:
poetry build
  1. Publishing
poetry config pypi-token.pypi <pypi token>
poetry publish

Client generator

To generate the client, execute the following script from the project root folder

poetry --directory server run python ./tools/client_generator/generate.py ./api/openapi.yaml

Command

generate.py <file> [--asyncio]

Arguments

file Specifies the input OpenAPI specification file path or URL. This argument is required for generating the Python client. The input file can be either a local file path or a URL pointing to the OpenAPI schema.

--asyncio Flag to indicate whether to generate asynchronous code. If this flag is provided, the generated Python client will include asynchronous features. By default, synchronous code is generated.

Configuration

You can change the name of the client package in the file /tools/client_generator/config.json.

Add file's paths to client/.openapi-generator-ignore so that it doesn't get overwritten during client generation.

Examples

python generate.py https://<domain>/openapi.json
python generate.py https://<domain>/openapi.json --asyncio
python generate.py /<path>/openapi.yaml
python generate.py /<path>/openapi.yaml --asyncio

Getting Started

Please follow the installation procedure and then run the following:

import ds_connector_service
from ds_connector_service.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = ds_connector_service.Configuration(
    host = "http://localhost"
)



# Enter a context with an instance of the API client
with ds_connector_service.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ds_connector_service.ContractsApi(api_client)
    body = None # object | 

    try:
        # Validate Contract
        api_response = api_instance.validate_contract(body)
        print("The response of ContractsApi->validate_contract:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling ContractsApi->validate_contract: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
ContractsApi validate_contract POST /contracts/validate Validate Contract
DataProductsApi create_data_product POST /data-products/ Create Data Product
DataProductsApi delete_data_product DELETE /data-products/{connector_id}/{data_product_id}/ Delete Data Product
DataProductsApi get_data_product GET /data-products/{connector_id}/{data_product_id}/ Get Data Product
DataProductsApi get_data_product_content GET /data-products/{connector_id}/{data_product_id}/content Get Data Product Content
DataProductsApi list_data_products GET /data-products/ List Data Products
HealthApi health_check GET /health-check/ Health Check
MonitoringApi get_metrics GET /metrics Metrics
TransactionsApi log_transaction POST /transactions/ Log Transaction

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Author

all-hiro@hiro-microdatacenters.nl

Metadata

Release files for ds-connector-client 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ds-connector-client 0.1.0
File Size Uploaded Provenance Actions
ds_connector_client-0.1.0.tar.gz 25.4 kB Without provenance Details for ds_connector_client-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ds-connector-client 0.1.0
File Interpreter ABI Platform Actions
ds_connector_client-0.1.0-py3-none-any.whl Python 3 none any Details for ds_connector_client-0.1.0-py3-none-any.whl

Total release size: 74.9 kB

Release files / ds_connector_client-0.1.0.tar.gz

Download URL ds_connector_client-0.1.0.tar.gz
Size 25.4 kB
Tags Source
SHA-256 checksum
How to use checksums
60a8586ce5b90e013e1b1b278df77f452b7bcc6c793421aa338508eccbeeb9cf
BLAKE2b-256 checksum
How to use checksums
7851ab415d9b5ae91c4d04faf1a6713a9b8713ba119359094622be0ae051b143
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.2 CPython/3.11.5 Windows/10

Release files / ds_connector_client-0.1.0-py3-none-any.whl

Download URL ds_connector_client-0.1.0-py3-none-any.whl
Size 49.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3966f9abdc25263af313ba33256339e2098c1c6ce254be39f893ae0ca3ec11aa
BLAKE2b-256 checksum
How to use checksums
5d3637fd86cc1b4b84c3852425a737405b03c01a04cf4ce165ef929c391793ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.2 CPython/3.11.5 Windows/10

Security for ds-connector-client 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page