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

Uploaded Source

Built Distribution

dewdl-0.2.1-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dewdl-0.2.1.tar.gz
  • Upload date:
  • Size: 10.5 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.1.tar.gz
Algorithm Hash digest
SHA256 d05f70e28d492eb55963e77a712ec4e8b67550ab2d882af24688f50408158273
MD5 1b7fba4ddc4a3a1d9743877206cbb6e2
BLAKE2b-256 cb43e4af9bd245ca69c29b52a827f776e2291ecf6a387622bd887268fea604de

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: dewdl-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 13.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fa995b7db5d6e704a763b3de919f02a7388577a59f4e22ac4bc428baf9d6e48f
MD5 863f7b39e58a01d3e0df66903bbcf603
BLAKE2b-256 6a33d9fcab9779c8422a277686110d5867056bc0bbe70fe2ed380e5eaf6771d6

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