holiday-event-api


Nameholiday-event-api JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/westy92/holiday-event-api-python
SummaryThe Official Holiday and Event API for Python
upload_time2022-12-14 04:20:39
maintainerSeth Westphal
docs_urlNone
authorSeth Westphal
requires_python>=3.7, <4
licenseMIT
keywords python holiday holidays public federal official unofficial date month year day calendar api holidayapi list event occurrence celebration description details checkiday international national world popular trusted accurate free best
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # The Official Holiday and Event API for Python

[![PyPI](https://img.shields.io/pypi/v/holiday-event-api)](https://pypi.org/project/holiday-event-api)
[![Supported Versions](https://img.shields.io/pypi/pyversions/holiday-event-api.svg)](https://pypi.org/project/holiday-event-api)
[![Build Status](https://github.com/westy92/holiday-event-api-python/actions/workflows/github-actions.yml/badge.svg)](https://github.com/westy92/holiday-event-api-python/actions)
[![Code Coverage](https://codecov.io/gh/westy92/holiday-event-api-python/branch/main/graph/badge.svg)](https://codecov.io/gh/westy92/holiday-event-api-python)
[![Known Vulnerabilities](https://snyk.io/test/github/westy92/holiday-event-api-python/badge.svg)](https://snyk.io/test/github/westy92/holiday-event-api-python)
[![Funding Status](https://img.shields.io/github/sponsors/westy92)](https://github.com/sponsors/westy92)

Industry-leading Holiday and Event API for Python. Over 5,000 holidays and thousands of descriptions. Trusted by the World’s leading companies. Built by developers for developers since 2011.

## Supported Python Versions
Latest version of the the Holiday and Event API supports all actively-maintained Python [releases](https://devguide.python.org/versions/) and might work with older versions. It also supports PyPy versions `3.7`, `3.8`, and `3.9`.

## Authentication

Access to the Holiday and Event API requires an API Key. You can get for one for FREE [here](https://apilayer.com/marketplace/checkiday-api#pricing), no credit card required! Note that free plans are limited. To access more data and have more requests, a paid plan is required.

## Installation

The Holiday and Event API is available on PyPI:
```console
$ python -m pip install holiday-event-api
```

## Example

```python
import holidays


try:
    # Get a FREE API key from https://apilayer.com/marketplace/checkiday-api#pricing
    client = holidays.client('<Your API Key Here>')

    # Get Events for a given Date
    events = client.getEvents(
        # These parameters are the defaults but can be specified:
        # date='today',
        # timezone='America/Chicago',
        # adult=False,
    )

    event = events.events[0]
    print(f"Today is {event.name}! Find more information at: {event.url}.")
    print(f"Rate limits remaining: {events.rateLimit.remainingMonth}/{events.rateLimit.limitMonth} (month).")

    # Get Event Information
    eventInfo = client.getEventInfo(
        id=event.id,
        # These parameters can be specified to calculate the range of eventInfo.Event.Occurrences
        # start=2020,
        # end=2030,
    )

    print(f"The Event's hashtags are {eventInfo.event.hashtags}.")

    # Search for Events
    query = "pizza day"
    search = client.search(
        query=query,
        # These parameters are the defaults but can be specified:
        # adult=False,
    )

    print(f"Found {len(search.events)} events, including {search.events[0].name}, that match the query '{query}'.")
except Exception as e:
    print(f"There was an error: {e}")
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/westy92/holiday-event-api-python",
    "name": "holiday-event-api",
    "maintainer": "Seth Westphal",
    "docs_url": null,
    "requires_python": ">=3.7, <4",
    "maintainer_email": "",
    "keywords": "python,holiday,holidays,public,federal,official,unofficial,date,month,year,day,calendar,api,holidayapi,list,event,occurrence,celebration,description,details,checkiday,international,national,world,popular,trusted,accurate,free,best",
    "author": "Seth Westphal",
    "author_email": "seth@sethwestphal.com",
    "download_url": "https://files.pythonhosted.org/packages/4d/f8/7285a652ec9576726db505db663d988c4c82f88c7e11c667a76d52e99dee/holiday-event-api-1.0.1.tar.gz",
    "platform": null,
    "description": "# The Official Holiday and Event API for Python\n\n[![PyPI](https://img.shields.io/pypi/v/holiday-event-api)](https://pypi.org/project/holiday-event-api)\n[![Supported Versions](https://img.shields.io/pypi/pyversions/holiday-event-api.svg)](https://pypi.org/project/holiday-event-api)\n[![Build Status](https://github.com/westy92/holiday-event-api-python/actions/workflows/github-actions.yml/badge.svg)](https://github.com/westy92/holiday-event-api-python/actions)\n[![Code Coverage](https://codecov.io/gh/westy92/holiday-event-api-python/branch/main/graph/badge.svg)](https://codecov.io/gh/westy92/holiday-event-api-python)\n[![Known Vulnerabilities](https://snyk.io/test/github/westy92/holiday-event-api-python/badge.svg)](https://snyk.io/test/github/westy92/holiday-event-api-python)\n[![Funding Status](https://img.shields.io/github/sponsors/westy92)](https://github.com/sponsors/westy92)\n\nIndustry-leading Holiday and Event API for Python. Over 5,000 holidays and thousands of descriptions. Trusted by the World\u2019s leading companies. Built by developers for developers since 2011.\n\n## Supported Python Versions\nLatest version of the the Holiday and Event API supports all actively-maintained Python [releases](https://devguide.python.org/versions/) and might work with older versions. It also supports PyPy versions `3.7`, `3.8`, and `3.9`.\n\n## Authentication\n\nAccess to the Holiday and Event API requires an API Key. You can get for one for FREE [here](https://apilayer.com/marketplace/checkiday-api#pricing), no credit card required! Note that free plans are limited. To access more data and have more requests, a paid plan is required.\n\n## Installation\n\nThe Holiday and Event API is available on PyPI:\n```console\n$ python -m pip install holiday-event-api\n```\n\n## Example\n\n```python\nimport holidays\n\n\ntry:\n    # Get a FREE API key from https://apilayer.com/marketplace/checkiday-api#pricing\n    client = holidays.client('<Your API Key Here>')\n\n    # Get Events for a given Date\n    events = client.getEvents(\n        # These parameters are the defaults but can be specified:\n        # date='today',\n        # timezone='America/Chicago',\n        # adult=False,\n    )\n\n    event = events.events[0]\n    print(f\"Today is {event.name}! Find more information at: {event.url}.\")\n    print(f\"Rate limits remaining: {events.rateLimit.remainingMonth}/{events.rateLimit.limitMonth} (month).\")\n\n    # Get Event Information\n    eventInfo = client.getEventInfo(\n        id=event.id,\n        # These parameters can be specified to calculate the range of eventInfo.Event.Occurrences\n        # start=2020,\n        # end=2030,\n    )\n\n    print(f\"The Event's hashtags are {eventInfo.event.hashtags}.\")\n\n    # Search for Events\n    query = \"pizza day\"\n    search = client.search(\n        query=query,\n        # These parameters are the defaults but can be specified:\n        # adult=False,\n    )\n\n    print(f\"Found {len(search.events)} events, including {search.events[0].name}, that match the query '{query}'.\")\nexcept Exception as e:\n    print(f\"There was an error: {e}\")\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "The Official Holiday and Event API for Python",
    "version": "1.0.1",
    "split_keywords": [
        "python",
        "holiday",
        "holidays",
        "public",
        "federal",
        "official",
        "unofficial",
        "date",
        "month",
        "year",
        "day",
        "calendar",
        "api",
        "holidayapi",
        "list",
        "event",
        "occurrence",
        "celebration",
        "description",
        "details",
        "checkiday",
        "international",
        "national",
        "world",
        "popular",
        "trusted",
        "accurate",
        "free",
        "best"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "8d8ab8a823df9422b638f064a298ab71",
                "sha256": "59836507b7eb790ad1da91078f12f97ee5c69faaeae17c25eaccf091e8c2c882"
            },
            "downloads": -1,
            "filename": "holiday_event_api-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8d8ab8a823df9422b638f064a298ab71",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7, <4",
            "size": 6095,
            "upload_time": "2022-12-14T04:20:38",
            "upload_time_iso_8601": "2022-12-14T04:20:38.114641Z",
            "url": "https://files.pythonhosted.org/packages/0c/61/be6ede1480d9f861750207114208cefbe57cb09abea12783d1ef7b4d629d/holiday_event_api-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "a59bbfb5a150cb4cfd796eae94ee3fec",
                "sha256": "bd409d5f37b05c7a76a31f68a65c731f1390156d257eb6754ee2f09f1d38ef0c"
            },
            "downloads": -1,
            "filename": "holiday-event-api-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "a59bbfb5a150cb4cfd796eae94ee3fec",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7, <4",
            "size": 6104,
            "upload_time": "2022-12-14T04:20:39",
            "upload_time_iso_8601": "2022-12-14T04:20:39.276362Z",
            "url": "https://files.pythonhosted.org/packages/4d/f8/7285a652ec9576726db505db663d988c4c82f88c7e11c667a76d52e99dee/holiday-event-api-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-14 04:20:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "westy92",
    "github_project": "holiday-event-api-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "holiday-event-api"
}
        
Elapsed time: 0.21885s