PyUp Safety actively tracks 232,000 Python packages for vulnerabilities and notifies you when to upgrade.
Changed - Fix for [bug 48](https://github.com/sffjunkie/astral/issues/48). As per the bug report the angle to adjust for the effect of elevation should have been θ (not α). - The sun functions can now also be passed the timezone as a string. Previously only a pytz timezone was accepted.
Bug Fix - Fix for bug 44 - Incorrectly raised exception when UTC sun times were on the day previous to the day asked for. This only manifested itself for timezones with a large positive offset.
Refactor - This is a code refactor as well as an update so it is highly likely that you will need to adapt your code to suit. - Astral, AstralGeocoder & GoogleGeocoder classes removed - Requires python 3.6+ due to the use of dataclasses - New LocationInfo class to store a location name, region, timezone, latitude & longitude - New Observer class to store a latitude, longitude & elevation - Geocoder database now returns a LocationInfo instead of a Location
Changed Keywords arguments to Astral **init** are now passed to the geocoder to allow for passing the `api_key` to GoogleGeocoder.
Added Added method to AstralGeocoder to add locations to the database
Changed Corrected version number in module source code.
Added Sun calculations now take into account the elevation of the location.
Added Added command line interface to return sun information as json. Added support for no timezone in Location methods.
Changed Changed GoogleGeocoder test to not use raise...from as this is not valid for Python 2
Changed - Requests is now only needed when using GoogleGeocoder - GoogleGeocoder now requires the `api_key` parameter to be passed to the constructor
Changed - Updated Travis CI configuration Added - requirements-dev.txt
Changed - Added api_key parameter to GoogleGeocoder **init** method. Idea from wpietruszewski https://github.com/sffjunkie/astral/pull/12
Added - this file Changed - dawn_utc, sunrise_utc, sunset_utc and dusk_utc now only raise AstralError for a math domain exception all other exceptions are passed through. - moon_phase now takes another parameter if the type to return either int (the default) or float