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-2.0.0.tar.gz
(4.7 kB
view details)
Built Distribution
File details
Details for the file odd-models-2.0.0.tar.gz
.
File metadata
- Download URL: odd-models-2.0.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.1 Linux/5.10.104-linuxkit
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 567928d20fb84b183baf1ed45ca23ed9b88940c03812b6e4355c951ae5611c12 |
|
MD5 | 001cb60465b21bca4acccfd34281e614 |
|
BLAKE2b-256 | d1f32553fc56538db2644314eb73271e5f58a9ce6aaf0dc6dd18d97612575d9a |
File details
Details for the file odd_models-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: odd_models-2.0.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.1 Linux/5.10.104-linuxkit
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0eb27d8f3f2ec44e8e07486912dddccb0ae1e791967d9a7692df759796070f8 |
|
MD5 | 52550097cebd2c3bd9a58fba59fe1ee2 |
|
BLAKE2b-256 | 621f365a3fe359944a3bbcb9394e616e5e06bf3f02e396e81ac776477de76797 |