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.16.tar.gz
(10.9 kB
view details)
Built Distribution
File details
Details for the file odd-models-1.0.16.tar.gz
.
File metadata
- Download URL: odd-models-1.0.16.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.1 Linux/5.11.0-1028-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25476421db4de652bc4438b31a40d7212ac97b53a2d0b2b25219341d9d19edf4 |
|
MD5 | 01c7ec050bd20ede98d3810b513afb52 |
|
BLAKE2b-256 | 89473c6da40db7d60510c7d1fe27970297176e2103e3f5cb1a134206982b3e7a |
File details
Details for the file odd_models-1.0.16-py3-none-any.whl
.
File metadata
- Download URL: odd_models-1.0.16-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-1028-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f67a034715a922644578a534ebd077662ad5b7b1aa73026ae577dc53a4cdc711 |
|
MD5 | 4b95573f48b237445baecd09b33157b1 |
|
BLAKE2b-256 | 7abda347a7d676fd864eed7f2bb755d7aa0b52101cb3a54976b90b985abc1c2b |