Python SDK for OpenDataDSL
Project description
ODSL Python SDK
The python SDK for the OpenDataDSL data management platform
Installation
You can install the ODSL Python SDK from PyPI:
python -m pip install odsl
About
This python SDK for OpenDataDSL has the following features:
- Find any data in OpenDataDSL using the
listcommand - Retrieve any data using the
getcommand - Update any data (if you have permission) using the
updatecommand
Check out our demo repository for examples of real-world usage.
Usage
Logging in and getting started
from odsl import sdk
odsl = sdk.ODSL()
odsl.login()
Logging in using a secret
from odsl import sdk
odsl = sdk.ODSL()
odsl.loginWithSecret(tenantId, clientId, secret)
Logging in using an API Key
from odsl import sdk
odsl = sdk.ODSL()
odsl.loginWithAPIKey(userid, apikey)
Finding master data
objects = odsl.list('object', source='public', params={'source':'ECB'})
print(objects[0])
Getting master data
obj = odsl.get('object', 'public', '#ECB')
print(obj['description'])
Getting a timeseries
ts = odsl.get('data', 'public', '#ABN_FX.EURUSD:SPOT', {'_range':'from(2024-07-01)'})
print(ts)
Getting a forward curve
id = '#AEMO.EL.AU.NEM.NSW1.FORECAST:DEMAND:2024-07-15'
curve = odsl.get('data', 'public', id)
for c in curve['contracts']:
print(c['tenor'] + " - " + str(c['value']))
Updating some private master data
var = {
'_id': 'AAA.PYTHON',
'name': 'Python Example'
}
odsl.update('object', 'private', var)
Reading and updating some private master data
po = odsl.get('object', 'private', 'AAA.PYTHON')
po['description'] = 'Updated from Python'
odsl.update('object', 'private', po)
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
odsl-1.0.15.tar.gz
(13.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
odsl-1.0.15-py3-none-any.whl
(13.0 kB
view details)
File details
Details for the file odsl-1.0.15.tar.gz.
File metadata
- Download URL: odsl-1.0.15.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
655d7f6ee5ea7139edb771dab9279635b2c4e873008eac3e2b9ccae18e804024
|
|
| MD5 |
1d0ec3b30e085423ac2885afaa34230c
|
|
| BLAKE2b-256 |
80f3db58ce54ac7dc579cc13445e25dd1a7f6db4bff1327e7fc88ca4d67a8437
|
File details
Details for the file odsl-1.0.15-py3-none-any.whl.
File metadata
- Download URL: odsl-1.0.15-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f169491e67fcf713d30042b110e8a0c3c20849a13382ab81b322e43ee485857
|
|
| MD5 |
1517b631d1f0fb1ca4daac851d2c096b
|
|
| BLAKE2b-256 |
361c14b45e2c038ea9afc188206a806de543a51bb9f3d669d99c20b897562cfc
|