{ "info": { "author": "Justin Deal, Matt Isnor", "author_email": "deal.justin@gmail.com, isnor.matt@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "Python CMR\n==========\n\n.. image:: https://travis-ci.org/jddeal/python-cmr.svg?branch=master\n :target: https://travis-ci.org/jddeal/python-cmr\n\nPython CMR is an easy to use wrapper to the NASA EOSDIS\n`Common Metadata Repository API `_. This package aims to make\nquerying the API intuitive and less error-prone by providing methods that will preemptively check\nfor invalid input and handle the URL encoding the CMR API expects.\n\nGetting access to NASA's earth science metadata is as simple as this:\n\n::\n\n >>> from cmr import CollectionQuery, GranuleQuery\n\n >>> api = CollectionQuery()\n >>> collections = api.archive_center(\"LP DAAC\").keyword(\"AST_L1*\").get(5)\n\n >>> for collection in collections:\n >>> print(collection[\"short_name\"])\n AST_L1A\n AST_L1AE\n AST_L1T\n\n >>> api = GranuleQuery()\n >>> granules = api.short_name(\"AST_L1T\").point(-112.73, 42.5).get(3)\n\n >>> for granule in granules:\n >>> print(granule[\"title\"])\n SC:AST_L1T.003:2149105822\n SC:AST_L1T.003:2149105820\n SC:AST_L1T.003:2149155037\n\n\nInstallation\n============\n\nTo install from pypi:\n\n::\n\n $ pip install python-cmr\n\n\nTo install from github, perhaps to try out the dev branch:\n\n::\n\n $ git clone https://github.com/jddeal/python-cmr\n $ cd python-cmr\n $ pip install .\n\n\nExamples\n========\n\nThis library is broken into two classes, `CollectionQuery` and `GranuleQuery`. Each of these\nclasses provide a large set of methods used to build a query for CMR. Not all parameters provided\nby the CMR API are covered by this version of python-cmr.\n\nThe following methods are available to both collecton and granule queries:\n\n::\n\n # search for granules matching a specific product/short_name\n >>> api.short_name(\"AST_L1T\")\n\n # search for granules matching a specific version\n >>> api.version(\"006\")\n\n # search for granules at a specific longitude and latitude\n >>> api.point(-112.73, 42.5)\n\n # search for granules in an area bound by a box (lower left lon/lat, upper right lon/lat)\n >>> api.bounding_box(-112.70, 42.5, -110, 44.5)\n\n # search for granules in a polygon (these need to be in counter clockwise order and the\n # last coordinate must match the first in order to close the polygon)\n >>> api.polygon([(-100, 40), (-110, 40), (-105, 38), (-100, 40)])\n\n # search for granules in a line\n >>> api.line([(-100, 40), (-90, 40), (-95, 38)])\n\n # search for granules in an open or closed date range\n >>> api.temporal(\"2016-10-10T01:02:00Z\", \"2016-10-12T00:00:30Z\")\n >>> api.temporal(\"2016-10-10T01:02:00Z\", None)\n >>> api.temporal(datetime(2016, 10, 10, 1, 2, 0), datetime.now())\n\n # only include granules available for download\n >>> api.downloadable()\n\n # only include granules that are unavailable for download\n >>> api.online_only()\n\n # search for collections/granules associated with or identified by concept IDs\n # note: often the ECHO collection ID can be used here as well\n # note: when using CollectionQuery, only collection concept IDs can be passed\n # note: when uses GranuleQuery, passing a collection's concept ID will filter by granules associated\n # with that particular collection.\n >>> api.concept_id(\"C1299783579-LPDAAC_ECS\")\n >>> api.concept_id([\"G1327299284-LPDAAC_ECS\", \"G1326330014-LPDAAC_ECS\"])\n\n\nGranule searches support these methods (in addition to the shared methods above):\n\n::\n\n # search for a granule by its unique ID\n >>> api.granule_ur(\"SC:AST_L1T.003:2150315169\")\n # search for granules from a specific orbit\n >>> api.orbit_number(5000)\n\n # filter by the day/night flag\n >>> api.day_night_flag(\"day\")\n\n # filter by cloud cover percentage range\n >>> api.cloud_cover(25, 75)\n\n # filter by specific instrument or platform\n >>> api.instrument(\"MODIS\")\n >>> api.platform(\"Terra\")\n\n\nCollection searches support these methods (in addition to the shared methods above):\n\n::\n\n # search for collections from a specific archive center\n >>> api.archive_center(\"LP DAAC\")\n\n # case insensitive, wildcard enabled text search through most collection fields\n >>> api.keyword(\"M*D09\")\n\n\nAs an alternative to chaining methods together to set the parameters of your query, a\nmethod exists to allow you to pass your parameters as keyword arguments:\n\n::\n\n # search for AST_L1T version 003 granules at latitude 42, longitude -100\n >>> api.parameters(\n short_name=\"AST_L1T\",\n version=\"003\",\n point=(-100, 42)\n )\n\nNote: the kwarg key should match the name of a method from the above examples, and the value\nshould be a tuple if it's a parameter that requires multiple values.\n\n\nTo inspect and retreive results from the API, the following methods are available:\n\n::\n\n # inspect the number of results the query will return without downloading the results\n >>> print(api.hits())\n\n # retrieve 100 granules\n >>> granules = api.get(100)\n\n # retrieve 25,000 granules\n >>> granules = api.get(25000)\n\n # retrieve all the granules possible for the query\n >>> granules = api.get_all() # this is a shortcut for api.get(api.hits())\n\n\nBy default the responses will return as json and be accessible as a list of python dictionaries.\nOther formats can be specified before making the request:\n\n::\n\n >>> granules = api.format(\"echo10\").get(100)\n\nThe following formats are supported for both granule and collection queries:\n\n* json (default)\n* xml\n* echo10\n* iso\n* iso19115\n* csv\n* atom\n* kml\n* native\n\nCollection queries also support the following formats:\n\n* dif\n* dif10\n* opendata\n* umm_json\n* umm_json_vX_Y (ex: umm_json_v1_9)\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jddeal/python-cmr", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "python-cmr", "package_url": "https://pypi.org/project/python-cmr/", "platform": "", "project_url": "https://pypi.org/project/python-cmr/", "project_urls": { "Homepage": "https://github.com/jddeal/python-cmr" }, "release_url": "https://pypi.org/project/python-cmr/0.4.1/", "requires_dist": [ "requests" ], "requires_python": "", "summary": "Python wrapper to the NASA Common Metadata Repository (CMR) API.", "version": "0.4.1" }, "last_serial": 5728630, "releases": { "0.1b1": [ { "comment_text": "", "digests": { "md5": "b01a9a57c276725f139e69a7d7413b2d", "sha256": "ce7efe803e0811efd8b80a6eafd056fd28aeb7e0302140d1bd7d74bffdae7374" }, "downloads": -1, "filename": "python_cmr-0.1b1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b01a9a57c276725f139e69a7d7413b2d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8898, "upload_time": "2017-05-25T02:07:49", "url": "https://files.pythonhosted.org/packages/93/a1/acd6c6e98e04f9949eef0520578c6121c6ababe8aae3c15a24129fbee98a/python_cmr-0.1b1-py2.py3-none-any.whl" } ], "0.1b2": [ { "comment_text": "", "digests": { "md5": "b52a3458a24aaa2b5f3b01c89ec9e19d", "sha256": "2e9c9efc28c092f822d8527f77b7dd7d6268198bec718f8a6bbd685bc07322cc" }, "downloads": -1, "filename": "python_cmr-0.1b2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b52a3458a24aaa2b5f3b01c89ec9e19d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8888, "upload_time": "2017-05-25T02:23:53", "url": "https://files.pythonhosted.org/packages/b5/2d/8808aac303d7b8d27b1f84b8f81582e7171f36bfc90149c56efe00b368fe/python_cmr-0.1b2-py2.py3-none-any.whl" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "f250f01cd9a347484ca8aa9397a8fc66", "sha256": "2c32978fc36f7621029d202f717dc4e277025b1d7c4678a15e66ca63727c9f0c" }, "downloads": -1, "filename": "python_cmr-0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f250f01cd9a347484ca8aa9397a8fc66", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9527, "upload_time": "2017-05-26T02:04:53", "url": "https://files.pythonhosted.org/packages/d2/f8/cfda9acbb4bd412a560187cd86470b33b092f2601f2021cd7d7149a0cec3/python_cmr-0.2-py2.py3-none-any.whl" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "c5f1c17216a7181d7e4a0a39c258c55d", "sha256": "8bc69eb77156bee719241a18fc0370cda006c751abd61abc6de162cc619e6996" }, "downloads": -1, "filename": "python_cmr-0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c5f1c17216a7181d7e4a0a39c258c55d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10964, "upload_time": "2017-06-12T00:51:14", "url": "https://files.pythonhosted.org/packages/a1/86/beb9adb1cfc4c7cd5b974183272c892b70e03b785f0ec0e7b68c2e5831cd/python_cmr-0.3-py2.py3-none-any.whl" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "123fe5b2e6167c84acf643d0d54b966d", "sha256": "f8120305a7258bcff6440fe0a81f275fe20f1d79eb3a9f8636a6fe414391d995" }, "downloads": -1, "filename": "python_cmr-0.3.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "123fe5b2e6167c84acf643d0d54b966d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10994, "upload_time": "2017-07-25T00:41:08", "url": "https://files.pythonhosted.org/packages/a4/d4/9b22e6971d67f8a963fb83d1ca5269804b0924cd608da8600f1a98760b48/python_cmr-0.3.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9ac087092788f1db58125199e0b7fcd0", "sha256": "11f25c9803c2e32074c9c29bf33b27b7e0b23c2307f58b5f56abf6dda214f41c" }, "downloads": -1, "filename": "python-cmr-0.3.1.tar.gz", "has_sig": false, "md5_digest": "9ac087092788f1db58125199e0b7fcd0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10422, "upload_time": "2017-07-25T00:41:10", "url": "https://files.pythonhosted.org/packages/93/05/838818296a287f976c105baa504cca9b5f16f243e0d0b24d7ff2d7f0162e/python-cmr-0.3.1.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "8ce5c46b78dcc61fd444d01d384f879e", "sha256": "838a35ba658e9f69acc4a2e99b7225890638cace0f7bd27c16f881c96f682f00" }, "downloads": -1, "filename": "python_cmr-0.3.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8ce5c46b78dcc61fd444d01d384f879e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11314, "upload_time": "2018-01-06T19:09:12", "url": "https://files.pythonhosted.org/packages/c4/a4/7872c2a6fdc5641a0db9508894d6a470c1680b933cc8fb93807a62c109a9/python_cmr-0.3.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6b93aabbc92ed73c2238379e4d66545e", "sha256": "856fc101f3a530e332019405ad1da093f97f80684dbdcbbd712afa13ac294438" }, "downloads": -1, "filename": "python-cmr-0.3.3.tar.gz", "has_sig": false, "md5_digest": "6b93aabbc92ed73c2238379e4d66545e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10793, "upload_time": "2018-01-06T19:09:13", "url": "https://files.pythonhosted.org/packages/e2/ac/dca0eb1a9ef9d02514c95f079cf0814c1f3affc5a2cf7a22e60d11b13c44/python-cmr-0.3.3.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "16251f68f1b29fe643acdff11303fac1", "sha256": "ba5ebce5c2f9d49a607c141614e90d2a583c5da115ffccd02ca79536a772c306" }, "downloads": -1, "filename": "python_cmr-0.4.1-py3-none-any.whl", "has_sig": false, "md5_digest": "16251f68f1b29fe643acdff11303fac1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9819, "upload_time": "2019-08-26T02:32:38", "url": "https://files.pythonhosted.org/packages/b5/18/3cf63d836c96fdc5404f1bde11553f33421ce018897939f1be65f8b7150a/python_cmr-0.4.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b1dc023766b6a9e568944bceaff8d57b", "sha256": "baa09f08fa3e09216ed9f3ac1e223ac020b5097d94e9f1f3e9acfdee3f871a40" }, "downloads": -1, "filename": "python-cmr-0.4.1.tar.gz", "has_sig": false, "md5_digest": "b1dc023766b6a9e568944bceaff8d57b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10163, "upload_time": "2019-08-26T02:32:40", "url": "https://files.pythonhosted.org/packages/74/e1/0d08404b2a3dc6080d04b44bb44590d5012dd17d488bc24cdc4af4844e47/python-cmr-0.4.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "16251f68f1b29fe643acdff11303fac1", "sha256": "ba5ebce5c2f9d49a607c141614e90d2a583c5da115ffccd02ca79536a772c306" }, "downloads": -1, "filename": "python_cmr-0.4.1-py3-none-any.whl", "has_sig": false, "md5_digest": "16251f68f1b29fe643acdff11303fac1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9819, "upload_time": "2019-08-26T02:32:38", "url": "https://files.pythonhosted.org/packages/b5/18/3cf63d836c96fdc5404f1bde11553f33421ce018897939f1be65f8b7150a/python_cmr-0.4.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b1dc023766b6a9e568944bceaff8d57b", "sha256": "baa09f08fa3e09216ed9f3ac1e223ac020b5097d94e9f1f3e9acfdee3f871a40" }, "downloads": -1, "filename": "python-cmr-0.4.1.tar.gz", "has_sig": false, "md5_digest": "b1dc023766b6a9e568944bceaff8d57b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10163, "upload_time": "2019-08-26T02:32:40", "url": "https://files.pythonhosted.org/packages/74/e1/0d08404b2a3dc6080d04b44bb44590d5012dd17d488bc24cdc4af4844e47/python-cmr-0.4.1.tar.gz" } ] }