Skip to main content

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 list command
  • Retrieve any data using the get command
  • Update any data (if you have permission) using the update command

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)

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


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.9.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

odsl-1.0.9-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file odsl-1.0.9.tar.gz.

File metadata

  • Download URL: odsl-1.0.9.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.1

File hashes

Hashes for odsl-1.0.9.tar.gz
Algorithm Hash digest
SHA256 02cabad051201ac701a3f977a9e76c5449bfb87965b6eaad1bce6ba9ed2a5708
MD5 39bd1400b243e3f101e1a641a3a543b7
BLAKE2b-256 bc7f9c9f29577c1fcdd90fa1181a7ac4208d2b531f8a8b5e6d3640d9c423382b

See more details on using hashes here.

File details

Details for the file odsl-1.0.9-py3-none-any.whl.

File metadata

  • Download URL: odsl-1.0.9-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.1

File hashes

Hashes for odsl-1.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 f7b80127f97c8a911c6722daa0c44f2188f50351b97d2a3212b73ecbe53e76db
MD5 d47658f8fbc03d2c34054513c2555c8a
BLAKE2b-256 e1abb9ce97e7d93281ea0abcaf9cc0ac80bffe3f841deae10327d741835b8cfc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page