Country

class nagerapi.Country(nager, data)[source]

Represents a single Holiday.

Variables:
  • name (str) – Common Name of the Country.

  • code (str) – ISO 3166-1 alpha-2 Country Code.

  • official (str) – Official Name of the Country.

  • region (str) – Region of the Country.

  • borders (List[Country]) – List of Counties the border the Country.

load_details()[source]

Loads the details for the country.

long_weekends(year: int)[source]

Alias for long_weekends() for this country.

public_holidays(year: int)[source]

Alias for public_holidays() for this country.

is_today_public_holiday(offset: Optional[int] = None)[source]

Alias for is_today_public_holiday() for this country.

next_public_holidays()[source]

Alias for next_public_holidays() for this country.

Holiday

class nagerapi.Holiday(nager, data)[source]

Represents a single Holiday.

Variables:
  • name (str) – English Name of the Holiday.

  • local_name (str) – Local name of the Holiday.

  • date (datetime) – Date of the Holiday.

  • code (str) – ISO 3166-1 alpha-2 Country Code for the Holiday.

  • country (Country) – Country Object for the ISO 3166-1 alpha-2 Country Code.

  • fixed_holiday (bool) – Is this public holiday every year on the same date.

  • global_holiday (bool) – Is this public holiday in every county (Federal State).

  • counties (List[str]) – List of Counties (ISO-3166-2 - Federal States).

  • launch_year (int) – The launch year of the public holiday.

  • types (List[str]) – A list of types the public holiday it is valid.

  • is_public (bool) – “Public” type is in types.

  • is_bank (bool) – “Bank” type is in types.

  • is_school (bool) – “School” type is in types.

  • is_authorities (bool) – “Authorities” type is in types.

  • is_optional (bool) – “Optional” type is in types.

  • is_observance (bool) – “Observance” type is in types.

Weekend

class nagerapi.Weekend(nager, data)[source]

Represents a single Long Weekend.

Variables:
  • start_date (datetime) – Start Date of the Long Weekend.

  • end_date (datetime) – End Date of the Long Weekend.

  • day_count (int) – Days in the Long Weekend.

  • need_bridge_day (bool) – Is a Bridge Day needed for the Long Weekend.

NagerException

class nagerapi.NagerException[source]

Base class for all Nagar exceptions.