Skip to main content
Linux Build Status Windows Build Status Code Coverage

Unofficial library for the Salling Group Holidays API

Unofficial Python 3 library for the Salling Group Holidays API.

The API supports fetching Danish holidays for a given date or range of dates. This library simply provides an abstraction over that API.

Installation

To install this library, type the following into the command prompt:

$ pip install salling-group-holidays

Usage

First of all, an API key is needed to use the Salling Group Holidays API. Contact Salling Group to receive your API key.

Once you have received your key, you can start using this library. Usage is fairly simple. Start by getting an API instance:

import salling_group_holidays

API_KEY = 'your_api_key'
v1 = salling_group_holidays.v1(API_KEY)

To see if a given date is a holiday, use a Python datetime.date object. and call the is_holiday method. For example, to see if today is a Danish holiday:

from datetime import date
import salling_group_holidays

v1 = salling_group_holidays.v1(API_KEY)

if v1.is_holiday(date.today()):
  print('Great news. No work today!')
else:
  print('Get back to work. No holiday today.')

To get a list of holidays for a given period, call the holidays method with a start and end date as a Python datetime.date object. This method returns a Python dictionary with the holiday dates as the key and the name of the day as well as whether it is a holiday. For example to get the list of Danish holidays in December 2018:

from datetime import date
import salling_group_holidays

v1 = salling_group_holidays.v1(API_KEY)
holidays = v1.holidays(date(2018, 12, 1), date(2018, 12, 31))

print('There are {} holidays in December 2018.'.format(len(holidays)))
print('December 25th is {}'.format(holidays[date(2018, 12, 25)]['name']))

Will output:

There are 4 holidays in December 2018
December 25th is 1. juledag.

Metadata

Release files for salling-group-holidays 0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for salling-group-holidays 0.4
File Size Uploaded Provenance Actions
salling-group-holidays-0.4.linux-x86_64.tar.gz 4.2 kB Without provenance Details for salling-group-holidays-0.4.linux-x86_64.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for salling-group-holidays 0.4
File Interpreter ABI Platform Actions
salling_group_holidays-0.4-py3-none-any.whl Python 3 none any Details for salling_group_holidays-0.4-py3-none-any.whl

Total release size: 8.6 kB

Release files / salling-group-holidays-0.4.linux-x86_64.tar.gz

Download URL salling-group-holidays-0.4.linux-x86_64.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3b4b2bc66b4a6f00f440e095e2e0967217a3208c6f6a7f9b3c277f178dfd7fce
BLAKE2b-256 checksum
How to use checksums
8aeb5c9bffe8f92715760b91e3c75df3117929fb13b2fdac2c9b453a4b8dd4e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

Release files / salling_group_holidays-0.4-py3-none-any.whl

Download URL salling_group_holidays-0.4-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0b5ada615d6e18c0157c5aad038098b17f7bdc94a82c03be99460054272419c2
BLAKE2b-256 checksum
How to use checksums
0280573ab66802001f51f6c73085f3712585b2591801daf433766ed89b897e35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

Security for salling-group-holidays 0.4

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page