{ "info": { "author": "Cerulean", "author_email": "cerulean.connor@gmail.com", "bugtrack_url": null, "classifiers": [ "Framework :: AsyncIO", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering :: Atmospheric Science" ], "description": "## DarkSky - Async Python 3 Library\nDesigned with native asyncio support, this libary is better suited to those who need better concurrency support than running requests inside `run_in_executor`.\nAs this is an asyncio based libary, we do not plan to support Python 2. The minimum Python version needed is 3.5, [you can download it here](https://www.python.org/downloads/)\n\n## Usage\nYou can use several methods to use this libary, including directly calling the helper function `forecast`. This offers no setup but is significantly slower due to the need to create the client in the background everytime. Its better to just create the client and save it to a variable than using this function.\n\n**Client example**:\n```py\nimport asyncio\nimport darksky_async\n\nasync def main():\n client = darksky_async.Client(\"DarkSky key goes here\")\n\n weather = await client.forecast(\n 37.8267, # latitude\n -122.4233 # longitude\n )\n print(weather.currently)\n print(weather.daily.data[0].timeLocal)\n # time-based items have a local time\n # version that allows you to convert between the two easily\n\nloop = asyncio.get_event_loop()\n\nloop.run_until_complete(client.forecast(latitude, longitude))\n```\n\n**Quick example**:\n```py\nimport asyncio\nimport darksky_async\n\nasync def example_function():\n result = await darksky_async.forecast(key, latitude, longitude, exclude=['minutely', 'hourly'], units='si')\n\nloop = asyncio.get_event_loop()\n\nloop.run_until_complete(example_function())\n```\n\n## Extra features\nAll time-based entries for DataPoint have a local version as well. Thanks to PyTz we can convert the datetime to the local time for quicker and easier access of time.\nAll you need to do to access this local time is append `Local` to any time-based datapoint:\n```py\nweather = await client.forecast(37.8267, -122.4233)\n\nutc_time = weather.daily.data[0].sunriseTime\n>>> '2pm' # Abbreviated for simplicity\nlocal = weather.daily.data[0].sunriseTimeLocal\n>>> '6am' # -8 hours behind UTC, this time is accurate for Los Angeles, USA\n```\n\nThis libary also keeps a track of how much is due. When running a forecast, you can check the current amount due by doing:\n```py\nweather = await client.forecast(lat, lon)\nprint(weather.total_due)\n```\nThe returned amount will be in dollars as per the terms of service [here](https://darksky.net/dev/docs/terms#payments)\nAs a note: this is only the daily cost. We cannot track the *actual* amount owed due to DarkSky having that information on lock down.\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/AggressivelyMeows/darksky_async", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "darksky-async", "package_url": "https://pypi.org/project/darksky-async/", "platform": "", "project_url": "https://pypi.org/project/darksky-async/", "project_urls": { "Homepage": "https://github.com/AggressivelyMeows/darksky_async" }, "release_url": "https://pypi.org/project/darksky-async/1.0.2/", "requires_dist": null, "requires_python": "", "summary": "An async wrapper for DarkSky", "version": "1.0.2" }, "last_serial": 4886359, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "99392e6f9c9232362134c50d0b9b0e7c", "sha256": "334c441f9a9dd8fc1d5b27fd7abc4cfbf10a64732a6b9a0bef0a2718a5a70ec2" }, "downloads": -1, "filename": "darksky_async-1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "99392e6f9c9232362134c50d0b9b0e7c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10671, "upload_time": "2019-03-01T19:49:19", "url": "https://files.pythonhosted.org/packages/75/70/54fa526fee330a6913c41f3833514322644d3eed9baf3c5918a31de0c2f4/darksky_async-1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3d90cbf85f10e920d81ba819db7ca8a7", "sha256": "310fe33a639eede0a8406c241045885f4098d178bf3ab05fe332ea8b46805e4c" }, "downloads": -1, "filename": "darksky_async-1.0.tar.gz", "has_sig": false, "md5_digest": "3d90cbf85f10e920d81ba819db7ca8a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7114, "upload_time": "2019-03-01T19:49:21", "url": "https://files.pythonhosted.org/packages/a4/d2/37ad698af4becbb96467a3f07cd15b370854f819ea9ce281a67977ce1983/darksky_async-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "053af92568797cca98922447dd72b434", "sha256": "d338ceade7a4a317e340a33abb8d1baf273991b25420eeb2281fd15399dfb39d" }, "downloads": -1, "filename": "darksky_async-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "053af92568797cca98922447dd72b434", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10723, "upload_time": "2019-03-01T19:54:41", "url": "https://files.pythonhosted.org/packages/b4/1b/084634f517c5ca8ffc5ea3bd9e94252f803b51ae73f1c4f607dad2d060ec/darksky_async-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1b4d952b844b2cbcb10f81bdf90a7f0d", "sha256": "033fe829f768aa87faa70a81e20c52fdda07bc894c4768838aa11ac74579a636" }, "downloads": -1, "filename": "darksky_async-1.0.1.tar.gz", "has_sig": false, "md5_digest": "1b4d952b844b2cbcb10f81bdf90a7f0d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7157, "upload_time": "2019-03-01T19:54:43", "url": "https://files.pythonhosted.org/packages/92/ff/84935a227e02851eca2e2d5a10c8d2d6f984108e56e637b0272872f85155/darksky_async-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "fe581439ad7ecddff5daf622be8f33d2", "sha256": "df4b75d6b3cdcf9cedf271be4399aed9e1736fa7f31d8086f0738585f6a16b6d" }, "downloads": -1, "filename": "darksky_async-1.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fe581439ad7ecddff5daf622be8f33d2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10689, "upload_time": "2019-03-01T20:00:06", "url": "https://files.pythonhosted.org/packages/0e/4e/975a318e88927034f291f36db7078feae6797b165ea54769a4ce6dd70f99/darksky_async-1.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cdab24408cac95f84de4c1d8f9937c13", "sha256": "50bfb8491b4cc09ae1a9834d0a939e35cd445aff1466816cd38770fa41dbc8ea" }, "downloads": -1, "filename": "darksky_async-1.0.2.tar.gz", "has_sig": false, "md5_digest": "cdab24408cac95f84de4c1d8f9937c13", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7112, "upload_time": "2019-03-01T20:00:08", "url": "https://files.pythonhosted.org/packages/6c/39/d12d5d6ca15e254bb8313a0cb180b90fabc5a882913aebaceb2df1c90303/darksky_async-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fe581439ad7ecddff5daf622be8f33d2", "sha256": "df4b75d6b3cdcf9cedf271be4399aed9e1736fa7f31d8086f0738585f6a16b6d" }, "downloads": -1, "filename": "darksky_async-1.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fe581439ad7ecddff5daf622be8f33d2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10689, "upload_time": "2019-03-01T20:00:06", "url": "https://files.pythonhosted.org/packages/0e/4e/975a318e88927034f291f36db7078feae6797b165ea54769a4ce6dd70f99/darksky_async-1.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cdab24408cac95f84de4c1d8f9937c13", "sha256": "50bfb8491b4cc09ae1a9834d0a939e35cd445aff1466816cd38770fa41dbc8ea" }, "downloads": -1, "filename": "darksky_async-1.0.2.tar.gz", "has_sig": false, "md5_digest": "cdab24408cac95f84de4c1d8f9937c13", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7112, "upload_time": "2019-03-01T20:00:08", "url": "https://files.pythonhosted.org/packages/6c/39/d12d5d6ca15e254bb8313a0cb180b90fabc5a882913aebaceb2df1c90303/darksky_async-1.0.2.tar.gz" } ] }