Skip to main content

Request and data manager for interfacing with the UDL

Project description

DewDL

DewDL is intended to enable quick access to products from the Unified Data Library.

Getting Started

DewDL can be used by explicitly passing credentials into functions found in dewdl.requests._udl_request; however, the preferred method is to store credents via the config interface to avoid accidental distribution of passwords. Follow the steps below to store your credentials in a dewdl.json config file:

Option 1 - Username and Password

NOTE:

You can add your password using quotations to avoid parsing issues in the terminal

dewdl config user <your-user>
dewdl config password <your-password>

Option 2 - NPE Certificates

dewdl config crt /path/to/crt/file
dewdl config key /path/to/key/file

Review Config Contents

The config file path and contents can be shown at anytime with the following command:

dewdl config show

Making Requests to the UDL

>>> from datetime import datetime
>>> from dewdl.enums import UDLEnvironment, UDLQueryType
>>> from dewdl.requests import UDLRequest

# Define an endpoint to get elsets after Sep 16, 2024
>>> elset_query = UDLQuery(UDLQueryType.ELSET, UDLEnvironment.PROD).after(datetime(2024, 9, 16))

# Make the request
>>> response = UDLRequest.get(elset_query)

# Use the response data as a list
>>> elset_list = response.json()

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

dewdl-0.2.0.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

dewdl-0.2.0-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

Details for the file dewdl-0.2.0.tar.gz.

File metadata

  • Download URL: dewdl-0.2.0.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for dewdl-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9e8ec543097a11b0c6df40a20715ba84cb9ebf7ddf3153c0b43693d14ca98f4f
MD5 0a2e4b210740b2f7217f2df9d3980e0f
BLAKE2b-256 18a44148fd66716031f2ff5e2114b15f14d401169188b8595f8455f8a3792598

See more details on using hashes here.

Provenance

File details

Details for the file dewdl-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: dewdl-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 14.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for dewdl-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 58ab1c8913d8231379a26f0973045d4bb95c90292d8f4a6ee405489e32dbea6d
MD5 56011a4c0c3ee8efafeac44b8e53a500
BLAKE2b-256 5ca1fb7e94898b89e8994332e523eb5de703556ca6298340f43e777e08ef7156

See more details on using hashes here.

Provenance

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