Python MAAP Client Library
Python client library that abstracts MAAP API calls including CMR querying, algorithm change management, and HySDS job execution. CMR components in this library are largely derived from the pyCMR library.
Installation
From PyPI (recommended)
pip install maap-py
For development
pip install -e .
Legacy
python setup.py install
Usage
Populate your MAAP base url into a maap.cfg file, using maap.cfg as a template.
Then, run:
$ python
>>> from maap.maap import MAAP
>>> maap = MAAP()
>>> granules = maap.search_granule(sitename='lope', instrument='uavsar')
>>> for res in granules:
print(res.getDownloadUrl())
res.download()
# results omitted for brevity
Optionally set the MAAP API base URL
Useful for changing the API host during development, you may override the API host using the constructor:
$ python
>>> from maap.maap import MAAP
>>> maap = MAAP(maap_host='custom.maap-project-org')
When left parameter-less, maap-py uses the default setting.
Custom 'Named Attribute' Parameters
Named parameters are recommended as an alternative to CMR's additional attributes as a way to improve usability.
This list of attributes is editable in the maap.cfg indexed_attributes setting. E.g.:
"site_name,Site Name,string"
where:
site_nameis the parameterSite Nameis the CMR attribute namestringis the parameter type
With named attribute parameters, this query:
lidarGranule = maap.search_granule(instrument='lvis', attribute='string,Site Name,lope')
Simplifies to:
lidarGranule = maap.search_granule(instrument='lvis', site_name='lope')
Test
poetry install
poetry run pytest --cov=maap
poetry run pytest test/specific_test.py
Metadata
Release files for maap-py 5.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| maap_py-5.1.0.tar.gz | 38.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| maap_py-5.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 84.4 kB
Release files / maap_py-5.1.0.tar.gz
| Download URL | maap_py-5.1.0.tar.gz |
|---|---|
| Size | 38.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
15154c73f9e123eb2192ae900ebea5d11c601a5f37c1862b7fb4720cda5d8ac1
|
|
BLAKE2b-256 checksum How to use checksums |
afe1212133b17658e4c76855b44b85da6f09f7a9fb0b576852d6f72f83b3a770
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / maap_py-5.1.0-py3-none-any.whl
| Download URL | maap_py-5.1.0-py3-none-any.whl |
|---|---|
| Size | 45.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
306e73d4ee4e8582739d6c02df0ca4af3efd782d92356d867ea49859b103976d
|
|
BLAKE2b-256 checksum How to use checksums |
50bca8f7b35553a74738e8f9e4c399d9874f38a71bc15699bcced007be33df5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|