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
Release history Release notifications | RSS feed
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.11.tar.gz
(10.8 kB
view details)
Built Distribution
File details
Details for the file odd-models-1.0.11.tar.gz
.
File metadata
- Download URL: odd-models-1.0.11.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-1021-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04472bc2fb599c18badab2cfe122d22f25cd6d6d864d094189e3beb803fed03f |
|
MD5 | 2e814986e6a7ca087d06c36f263cfa64 |
|
BLAKE2b-256 | 0d9032f2c79e3d69c84804f2078f603822d8dd36aa045a0f166bcf1f31baeed8 |
File details
Details for the file odd_models-1.0.11-py3-none-any.whl
.
File metadata
- Download URL: odd_models-1.0.11-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-1021-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4a73fc808ff06a44fc89a69a846107d998df83878f0c94acd41cff2303c4c8b |
|
MD5 | 84bf8563cbacc052127f6b075a17dc68 |
|
BLAKE2b-256 | 09f3eccccb400974d191a1479851a728df7bd46af9698595c2a30342481106a7 |