Skip to main content

Python client library for ferien-api.de

Project description

ferien-api

PyPI version Build Status License: MIT

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ferien-api, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size ferien-api-0.1.0.tar.gz (3.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page