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.10.tar.gz
(10.7 kB
view details)
Built Distribution
File details
Details for the file odd-models-1.0.10.tar.gz
.
File metadata
- Download URL: odd-models-1.0.10.tar.gz
- Upload date:
- Size: 10.7 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 | fffe4ae40b1e8e88b7b36861a762a986b71803777ea10d7503f19656f64ab7a9 |
|
MD5 | ff65287b14853b92336a1b2cd9c95840 |
|
BLAKE2b-256 | c1dcb42176587e930b1f90b3ebc7fd78cbccb4e3d58478be605ee175a6913fd1 |
File details
Details for the file odd_models-1.0.10-py3-none-any.whl
.
File metadata
- Download URL: odd_models-1.0.10-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 | 27a91f5cf67ea5209a691403a546a6c3a870357692f68faac1828365a53c19fd |
|
MD5 | fbd176dc3685fdafaf087f9de6fe38fa |
|
BLAKE2b-256 | e2f9651fcc5d441fc126d8ad911e4124f8dff210b8df2d1031e6cd2f0f2193a0 |