Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

adamapi

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adamapi - npm Package Compare versions

Comparing version
2.0.10
to
2.0.11
+20
-4
adamapi.egg-info/PKG-INFO
Metadata-Version: 2.1
Name: adamapi
Version: 2.0.10
Version: 2.0.11
Summary: Python Adam API

@@ -14,3 +14,3 @@ Home-page: https://git.services.meeo.it/das/adamapi

1. adamapi==1.0.1 , This package works only with ADAMCORE 1.
2. adamapi==2.0.10, This pachage works only with ADAMCORE 2.
2. adamapi==2.0.11, This pachage works only with ADAMCORE 2.

@@ -151,3 +151,3 @@ ## Requirements

* **.getDatasets()** --> To retrieve datasets list and metadata<br>
* **.getDatasets()** --> To retrieve datasets list <br>
Parameters:

@@ -210,2 +210,3 @@

| endDate | False | str or [datetime](https://docs.python.org/3/library/datetime.html) | | the end date |
| geometry | True | str or geojson | | GeoJson geometry,[geojson format](https://tools.ietf.org/html/rfc7946) [appendix](#geometry)|

@@ -261,3 +262,3 @@

| 3 | False | boolean | False | asyncronous management for subset and timeseries order |
| geometry | True | str or geojson | | GeoJson geometry, if the geometry is a Point the api return a timeseries |
| geometry | True | str or geojson | | GeoJson geometry, if the geometry is a Point the api return a timeseries,[geojson format](https://tools.ietf.org/html/rfc7946) [appendix](#geometry)|
| outputFname | False | str | "adamapiresults/datasetId" | absolute filename without extension. If not set, the retrived product is saved in "adamapiresults/datasetId" |

@@ -292,3 +293,18 @@

## Appendix
### Geometry
```python
#This geometry will return all the results it has intersected within it
geometry = { "type": "Polygon", "coordinates": [ [ [ 43.916666667, 15.716666667 ], [ 43.916666667, 15.416666667 ] , [ 44.216666667, 15.416666667 ], [ 44.216666667, 15.716666667 ], [ 43.916666667, 15.716666667 ] ] ] }
```
```python
#This geometry will return all the results it has intersected on its outside
geometry = { "type": "Polygon", "coordinates": [ [ [ 43.84986877441406,15.925676536359038 ], [ 44.6539306640625,15.950766025306109 ],[ 44.681396484375,15.194084972583916 ], [ 43.8189697265625,15.20998780073036 ], [ 43.84986877441406,15.925676536359038 ] ] ] }
```
Platform: UNKNOWN

@@ -295,0 +311,0 @@ Classifier: Programming Language :: Python :: 3

+2
-1

@@ -211,3 +211,4 @@ """

r=requests.put( url,data=params )
if r.status_code in range(400,500):
logger.info(r.status_code)
if r.status_code in range(400,599):
if force_raise:

@@ -214,0 +215,0 @@ return r.raise_for_status()

@@ -35,14 +35,11 @@ """

def getDatasets( self, datasetId=None,**kwargs ):
"""
getDataset convention:
1. without parametes returns all datasets present over the adam endpoint;
2. with datasetId paramenter returns a specific description of this dataset
def getDatasets(self,datasetId=None,**kwargs):
@ {ID:datasetId}: the datasetId
@ page: Indicats a specific page
@ maxRecords: Max number of results in output
"""
params={ 'datasetId':datasetId }
params={}
params["type"]="adamapi"
if datasetId:
url=os.path.join("apis","v2","datasets",datasetId.split(":")[0])
else:
url=os.path.join("apis","v2","datasets","list")
if 'page' in kwargs:

@@ -52,2 +49,3 @@ params['page']=kwargs['page']

params['page']=0
if 'maxRecords' in kwargs:

@@ -58,7 +56,33 @@ params['maxRecords']=kwargs['maxRecords']

r = self.client.client( os.path.join( 'datasets', 'api', 'datasets' ), params, 'GET' )
r = self.client.client( url, params, 'GET' )
self.LOG.info( 'Datasets request executed' )
response = r.json()
if 'errors' in response:
raise AdamApiError( response[ 'errors' ] )
return response[ 'response' ]
return response
#def getDatasets( self, datasetId=None,**kwargs ):
# """
# getDataset convention:
# 1. without parametes returns all datasets present over the adam endpoint;
# 2. with datasetId paramenter returns a specific description of this dataset
# @ {ID:datasetId}: the datasetId
# @ page: Indicats a specific page
# @ maxRecords: Max number of results in output
# """
# params={ 'datasetId':datasetId }
# params["type"]="adamapi"
# if 'page' in kwargs:
# params['page']=kwargs['page']
# else:
# params['page']=0
# if 'maxRecords' in kwargs:
# params['maxRecords']=kwargs['maxRecords']
# else:
# params['maxRecords']=10
# r = self.client.client( os.path.join( 'datasets', 'api', 'datasets' ), params, 'GET' )
# self.LOG.info( 'Datasets request executed' )
# response = r.json()
# if 'errors' in response:
# raise AdamApiError( response[ 'errors' ] )
# return response[ 'response' ]

@@ -37,3 +37,3 @@ """

def getProducts(self,datasetId,**kwargs):
def getProducts(self,datasetId,startIndex=0,maxRecords=10,**kwargs):
"""

@@ -50,3 +50,2 @@ Product Catalogue Search

#params['product']=datasetId.split(":",1)[0]
params['datasetId']=datasetId.split(":",1)[1]

@@ -65,9 +64,8 @@ params["type"]="adamapi"

params[ 'endDate' ] = kwargs[par].strftime( '%Y-%m-%dT%H:%M:%SZ' )
elif par == 'startIndex':
params['page'] = kwargs[par]
elif par == 'maxRecords':
params['items'] = kwargs[par]
else:
params[par]=kwargs[par]
params["page"]=startIndex
params["items"]=maxRecords
if 'geometry' in kwargs:

@@ -74,0 +72,0 @@ self.LOG.info(params)

Metadata-Version: 2.1
Name: adamapi
Version: 2.0.10
Version: 2.0.11
Summary: Python Adam API

@@ -14,3 +14,3 @@ Home-page: https://git.services.meeo.it/das/adamapi

1. adamapi==1.0.1 , This package works only with ADAMCORE 1.
2. adamapi==2.0.10, This pachage works only with ADAMCORE 2.
2. adamapi==2.0.11, This pachage works only with ADAMCORE 2.

@@ -151,3 +151,3 @@ ## Requirements

* **.getDatasets()** --> To retrieve datasets list and metadata<br>
* **.getDatasets()** --> To retrieve datasets list <br>
Parameters:

@@ -210,2 +210,3 @@

| endDate | False | str or [datetime](https://docs.python.org/3/library/datetime.html) | | the end date |
| geometry | True | str or geojson | | GeoJson geometry,[geojson format](https://tools.ietf.org/html/rfc7946) [appendix](#geometry)|

@@ -261,3 +262,3 @@

| 3 | False | boolean | False | asyncronous management for subset and timeseries order |
| geometry | True | str or geojson | | GeoJson geometry, if the geometry is a Point the api return a timeseries |
| geometry | True | str or geojson | | GeoJson geometry, if the geometry is a Point the api return a timeseries,[geojson format](https://tools.ietf.org/html/rfc7946) [appendix](#geometry)|
| outputFname | False | str | "adamapiresults/datasetId" | absolute filename without extension. If not set, the retrived product is saved in "adamapiresults/datasetId" |

@@ -292,3 +293,18 @@

## Appendix
### Geometry
```python
#This geometry will return all the results it has intersected within it
geometry = { "type": "Polygon", "coordinates": [ [ [ 43.916666667, 15.716666667 ], [ 43.916666667, 15.416666667 ] , [ 44.216666667, 15.416666667 ], [ 44.216666667, 15.716666667 ], [ 43.916666667, 15.716666667 ] ] ] }
```
```python
#This geometry will return all the results it has intersected on its outside
geometry = { "type": "Polygon", "coordinates": [ [ [ 43.84986877441406,15.925676536359038 ], [ 44.6539306640625,15.950766025306109 ],[ 44.681396484375,15.194084972583916 ], [ 43.8189697265625,15.20998780073036 ], [ 43.84986877441406,15.925676536359038 ] ] ] }
```
Platform: UNKNOWN

@@ -295,0 +311,0 @@ Classifier: Programming Language :: Python :: 3

@@ -31,3 +31,3 @@ """

name="adamapi",
version="2.0.10",
version="2.0.11",
author="MEEO s.r.l.",

@@ -34,0 +34,0 @@ author_email="info@meeo.it",