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

Uploaded Source

Built Distribution

dewdl-0.2.4-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dewdl-0.2.4.tar.gz
  • Upload date:
  • Size: 10.9 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.4.tar.gz
Algorithm Hash digest
SHA256 f61fad710a1b286251db02c12875c407f245eb730ce363ba0739c773ee2eb732
MD5 8c53e7d670b0f7b864bfe568f8d1c2da
BLAKE2b-256 a1703af4cdc3e62d6640e9a2618c0a32af2c6a9fac412156ea7853ae40c1f04e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dewdl-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 13.7 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 07c23f7650ed33361c15ab6bed3a2082b7912000b084d26a6fcb99194ba4bc09
MD5 bf6ffbc9a8fe864dabb63f9912deaaf2
BLAKE2b-256 b9b8a86beb2922f54798caab045449faa24a8d6cfb66529cc5f1632d3f6fa216

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