astral icon indicating copy to clipboard operation
astral copied to clipboard

Add an Optional Argument to sun() Function to Return Only Specified Keys

Open qliu-bcs opened this issue 1 year ago • 0 comments

Could we add an optional argument to the sun() function linked below for the users to specify key(s) to return? https://github.com/sffjunkie/astral/blob/3.2/src/astral/sun.py#L1232 https://github.com/sffjunkie/astral/blob/3.2/src/astral/location.py#L225

e.g. If only "sunrise" and "sunset" are needed, we have the option to skip "dawn", "noon", and "dusk" calculation.

This could potentially improve performance by skipping non-needed calculation(s).

qliu-bcs avatar Jan 13 '23 23:01 qliu-bcs