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.15.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

odd_models-1.0.15-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: odd-models-1.0.15.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-1027-azure

File hashes

Hashes for odd-models-1.0.15.tar.gz
Algorithm Hash digest
SHA256 3b118fff26f6b5a7b51f710e7f75d1541b0eb9b17b66f9a9f1c06960b4c834ae
MD5 2e318321c98190f2710645425a4c8302
BLAKE2b-256 a92883c96a787719b4df017b6ceea3a3395cb0cd92b54b9d1491e58678916b80

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for odd_models-1.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 1cab762531024ba4b619dca3ebc61c92fc70e208d828634004bd890c21de6b93
MD5 a26aa2d32c981e7c053bc653e1f50068
BLAKE2b-256 ff6aef983a4fcefb4ef1db709d547683d58d5f1ecfa8aa7ee5a4db6610aed59b

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