{ "info": { "author": "Heine Furubotten", "author_email": "", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# niluclient\nPython client for getting air pollution data from NILU sensor stations in Norway.\nThe package comes with clients that can fetch and cache data from nilus api. \n\n[![Buy me a coffee][buymeacoffee-shield]][buymeacoffee]\n\n\n## Acknowledgements\nAccording to the [api documentation][api-nilu-no] from nilu.no and luftkvalitet.info, \nwhen using data fetched through this client an acknowledgement to both \nnilu.no and luftkvalitet.info needs to be included. \n\n## Usage\n\nFinding all station in an area:\n```python\nimport niluclient as nilu\n\nstations = nilu.lookup_stations_in_area('Bergen')\n```\n\nFinding all stations and sensor reading within 20 km from a location:\n```python\nimport niluclient as nilu\n\nclient = nilu.create_location_client(60.123456, 5.123456)\n\n# name of all stations found.\nstation_names = client.station_names\n\n# dict of all stations with readings.\nstations = client.station_data\n\n# all stations NO2 readings\nfor station in stations:\n no2_value = station.sensors[nilu.NO2].value\n\n```\n\nFinding readings from a specified station, and update cached value:\n````python\nimport niluclient as nilu\n\nclient = nilu.create_station_client('Kannik')\nno2_value = client.data.sensors[nilu.NO2].value\nno2_unit = client.data.sensors[nilu.NO2].unit_of_measurement\n\n# after an hour. (Data from the api will only update on the hour) \nclient.update()\n\nnew_no2_value = client.data.sensors[nilu.NO2].value\n\n````\n\n## Client api coverage\n\n**Air quality index:**\nFetch measured value and index.\n- [x] GET /aq/utd (Implemented for station filtering) - `niluclient.NiluStationClient`\n- [x] GET /aq/utd/{latitude}/{longitude}/{radius} - `niluclient.NiluLocationClient`\n- [ ] GET /aq/historical/{fromtime}/{totime}/{station}\n- [ ] GET /aq/historical/{fromtime}/{totime}/{latitude}/{longitude}/{radius}\n\n**Observations:** \nFetch measured value.\n- [ ] GET /obs/utd\n- [ ] GET /obs/utd/{latitude}/{longitude}/{radius}\n- [ ] GET /obs/historical/{fromtime}/{totime}/{station}\n- [ ] GET /obs/historical/{fromtime}/{totime}/{latitude}/{longitude}/{radius}\n\n**Day average**\nCalculates day average for a given time period.\n- [ ] GET /stats/day/{fromtime}/{totime}/{station}\n- [ ] GET /stats/day/{fromtime}/{totime}/{latitude}/{longitude}/{radius}\n\n**Lookup api:**\nLists metadata used for filtering.\n- [ ] GET /lookup/areas - (Partially with the `niluclient.AREAS` constants)\n- [x] GET /lookup/stations - `niluclient.lookup_stations_in_area('')`\n- [ ] GET /lookup/components - (Partially with the `niluclient.MEASURABLE_COMPONENTS` constants)\n- [ ] GET /lookup/aqis\n\nSource: endpoints and description fetched from [nilu api documentation][api-nilu-no]\n\n[api-nilu-no]: https://api.nilu.no/docs/\n[buymeacoffee-shield]: https://www.buymeacoffee.com/assets/img/guidelines/download-assets-sm-2.svg\n[buymeacoffee]: https://www.buymeacoffee.com/heine\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/hfurubotten/niluclient", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "niluclient", "package_url": "https://pypi.org/project/niluclient/", "platform": "", "project_url": "https://pypi.org/project/niluclient/", "project_urls": { "Homepage": "https://github.com/hfurubotten/niluclient" }, "release_url": "https://pypi.org/project/niluclient/0.1.2/", "requires_dist": null, "requires_python": "", "summary": "An API client for getting pollution data from NILU sensor stations in Norway.", "version": "0.1.2" }, "last_serial": 4628407, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "d3cbbded4eeb34dfc8f89ec76a8d0e4b", "sha256": "0208a99fb2779dae9d17fe735f2c66d0997826a9fb2c933370cf42af6c24383b" }, "downloads": -1, "filename": "niluclient-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "d3cbbded4eeb34dfc8f89ec76a8d0e4b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4812, "upload_time": "2018-10-31T19:34:28", "url": "https://files.pythonhosted.org/packages/3f/2f/9d7479be7ab2481f2705df53ea154dee0e823105d1cfb62af5d23463f724/niluclient-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2bc74031e56c44d11add61c5a54606c7", "sha256": "28a6634f8309828c7be4df1078d313dfb5a24277464ba63fdb5906bede269f0e" }, "downloads": -1, "filename": "niluclient-0.1.0.tar.gz", "has_sig": false, "md5_digest": "2bc74031e56c44d11add61c5a54606c7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3852, "upload_time": "2018-10-31T19:34:29", "url": "https://files.pythonhosted.org/packages/4c/f9/87f1941b148c04ac478bd2e83198025394a326245dfcdcf55d215981d3cc/niluclient-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "860afb4c659fc59099e11c125ea04f44", "sha256": "5ececcf5f5337d7c8df3edc74d467de6e1f780f583bd7533e4bc087ac2748c53" }, "downloads": -1, "filename": "niluclient-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "860afb4c659fc59099e11c125ea04f44", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4955, "upload_time": "2018-11-07T20:28:35", "url": "https://files.pythonhosted.org/packages/ca/87/7fb7e89ab1a00a55d3629fffab0b5e14c0f4e1bd7af9296c0c66efe4f091/niluclient-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e405e453a13fb6a667e17f3b3ea84a41", "sha256": "3f53838ef0339aa972f6318cc9cc62cf205ebd09d070a132e0e4d9489050134e" }, "downloads": -1, "filename": "niluclient-0.1.1.tar.gz", "has_sig": false, "md5_digest": "e405e453a13fb6a667e17f3b3ea84a41", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3966, "upload_time": "2018-11-07T20:28:37", "url": "https://files.pythonhosted.org/packages/59/cc/0108881542b208806f44a9eaf446c23c2df10d0bd7d084fa0c0922bb11d8/niluclient-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "0a7c492dc110e06c775323d68f78f35a", "sha256": "497d245a74cc2254c2245cd50a7d8789d6207ed632a2f71e6773078a34825e94" }, "downloads": -1, "filename": "niluclient-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "0a7c492dc110e06c775323d68f78f35a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5027, "upload_time": "2018-12-22T21:15:17", "url": "https://files.pythonhosted.org/packages/1b/80/ca268c11063abaaad2cdb0b69f5aff5ed5a6f22f678c6ac2d7b64edbd6f6/niluclient-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "881c20515082cc9ed80531c4c684a25f", "sha256": "381a0008f325b9c7eac9bcbf002ce56f08c1257db477e12ccb90519219b0d587" }, "downloads": -1, "filename": "niluclient-0.1.2.tar.gz", "has_sig": false, "md5_digest": "881c20515082cc9ed80531c4c684a25f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4029, "upload_time": "2018-12-22T21:15:18", "url": "https://files.pythonhosted.org/packages/80/23/1e1f75cf22d509a9806a717dc8469046a099bcb24a73a4dc9f5b411eff7c/niluclient-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0a7c492dc110e06c775323d68f78f35a", "sha256": "497d245a74cc2254c2245cd50a7d8789d6207ed632a2f71e6773078a34825e94" }, "downloads": -1, "filename": "niluclient-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "0a7c492dc110e06c775323d68f78f35a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5027, "upload_time": "2018-12-22T21:15:17", "url": "https://files.pythonhosted.org/packages/1b/80/ca268c11063abaaad2cdb0b69f5aff5ed5a6f22f678c6ac2d7b64edbd6f6/niluclient-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "881c20515082cc9ed80531c4c684a25f", "sha256": "381a0008f325b9c7eac9bcbf002ce56f08c1257db477e12ccb90519219b0d587" }, "downloads": -1, "filename": "niluclient-0.1.2.tar.gz", "has_sig": false, "md5_digest": "881c20515082cc9ed80531c4c684a25f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4029, "upload_time": "2018-12-22T21:15:18", "url": "https://files.pythonhosted.org/packages/80/23/1e1f75cf22d509a9806a717dc8469046a099bcb24a73a4dc9f5b411eff7c/niluclient-0.1.2.tar.gz" } ] }