{ "info": { "author": "Malte Franken", "author_email": "coding@subspace.de", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# python-geojson-client\n\n[![Build Status](https://travis-ci.org/exxamalte/python-geojson-client.svg)](https://travis-ci.org/exxamalte/python-geojson-client)\n[![Coverage Status](https://coveralls.io/repos/github/exxamalte/python-geojson-client/badge.svg?branch=master)](https://coveralls.io/github/exxamalte/python-geojson-client?branch=master)\n[![PyPi](https://img.shields.io/pypi/v/geojson-client.svg)](https://pypi.python.org/pypi/geojson-client)\n[![Version](https://img.shields.io/pypi/pyversions/geojson-client.svg)](https://pypi.python.org/pypi/geojson-client)\n[![Maintainability](https://api.codeclimate.com/v1/badges/8c87f480c5043a8599df/maintainability)](https://codeclimate.com/github/exxamalte/python-geojson-client/maintainability)\n\nThis library provides convenient access to [GeoJSON](https://tools.ietf.org/html/rfc7946) Feeds.\n\n\n## Installation\n`pip install geojson-client`\n\n## Usage\nSee below for examples of how this library can be used for particular GeoJSON feeds. After instantiating a particular class and supply the required parameters, you can call `update` to retrieve the feed data. The return value will be a tuple of a status code and the actual data in the form of a list of feed entries specific to the selected feed.\n\nStatus Codes\n* _UPDATE_OK_: Update went fine and data was retrieved. The library may still return empty data, for example because no entries fulfilled the filter criteria.\n* _UPDATE_OK_NO_DATA_: Update went fine but no data was retrieved, for example because the server indicated that there was not update since the last request.\n* _UPDATE_ERROR_: Something went wrong during the update\n\n## Supported GeoJSON Feeds\n\n### Generic Feed\n\n**Supported Filters**\n\n| Filter | | Description |\n|--------|-----------------|-------------|\n| Radius | `filter_radius` | Radius in kilometers around the home coordinates in which events from feed are included. |\n\n**Example**\n```python\nfrom geojson_client.generic_feed import GenericFeed\n# Home Coordinates: Latitude: -33.0, Longitude: 150.0\n# Filter radius: 500 km\nfeed = GenericFeed((-33.0, 150.0), filter_radius=500, \n url=\"https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson\")\nstatus, entries = feed.update()\n```\n\n### [NSW Rural Fire Service](https://www.rfs.nsw.gov.au/fire-information/fires-near-me)\n\n**Supported Filters**\n\n| Filter | | Description |\n|------------|---------------------|-------------|\n| Radius | `filter_radius` | Radius in kilometers around the home coordinates in which events from feed are included. |\n| Categories | `filter_categories` | Array of category names. Only events with a category matching any of these is included. |\n\n**Example**\n```python\nfrom geojson_client.nsw_rural_fire_service_feed import NswRuralFireServiceFeed\n# Home Coordinates: Latitude: -33.0, Longitude: 150.0\n# Filter radius: 50 km\n# Filter categories: 'Advice'\nfeed = NswRuralFireServiceFeed((-33.0, 150.0), filter_radius=50, filter_categories=['Advice'])\nstatus, entries = feed.update()\n```\n\n### [U.S. Geological Survey Earthquake Hazards Program](https://earthquake.usgs.gov/earthquakes/feed/v1.0/geojson.php)\n\n**Supported Feeds**\n\n| Category | Feed |\n|----------------------------------------|--------------------------------------|\n| Past Hour - Significant Earthquakes | `past_hour_significant_earthquakes` |\n| Past Hour - M4.5+ Earthquakes | `past_hour_m45_earthquakes` |\n| Past Hour - M2.5+ Earthquakes | `past_hour_m25_earthquakes` |\n| Past Hour - M1.0+ Earthquakes | `past_hour_m10_earthquakes` |\n| Past Hour - All Earthquakes | `past_hour_all_earthquakes` |\n| Past Day - Significant Earthquakes | `past_day_significant_earthquakes` |\n| Past Day - M4.5+ Earthquakes | `past_day_m45_earthquakes` |\n| Past Day - M2.5+ Earthquakes | `past_day_m25_earthquakes` |\n| Past Day - M1.0+ Earthquakes | `past_day_m10_earthquakes` |\n| Past Day - All Earthquakes | `past_day_all_earthquakes` |\n| Past 7 Days - Significant Earthquakes | `past_week_significant_earthquakes` |\n| Past 7 Days - M4.5+ Earthquakes | `past_week_m45_earthquakes` |\n| Past 7 Days - M2.5+ Earthquakes | `past_week_m25_earthquakes` |\n| Past 7 Days - M1.0+ Earthquakes | `past_week_m10_earthquakes` |\n| Past 7 Days - All Earthquakes | `past_week_all_earthquakes` |\n| Past 30 Days - Significant Earthquakes | `past_month_significant_earthquakes` |\n| Past 30 Days - M4.5+ Earthquakes | `past_month_m45_earthquakes` |\n| Past 30 Days - M2.5+ Earthquakes | `past_month_m25_earthquakes` |\n| Past 30 Days - M1.0+ Earthquakes | `past_month_m10_earthquakes` |\n| Past 30 Days - All Earthquakes | `past_month_all_earthquakes` |\n\n**Supported Filters**\n\n| Filter | | Description |\n|-------------------|----------------------------|-------------|\n| Radius | `filter_radius` | Radius in kilometers around the home coordinates in which events from feed are included. |\n| Minimum Magnitude | `filter_minimum_magnitude` | Minimum magnitude as float value. Only event with a magnitude equal or above this value are included. |\n\n**Example**\n```python\nfrom geojson_client.usgs_earthquake_hazards_program_feed import UsgsEarthquakeHazardsProgramFeed\n# Home Coordinates: Latitude: 21.3, Longitude: -157.8\n# Feed: Past Day - All Earthquakes\n# Filter radius: 500 km\n# Filter minimum magnitude: 4.0\nfeed = UsgsEarthquakeHazardsProgramFeed((21.3, -157.8), 'past_day_all_earthquakes', \n filter_radius=500, filter_minimum_magnitude=4.0)\nstatus, entries = feed.update()\n```\n\n## Feed Managers\n\nThe Feed Managers help managing feed updates over time, by notifying the \nconsumer of the feed about new feed entries, updates and removed entries \ncompared to the last feed update.\n\n* If the current feed update is the first one, then all feed entries will be \n reported as new. The feed manager will keep track of all feed entries' \n external IDs that it has successfully processed.\n* If the current feed update is not the first one, then the feed manager will \n produce three sets:\n * Feed entries that were not in the previous feed update but are in the \n current feed update will be reported as new.\n * Feed entries that were in the previous feed update and are still in the \n current feed update will be reported as to be updated.\n * Feed entries that were in the previous feed update but are not in the \n current feed update will be reported to be removed.\n* If the current update fails, then all feed entries processed in the previous\n feed update will be reported to be removed.\n\nAfter a successful update from the feed, the feed manager will provide two\ndifferent dates:\n\n* `last_update` will be the timestamp of the last successful update from the\n feed. This date may be useful if the consumer of this library wants to\n treat intermittent errors from feed updates differently.\n* `last_timestamp` will be the latest timestamp extracted from the feed data. \n This requires that the underlying feed data actually contains a suitable \n date. This date may be useful if the consumer of this library wants to \n process feed entries differently if they haven't actually been updated.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/exxamalte/python-geojson-client", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "geojson-client", "package_url": "https://pypi.org/project/geojson-client/", "platform": "", "project_url": "https://pypi.org/project/geojson-client/", "project_urls": { "Homepage": "https://github.com/exxamalte/python-geojson-client" }, "release_url": "https://pypi.org/project/geojson-client/0.4/", "requires_dist": [ "geojson (>=2.4.0)", "haversine (>=1.0.1)", "pytz (>=2018.04)", "requests (>=2.20.0)" ], "requires_python": "", "summary": "A GeoJSON client library.", "version": "0.4" }, "last_serial": 5487229, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "2b7e559f025626f53685d23c14c4899b", "sha256": "7965ca66e21ba89f1933d9fa6daaec07c3ac8133b0a1f6f7caa66fe642d7d349" }, "downloads": -1, "filename": "geojson_client-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "2b7e559f025626f53685d23c14c4899b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6879, "upload_time": "2018-09-16T15:37:11", "url": "https://files.pythonhosted.org/packages/94/30/d84d93d143b0829fa5d9c1af6cfb096bd54cce14d0a037e2fb345522736e/geojson_client-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "22e9d53bfac87137e39e85483fe29191", "sha256": "2baf2057a8a2429dd977deaefda1d7f5c818205db91cd973ea059751e1aa6602" }, "downloads": -1, "filename": "geojson_client-0.1.tar.gz", "has_sig": false, "md5_digest": "22e9d53bfac87137e39e85483fe29191", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5398, "upload_time": "2018-09-16T15:37:13", "url": "https://files.pythonhosted.org/packages/7b/55/1e8ebc13b956ce8a84c7f940b1f6902275ca321b27e7c1594d4e18d160d5/geojson_client-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "54543a54cced55bca8229c253f543257", "sha256": "35e7b77ce04f16582c8431cab6b8d1d8139830933d0410590c1baafeed15f1ae" }, "downloads": -1, "filename": "geojson_client-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "54543a54cced55bca8229c253f543257", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14499, "upload_time": "2018-10-15T21:31:29", "url": "https://files.pythonhosted.org/packages/ef/8b/bbb5c94c94f5116e1237e546b82ee562cb22e23899b63e718a3be7d40ed0/geojson_client-0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "96a35de79664e5c1205399d92fac9a49", "sha256": "2b4c46a2b750bdc8563b9048d03373c294db22d2c14682dfbb9d082531e6f160" }, "downloads": -1, "filename": "geojson_client-0.2.tar.gz", "has_sig": false, "md5_digest": "96a35de79664e5c1205399d92fac9a49", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9735, "upload_time": "2018-10-15T21:32:13", "url": "https://files.pythonhosted.org/packages/a6/6e/9014f2ba88f08a15e996b6b6b97c7e23c2e1062ebe3805bcecd32ee39a87/geojson_client-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "1892bb622fa2e6c59ebb2d62dc5028c5", "sha256": "09e3f1dc3ed5680ec57b5299284b7276005ce5bb6bc7b835352988f7217000aa" }, "downloads": -1, "filename": "geojson_client-0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "1892bb622fa2e6c59ebb2d62dc5028c5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17422, "upload_time": "2018-10-31T15:07:14", "url": "https://files.pythonhosted.org/packages/18/6d/75c5596fae675a9d42829a1a139bbb3b695cf89f0e3604b1aded09da5bdb/geojson_client-0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6e11208c3c56eb22d9002d967fb1645a", "sha256": "d4c27a9c2e6007787f2451221a85a0ebe4cde3d4f5c4b91fa2ad8ced8e20c5b2" }, "downloads": -1, "filename": "geojson_client-0.3.tar.gz", "has_sig": false, "md5_digest": "6e11208c3c56eb22d9002d967fb1645a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12558, "upload_time": "2018-10-31T15:07:17", "url": "https://files.pythonhosted.org/packages/48/e2/8885d25a33d14fdf21b4c439e494b7e6e89e85c7e92acf9bcfd4d0149ae8/geojson_client-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "e2ede2d8173a4235ea16e5063336e428", "sha256": "d24c3d4a504c58e9559d414534148975178b36aa4a7647a74c4b749dc1643eb3" }, "downloads": -1, "filename": "geojson_client-0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "e2ede2d8173a4235ea16e5063336e428", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 22609, "upload_time": "2019-07-04T15:29:40", "url": "https://files.pythonhosted.org/packages/c3/b9/967fffa83c7cb1c4b4b7df04957f0ca4756d06bca5acd76c7d21db52ee58/geojson_client-0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a46a137c28b7034d123613d8f57c1bfa", "sha256": "765eb4dfec14c523c7c16e88a19cd2daed50a88175431ff97b4ef71c445730f0" }, "downloads": -1, "filename": "geojson_client-0.4.tar.gz", "has_sig": false, "md5_digest": "a46a137c28b7034d123613d8f57c1bfa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14612, "upload_time": "2019-07-04T15:29:41", "url": "https://files.pythonhosted.org/packages/c2/89/3b1c27fda1dc2f40013f7fe939100de99845fcbc8bb620ca5aa20d20bc27/geojson_client-0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e2ede2d8173a4235ea16e5063336e428", "sha256": "d24c3d4a504c58e9559d414534148975178b36aa4a7647a74c4b749dc1643eb3" }, "downloads": -1, "filename": "geojson_client-0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "e2ede2d8173a4235ea16e5063336e428", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 22609, "upload_time": "2019-07-04T15:29:40", "url": "https://files.pythonhosted.org/packages/c3/b9/967fffa83c7cb1c4b4b7df04957f0ca4756d06bca5acd76c7d21db52ee58/geojson_client-0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a46a137c28b7034d123613d8f57c1bfa", "sha256": "765eb4dfec14c523c7c16e88a19cd2daed50a88175431ff97b4ef71c445730f0" }, "downloads": -1, "filename": "geojson_client-0.4.tar.gz", "has_sig": false, "md5_digest": "a46a137c28b7034d123613d8f57c1bfa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14612, "upload_time": "2019-07-04T15:29:41", "url": "https://files.pythonhosted.org/packages/c2/89/3b1c27fda1dc2f40013f7fe939100de99845fcbc8bb620ca5aa20d20bc27/geojson_client-0.4.tar.gz" } ] }