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

Uploaded Source

Built Distribution

dewdl-0.2.2-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dewdl-0.2.2.tar.gz
  • Upload date:
  • Size: 10.8 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.2.tar.gz
Algorithm Hash digest
SHA256 c77bc6de979c61927f31e6220ea08bf64474b416c85496027116654ff2c00d27
MD5 91996bb54f5f161aa0b193de39d53bc7
BLAKE2b-256 6c851ddc6e0c14b16437d483b03c4354130c54ff1459123e37e2facb2a6993d1

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: dewdl-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 13.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 71aa97afe92fea1f859161084a287eebe55c66f7fbb74960446ca9100614251e
MD5 60fb4a553017b4c574e429ff2bb66a83
BLAKE2b-256 67caed94dfe63cf46d2924078d9356471f2e13016809b6208c7602b4ef596c79

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