Skip to main content

Open Data Discovery Models

Project description

Open Data Discovery Models Package

Models

You can use odd pydantic models:

from odd_models.models import DataEntityList

data_entity_list = DataEntityList(data_source_oddrn='/postgresql/host/localhost/databases/opendatadiscovery', items=[])

Adapter's Controller

You can inherit from base Adapter Controller for writing your own adapters:

from odd_models.adapter.controllers import ODDController

class MyController(ODDController):
    def get_data_entities(self, changed_since=None, )
        pass

ODD API Client

You can use ready API Client to send requests:

from odd_models.api_client import ODDApiClient

api_client = ODDApiClient(base_url='http://127.0.0.1:8080')

# using pydantic objects:
from odd_models.models import DataEntityList
data_entity_list = DataEntityList(data_source_oddrn='/postgresql/host/localhost/databases/opendatadiscovery', items=[])

response = api_client.post_data_entity_list(data_entity_list)
assert response.status_code == 200

# using dict (validation will be in the client)
data_entity_list = {'data_source_oddrn': '/postgresql/host/localhost/databases/opendatadiscovery', 'items': []}

response = api_client.post_data_entity_list(data_entity_list)
assert response.status_code == 200

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

odd-models-1.0.9.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

odd_models-1.0.9-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file odd-models-1.0.9.tar.gz.

File metadata

  • Download URL: odd-models-1.0.9.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.1 Linux/5.11.0-1020-azure

File hashes

Hashes for odd-models-1.0.9.tar.gz
Algorithm Hash digest
SHA256 a6be795ba3080a1953db5edcff0b2ea8a59ce9296ad3b95f05677fc959a9844a
MD5 ecbe2b69b62eb1fc45d5be4995bb4864
BLAKE2b-256 0302b352137478e7630dfcdae050143cae9dc8fa4e5405b8285e99eecdf3f1ea

See more details on using hashes here.

File details

Details for the file odd_models-1.0.9-py3-none-any.whl.

File metadata

  • Download URL: odd_models-1.0.9-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.1 Linux/5.11.0-1020-azure

File hashes

Hashes for odd_models-1.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 b785a9a6e4a3f3036490fe513e8b00f5a6caecd28fb1afe8a3d8ffec5f96924d
MD5 57cb6ba48abc6d9299474591b0afeb8f
BLAKE2b-256 237cf1e7176d8639b1ae5fbff7e5930cb03e1155aadf1b7c5d2cd4c7ea6ffd15

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page