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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: dewdl-0.2.3.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.3.tar.gz
Algorithm Hash digest
SHA256 1a91c456af382702407c449b89089ccecaa5da47ade9e72239303c77ed55728b
MD5 e47ed86a64ff9dcf131c4e798f29e20e
BLAKE2b-256 8474172b148fe16f3c26d44794aad5ca9b009d34083a4991b68bd1091daceddd

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: dewdl-0.2.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1e77d08bee0635aff4f8cb1d84717af8e4b476a35be7f1bc1e9a85ff30a480d4
MD5 79e86f60a303823030004d7c398c85ab
BLAKE2b-256 a0e09884b95389ab43f2577168e8c82e74cb96a77de853dec2421fece8f063ef

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