mirror of
https://github.com/holidayapi/holidayapi-python.git
synced 2025-06-21 04:16:32 +00:00
* Updated copyright years / company name on LICENSE. * Fixed up spacing in the README. * Bumped version number.
31 lines
470 B
Markdown
31 lines
470 B
Markdown
# python-holidayapi
|
|
Official Python library for Holiday API
|
|
|
|
## Installation
|
|
|
|
```shell
|
|
pip install python-holidayapi
|
|
```
|
|
|
|
## Usage
|
|
|
|
```python
|
|
import holidayapi
|
|
|
|
hapi = holidayapi.v1('_YOUR_API_KEY_')
|
|
|
|
parameters = {
|
|
# Required
|
|
'country': 'US',
|
|
'year': 2016,
|
|
# Optional
|
|
# 'month': 7,
|
|
# 'day': 4,
|
|
# 'previous': True,
|
|
# 'upcoming': True,
|
|
# 'public': True,
|
|
# 'pretty': True,
|
|
}
|
|
|
|
holidays = hapi.holidays(parameters)
|
|
```
|