Welcome to Nager Public Holiday API’s documentation!
Overview
Unofficial Python bindings for the Nager Public Holiday API. The goal is to make interaction with the API as easy as possible.
Installation & Documentation
pip install nagerapi
Documentation can be found at Read the Docs.
Connecting to Nager
Getting a NagerObjectAPI Instance
To connect to the Nager Public Holiday API you use the ~nagerapi.NagerObjectAPI object.
from nagerapi import NagerObjectAPI
nager = NagerObjectAPI()
import nagerapi
nager = nagerapi.NagerObjectAPI()
Usage Examples
Example: List all 2022 US Holidays.
In this one we get the US ~nagerapi.Country Object and call public_holidays from that object.
from nagerapi import NagerObjectAPI
nager = NagerObjectAPI()
country = nager.country("US")
for holiday in country.public_holidays(2022):
print(f"{holiday.name} is on {holiday.date.strftime('%Y-%m-%d')}")
Alternatively you can call public_holidays from the ~nagerapi.NagerObjectAPI object directly providing the country code.
from nagerapi import NagerObjectAPI
nager = NagerObjectAPI()
for holiday in nager.public_holidays(2022, "US"):
print(f"{holiday.name} is on {holiday.date.strftime('%Y-%m-%d')}")
Hyperlinks
Usage & Contributions
Source is available on the Github Project Page.
Contributors to NagerAPI own their own contributions and may distribute that code under the MIT license.
Metadata
Release files for nagerapi 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nagerapi-0.3.1.tar.gz | 7.7 kB | Without provenance | Details for nagerapi-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nagerapi-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for nagerapi-0.3.1-py3-none-any.whl |
Total release size: 14.4 kB
Release files / nagerapi-0.3.1.tar.gz
| Download URL | nagerapi-0.3.1.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
71a50e39df221c2e7778276df48073bff99185fd70e5092cea64015aa502be04
|
|
BLAKE2b-256 checksum How to use checksums |
438459d1a5892f0d2e512ebbe971635fd7bfb43098d504d9cbbba617fd44bcac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.1
|
Release files / nagerapi-0.3.1-py3-none-any.whl
| Download URL | nagerapi-0.3.1-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0a1518a52cde15f43969ce605496355103e3bbad56bceea335c445b5e9a5e2ee
|
|
BLAKE2b-256 checksum How to use checksums |
278b7febf08093ae07e653df9b11f553f9997120753567436a3a9ed5dcec5926
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.1
|
Security for nagerapi 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.