API reference

Event

class iepy.Event(date, year, language, summary, description='')

Event class, for events that happened

date

The date of the event (day, month)

Type

Union[datetime.date, datetime.datetime, Date]

year

The year when the event happened.

Type

int

language

The language of the summary and description.

Type

str

summary

A short summary of the event.

Type

str

description

A optional longer description of the event.

Type

Optional[str]

Date

class iepy.Date(month, day)

Concrete date type.

Constructors

__new__() fromtimestamp() today() fromordinal() cast()

Operators

__repr__, __str__ __eq__, __le__, __lt__, __ge__, __gt__, __hash__ __add__, __radd__, __sub__ (add/radd only with timedelta arg)

Methods

timetuple() toordinal() weekday() isoweekday(), isocalendar(), isoformat() ctime() strftime()

Properties (readonly)

month, day

classmethod cast(other)

Constructor to make this class from other datatypes

classmethod fromisoformat(date_string: str)

str -> Construct a date from the output of date.isoformat()

classmethod fromtimestamp(t)

timestamp -> local date from a POSIX timestamp (like time.time()).

isoformat()

Return string in ISO 8601 format, YYYY-MM-DD.

Get Events

iepy.getEvents()

Gets event that happend on date

Parameters

date (Union[datetime.date, datetime.datetime, Date]) – Date of the event, only the day and month are used.

iepy.getTodayEvents()

Gets events that happend today.

iepy.tweetEvent(consumerKey: str, consumerSecret: str, accessToken: Optional[str] = None, accessTokenSecret: Optional[str] = None)

Tweets the given event

Parameters
  • event (Event) – Event to be tweeted.

  • consumerKey (str) – Consumer key of your Twitter app

  • consumerSecret (str) – Consumer secret of your Twitter app

  • accessToken (Optional[str]) – Access token for the user you want to tweet

  • accessTokenSecret (Optional[str]) – Access token secret for the user you want to tweet

Note

If accessToken or accessTokenSecret is not supplied you will be promted with a link to go too and then enter a verifier.