Kosmorrolib Documentation

get_events()

Calculate and return a list of events

Signature

def get_events(
    date: datetime.date = datetime.today(),
    timezone: int = 0
) -> [Event]

Arguments

  • date: the date for which the ephemerides must be computed
  • timezone: if set, the datetime returned will be adapted to the given timezone

Return

A list of objects that represent astronomical events.

Examples

Get the events for today:

kosmorrolib.get_events()

Get the events for April 4th, 2020:

kosmorrolib.get_events(date(2020, 4, 4))

See also

Help us to improve this page, contribute to the documentation!