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)
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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
File details
Details for the file odsl-1.0.20.tar.gz.
File metadata
- Download URL: odsl-1.0.20.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ede7b609a773fc7f8b51efbf2bf3b97bbf9296023995c56bf5363110c1cd9c3
|
|
| MD5 |
5582f72c9a9d98f91fbc1dd76330f9dd
|
|
| BLAKE2b-256 |
3389d32afeb85d4db18f4e8b6d3ef1d9d09f7b8200af7a55c43436267ffdcd27
|
Provenance
The following attestation bundles were made for odsl-1.0.20.tar.gz:
Publisher:
python-publish.yml on OpenDataDSL/odsl-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
odsl-1.0.20.tar.gz -
Subject digest:
1ede7b609a773fc7f8b51efbf2bf3b97bbf9296023995c56bf5363110c1cd9c3 - Sigstore transparency entry: 2531789332
- Sigstore integration time:
-
Permalink:
OpenDataDSL/odsl-python-sdk@90f495a6c11a80510dc482d38d4f70c3af3a5320 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/OpenDataDSL
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@90f495a6c11a80510dc482d38d4f70c3af3a5320 -
Trigger Event:
push
-
Statement type:
File details
Details for the file odsl-1.0.20-py3-none-any.whl.
File metadata
- Download URL: odsl-1.0.20-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
676ac427fc511eeba89ad9f1f035b040d4464a1528e630a88226e24847a3ad5b
|
|
| MD5 |
4c4972caa2806e46df45ae051ef9e33f
|
|
| BLAKE2b-256 |
0700f3770754bbd80a5e42c919622ae77a117ccdc7e4115df75b34e5d674ae6d
|
Provenance
The following attestation bundles were made for odsl-1.0.20-py3-none-any.whl:
Publisher:
python-publish.yml on OpenDataDSL/odsl-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
odsl-1.0.20-py3-none-any.whl -
Subject digest:
676ac427fc511eeba89ad9f1f035b040d4464a1528e630a88226e24847a3ad5b - Sigstore transparency entry: 2531789495
- Sigstore integration time:
-
Permalink:
OpenDataDSL/odsl-python-sdk@90f495a6c11a80510dc482d38d4f70c3af3a5320 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/OpenDataDSL
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@90f495a6c11a80510dc482d38d4f70c3af3a5320 -
Trigger Event:
push
-
Statement type: