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.4.tar.gz
(9.5 kB
view hashes)
Built Distribution
odd_models-1.0.4-py3-none-any.whl
(13.2 kB
view hashes)
Close
Hashes for odd_models-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c294374246b661dc1208f5850201777f674d3e08fc72e23921a6cefd5f9c9741 |
|
MD5 | 35211ca827a674eb2f402a4d966b92f3 |
|
BLAKE2b-256 | 76af8974cc2170d2c5af2415e45a87c97f1a34a94fa25040d404a2436a2269d3 |