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.22.tar.gz
(11.0 kB
view details)
Built Distribution
File details
Details for the file odd-models-1.0.22.tar.gz
.
File metadata
- Download URL: odd-models-1.0.22.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.1 Linux/5.13.0-1022-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdd6ad0fe1f8147abc5ff7275e7eab68cb710d640cbee4fd4b2c00905d7128da |
|
MD5 | 1ca944d8b2c4ec5feb84821628422c11 |
|
BLAKE2b-256 | dda522607f53032b9e0c4d66e6545a7b5361cd98b7b5990afe71b8f40d593248 |
File details
Details for the file odd_models-1.0.22-py3-none-any.whl
.
File metadata
- Download URL: odd_models-1.0.22-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.1 Linux/5.13.0-1022-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d870ec5f7a44498bbaa4479c0f5660a8b6455a44f898c3ce3f508a78ec6e65a8 |
|
MD5 | 24c4d5bae6d9140c447f45e9c695b14d |
|
BLAKE2b-256 | 6cec0041af0a6ac0d84b41400e6a9c8f222095713ba5eb488a1fdf05127cac21 |