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
Built Distribution
File details
Details for the file dewdl-0.1.2.tar.gz
.
File metadata
- Download URL: dewdl-0.1.2.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c3924d61343f7b3f282076f59884d00596e73f657ecbcc732b14b0e7760871c |
|
MD5 | ca5baca34a535f78f1717771bb366b03 |
|
BLAKE2b-256 | cd9c3ace922ad3b3fe5a88e8cbabcd7b1fe4f7b00c3fb483d54aca669be76aa3 |
Provenance
File details
Details for the file dewdl-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: dewdl-0.1.2-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0479c697d7728515f62dff1cb507bb9f02b3e7180ae43ba974eb1dd6946266d7 |
|
MD5 | 58399277fcf863c6dc23f59e580b1030 |
|
BLAKE2b-256 | 56017b8145b5cbe19725e78971e1685d27817cd31216d0d24cafcbb587895161 |