{ "info": { "author": "Zach Adams", "author_email": "zach@okzach.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5" ], "description": "# datesuninfo\r\n\r\nMimics PHPs `date_sun_info()` using python and `ephem`.\r\n\r\nSunrise, solar noon, sunset, and twilight start/end times for a given location and datetime.\r\n\r\n## Example\r\n\r\n```python\r\nimport datetime\r\nimport pytz\r\nfrom datesuninfo import date_sun_info\r\n\r\n# Get the current time in utc and assign it the pytz utc time zone\r\ncalc_date = datetime.datetime.utcnow().replace(tzinfo=pytz.utc)\r\n# Shift the calc_date to Central time zone\r\ncalc_date = calc_date.astimezone(pytz.timezone('US/Central'))\r\n# Get the date_sun_info for Moore, OK using the current time in the central time zone.\r\nsun_info = date_sun_info(latitude='35.3484055', longitude='-97.48163', calc_date=calc_date)\r\n\r\nprint('Sunrise: {0}'.format(sun_info['sunrise']))\r\nprint('Solar Noon: {0}'.format(sun_info['transit']))\r\nprint('Sunset: {0}'.format(sun_info['sunset']))\r\nprint(sun_info.keys())\r\n```\r\noutputs:\r\n```\r\nSunrise: 2016-02-26 07:03:57.190347-06:00\r\nSolar Noon: 2016-02-26 12:42:50.328314-06:00\r\nSunset: 2016-02-26 18:22:14.118211-06:00\r\n['civil_twilight_end', 'nautical_twilight_end', 'transit', 'previous_sunset', 'sunset', 'next_sunrise', 'astronomical_twilight_begin', 'astronomical_twilight_end', 'civil_twilight_begin', 'sunrise', 'nautical_twilight_begin']\r\n```\r\n\r\n## History\r\n\r\nThis is a functional work-in-progress. I use it for personal projects; that is the purpose it serves.\r\n\r\nThe last time this project saw love was early April 2016.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/okzach/datesuninfo/", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "datesuninfo", "package_url": "https://pypi.org/project/datesuninfo/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/datesuninfo/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/okzach/datesuninfo/" }, "release_url": "https://pypi.org/project/datesuninfo/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "Mimics PHPs date_sun_info() using pyephem.", "version": "0.1.0" }, "last_serial": 2040373, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "96a2c597f9a6410c0c14d5613e07ecde", "sha256": "fec650813cf0d1948d455fc06ecab3b64d5844e0e160e7fae6364de3d52bb891" }, "downloads": -1, "filename": "datesuninfo-0.1.0.zip", "has_sig": false, "md5_digest": "96a2c597f9a6410c0c14d5613e07ecde", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6150, "upload_time": "2016-04-01T14:25:07", "url": "https://files.pythonhosted.org/packages/7c/fe/1dc401736d5aee75daba5957e072b65a649c676c2c9ce8c47f1a644426d4/datesuninfo-0.1.0.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "96a2c597f9a6410c0c14d5613e07ecde", "sha256": "fec650813cf0d1948d455fc06ecab3b64d5844e0e160e7fae6364de3d52bb891" }, "downloads": -1, "filename": "datesuninfo-0.1.0.zip", "has_sig": false, "md5_digest": "96a2c597f9a6410c0c14d5613e07ecde", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6150, "upload_time": "2016-04-01T14:25:07", "url": "https://files.pythonhosted.org/packages/7c/fe/1dc401736d5aee75daba5957e072b65a649c676c2c9ce8c47f1a644426d4/datesuninfo-0.1.0.zip" } ] }