New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

python-cmr

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

python-cmr - pypi Package Compare versions

Comparing version
0.8.0
to
0.9.0
+46
-0
cmr/queries.py

@@ -676,2 +676,48 @@ """

def sort_key(self, sort_key=""):
"""
See
https://cmr.earthdata.nasa.gov/search/site/docs/search/api.html#sorting-granule-results
for valid granule sort_keys
Filter some defined sort_key;
use negative (-) for start_date and end_date to sort by ascending
:param sort_key: name of the sort key
:returns: Query instance
"""
valid_sort_keys = [
'campaign',
'entry_title',
'dataset_id',
'data_size',
'end_date',
'-end_date'
'granule_ur',
'producer_granule_id'
'project',
'provider',
'readable_granule_name',
'short_name',
'-start_date',
'start_date',
'version',
'platform',
'instrument',
'sensor',
'day_night_flag',
'online_only',
'browsable',
'browse_only',
'cloud_cover',
'revision_date']
# also covers if empty string
if sort_key not in valid_sort_keys:
raise ValueError("Please provide a valid sort_key for granules query see https://cmr.earthdata.nasa.gov/search/site/docs/search/api.html#sorting-granule-results for valid sort_keys")
self.params['sort_key'] = sort_key
return self
def granule_ur(self, granule_ur=""):

@@ -678,0 +724,0 @@ """

+7
-3
Metadata-Version: 2.1
Name: python-cmr
Version: 0.8.0
Version: 0.9.0
Summary: Python wrapper to the NASA Common Metadata Repository (CMR) API.

@@ -80,3 +80,3 @@ Home-page: https://github.com/nasa/python_cmr

The following methods are available to both collecton and granule queries:
The following methods are available to both collection and granule queries:

@@ -145,2 +145,6 @@ # search for granules matching a specific product/short_name

# filter by a sort_key note: sort_keys are require some other fields to find some existing granules before they can be sorted
>>> api.parameters(short_name="OMNO2", version="003", provider='GES_DISC', sort_key='-start_date')
Collection searches support these methods (in addition to the shared methods above):

@@ -221,3 +225,3 @@

To inspect and retreive results from the API, the following methods are available:
To inspect and retrieve results from the API, the following methods are available:

@@ -224,0 +228,0 @@ # inspect the number of results the query will return without downloading the results

[tool.poetry]
name = "python-cmr"
version = "0.8.0"
version = "0.9.0"
description = "Python wrapper to the NASA Common Metadata Repository (CMR) API."

@@ -5,0 +5,0 @@ authors = ["python_cmr <nasa/python_cmr@github.com>"]

@@ -60,3 +60,3 @@ This repository is a copy

The following methods are available to both collecton and granule queries:
The following methods are available to both collection and granule queries:

@@ -125,2 +125,6 @@ # search for granules matching a specific product/short_name

# filter by a sort_key note: sort_keys are require some other fields to find some existing granules before they can be sorted
>>> api.parameters(short_name="OMNO2", version="003", provider='GES_DISC', sort_key='-start_date')
Collection searches support these methods (in addition to the shared methods above):

@@ -201,3 +205,3 @@

To inspect and retreive results from the API, the following methods are available:
To inspect and retrieve results from the API, the following methods are available:

@@ -204,0 +208,0 @@ # inspect the number of results the query will return without downloading the results