Python client library for ferien-api.de
Project description
ferien-api
Python client library for ferien-api.de
Installation
ferien-api
needs python 3.4 or higher to function properly
pip install ferien-api
Usage
import ferien
# Get all vacations for all time and states
print("All vacations:", ferien.all_vacations())
# Get all vacations for a specific state (in this case Hamburg - HH) ...
print("All vacations for HH:", ferien.state_vacations('HH'))
# ... and optionally for a specific year
print("All vacations for HH in 2019:", ferien.state_vacations('HH', 2019))
# Fetch all valid states
print("Valid state codes:", ferien.state_codes())
Both functions all_vacations
and state_vacations
will return a list of Vacation
data objects.
See below for the definition of a Vacation
object.
Vacation(
start=datetime.datetime(2020, 12, 21, 0, 0),
end=datetime.datetime(2021, 1, 5, 0, 0),
year=2020,
state_code='HH',
name='weihnachtsferien',
slug='weihnachtsferien-2020-HH'
)
Changelog
0.1.0
- Initial version
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ferien-api-0.1.0.tar.gz
(3.5 kB
view details)
File details
Details for the file ferien-api-0.1.0.tar.gz
.
File metadata
- Download URL: ferien-api-0.1.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f06759c9b23e963eceec36ffe4122fc0b268917ebcd42072eb61f2d35e4a4849 |
|
MD5 | caee8214de2687a0566c71e6f97f6def |
|
BLAKE2b-256 | 542a5b418cc03f95a3cef343cee7dbe7151b3bc99616856f76330e27867d3180 |