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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: odsl-1.0.8.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.8.tar.gz
Algorithm Hash digest
SHA256 b865a5e24f12551a6f97e9a45005fe9e3ca30e7cf7eede61fe5d338f3bc38fd5
MD5 9cca309cc3396f241b11825f166f5173
BLAKE2b-256 58089ec72695784e3745a7bf19b0f6e74f09449168d08506be5ea288db17da6f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: odsl-1.0.8-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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 f0be528e0917a860552ccfa10b1777fa9c4ff97bcd84091b480738d375d2b86f
MD5 7d4b27fdbb425441813fb86453e5b4c9
BLAKE2b-256 8dc170d611602b2d537c06b6dfa9a5b858a6dab28c4f8a1f426859e75d9fb638

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