maap-py


Namemaap-py JSON
Version 4.1.0 PyPI version JSON
download
home_pagehttps://github.com/MAAP-Project/maap-py
SummaryPython client API for interacting with the NASA MAAP API
upload_time2024-09-12 22:38:05
maintainerNone
docs_urlNone
authorJet Propulsion Laboratory
requires_python<4.0,>=3.9
licenseApache-2.0
keywords dataset granule nasa maap cmr
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Python MAAP Client Library

Python client library that abstracts [MAAP API](https://github.com/MAAP-Project/maap-api) calls including CMR querying, algorithm change management, and HySDS job execution. CMR components in this library are largely derived from the [pyCMR](https://github.com/nasa/pyCMR) library.

## Setup

Run:

```bash
python setup.py install
```

Or

```bash
pip install -e .
```

## Usage

Populate your MAAP base url into a `maap.cfg` file, using [maap.cfg](maap.cfg) as a template.

Then, run:

```python
$ python
>>> from maap.maap import MAAP
>>> maap = MAAP()

>>> granules = maap.searchGranule(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
$ python
>>> from maap.maap import MAAP
>>> maap = MAAP(maap_host='custom.maap-project-org')
```

When left parameter-less, maap-py uses the [default setting](maap.cfg#L6).

### Custom 'Named Attribute'  Parameters

Named parameters are recommended as an alternative to CMR's [additional attributes](https://cmr.earthdata.nasa.gov/search/site/docs/search/api.html#g-additional-attribute) as a way to improve usability.
This list of attributes is editable in the [maap.cfg](maap.cfg) `indexed_attributes` setting. E.g.:

```plain
"site_name,Site Name,string"
```

where:

- `site_name` is the parameter
- `Site Name` is the CMR attribute name
- `string` is the parameter type

With named attribute parameters, this query:

 ```python
lidarGranule = maap.searchGranule(instrument='lvis', attribute='string,Site Name,lope')
```

Simplifies to:

```python
lidarGranule = maap.searchGranule(instrument='lvis', site_name='lope')
```

## Test

```bash
python setup.py test
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/MAAP-Project/maap-py",
    "name": "maap-py",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "dataset, granule, nasa, MAAP, CMR",
    "author": "Jet Propulsion Laboratory",
    "author_email": "jpl@nasa.gov",
    "download_url": "https://files.pythonhosted.org/packages/14/b0/a2f0552acb2a06829844ad7dbffeef1301c86449586aa9590e1ff830b8b3/maap_py-4.1.0.tar.gz",
    "platform": null,
    "description": "# Python MAAP Client Library\n\nPython client library that abstracts [MAAP API](https://github.com/MAAP-Project/maap-api) calls including CMR querying, algorithm change management, and HySDS job execution. CMR components in this library are largely derived from the [pyCMR](https://github.com/nasa/pyCMR) library.\n\n## Setup\n\nRun:\n\n```bash\npython setup.py install\n```\n\nOr\n\n```bash\npip install -e .\n```\n\n## Usage\n\nPopulate your MAAP base url into a `maap.cfg` file, using [maap.cfg](maap.cfg) as a template.\n\nThen, run:\n\n```python\n$ python\n>>> from maap.maap import MAAP\n>>> maap = MAAP()\n\n>>> granules = maap.searchGranule(sitename='lope', instrument='uavsar')\n>>> for res in granules:\n    print(res.getDownloadUrl())\n    res.download()\n# results omitted for brevity\n```\n\n### Optionally set the MAAP API base URL\n\nUseful for changing the API host during development, you may override the API host using the constructor:\n\n```python\n$ python\n>>> from maap.maap import MAAP\n>>> maap = MAAP(maap_host='custom.maap-project-org')\n```\n\nWhen left parameter-less, maap-py uses the [default setting](maap.cfg#L6).\n\n### Custom 'Named Attribute'  Parameters\n\nNamed parameters are recommended as an alternative to CMR's [additional attributes](https://cmr.earthdata.nasa.gov/search/site/docs/search/api.html#g-additional-attribute) as a way to improve usability.\nThis list of attributes is editable in the [maap.cfg](maap.cfg) `indexed_attributes` setting. E.g.:\n\n```plain\n\"site_name,Site Name,string\"\n```\n\nwhere:\n\n- `site_name` is the parameter\n- `Site Name` is the CMR attribute name\n- `string` is the parameter type\n\nWith named attribute parameters, this query:\n\n ```python\nlidarGranule = maap.searchGranule(instrument='lvis', attribute='string,Site Name,lope')\n```\n\nSimplifies to:\n\n```python\nlidarGranule = maap.searchGranule(instrument='lvis', site_name='lope')\n```\n\n## Test\n\n```bash\npython setup.py test\n```\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Python client API for interacting with the NASA MAAP API",
    "version": "4.1.0",
    "project_urls": {
        "Homepage": "https://github.com/MAAP-Project/maap-py",
        "Repository": "https://github.com/MAAP-Project/maap-py"
    },
    "split_keywords": [
        "dataset",
        " granule",
        " nasa",
        " maap",
        " cmr"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "26b631b317ca4277825445fdc7ff3a947783563954744e4a9a1ef0d4b5445fd8",
                "md5": "7346c8f593089608af495d45d15fb4f6",
                "sha256": "6433f44a22dc1291d4c3e3f4508203d95f1346ffd5e3e952140e0a1d22145143"
            },
            "downloads": -1,
            "filename": "maap_py-4.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7346c8f593089608af495d45d15fb4f6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 30419,
            "upload_time": "2024-09-12T22:38:04",
            "upload_time_iso_8601": "2024-09-12T22:38:04.231958Z",
            "url": "https://files.pythonhosted.org/packages/26/b6/31b317ca4277825445fdc7ff3a947783563954744e4a9a1ef0d4b5445fd8/maap_py-4.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "14b0a2f0552acb2a06829844ad7dbffeef1301c86449586aa9590e1ff830b8b3",
                "md5": "4b7d70a48a7f30e06fc626026567d186",
                "sha256": "610a701e9686a2190474d2e1e4081de3c3eafd9d691bfed9c1a9167f76fb7dce"
            },
            "downloads": -1,
            "filename": "maap_py-4.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "4b7d70a48a7f30e06fc626026567d186",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 25147,
            "upload_time": "2024-09-12T22:38:05",
            "upload_time_iso_8601": "2024-09-12T22:38:05.589321Z",
            "url": "https://files.pythonhosted.org/packages/14/b0/a2f0552acb2a06829844ad7dbffeef1301c86449586aa9590e1ff830b8b3/maap_py-4.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-12 22:38:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "MAAP-Project",
    "github_project": "maap-py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "maap-py"
}
        
Elapsed time: 0.85646s