Skip to main content

libestg3b

CI Status Documentation Status PyPI

§ 3b of the German Einkommensteuergesetz (EStG) defines the premiums for work on weekends, holidays and special days, like new year. This library takes a list of work hours / shifts (e.g. on 2018-06-03 from 19:00 until 03:00) and returns the premium factor (e.g. 1.5) as well as the relevant time-spans.

As noted in the license, this software is provided without any warranty or guarantee for correctness.

§ 3b des Deutschen Einkommensteuergesetzes (EStG) definiert die Höhe der steuerfreien Zuschläge für Arbeit in der Nacht, an Sonntagen, Feiertagen sowie besonderen Tagen wie Neujahr. Diese Library errechnet aus einer Liste von Arbeitszeiten die Höhe der maximalen Zuschläge.

Diese Software wird, wie in der Lizenz angegeben, ohne Gewähr und Garantie auf Richtigkeit bereitgestellt.

Installation

Install libestg3b via pip:

$ pip install libestg3b

Usage

>>> import datetime as DT
>>> from libestg3b import EStG3b
>>> e = EStG3b('DE')()
>>> e.calculate_shift([datetime(2018, 9, 16, 20), datetime(2018, 9, 17, 2)])
[
    Match(
        start=datetime.datetime(2018, 9, 16, 19, 0),
        end=datetime.datetime(2018, 9, 16, 20, 0),
        rules={<Rule: Sonntagsarbeit>}
    ),
    Match(
        start=datetime.datetime(2018, 9, 16, 20, 0),
        end=datetime.datetime(2018, 9, 17, 0, 0),
        rules={<Rule: Sonntagsarbeit>, <Rule: Nachtarbeit 20:00-06:00>}
    ),
    Match(
        start=datetime.datetime(2018, 9, 17, 0, 0),
        end=datetime.datetime(2018, 9, 17, 2, 0),
        rules={<Rule: Sonntagsarbeit (Montag)>, <Rule: Nachtarbeit 00:00-04:00 (Folgetag)>}
    ),
]

Development

Setup

Using python 3.6, do the following:

$ virtualenv venv --python=python3.6
$ pip install -e ".[dev]"

Usual Tasks

  • make test: run tests (use tox or py.test directly to supply flags like -k)

  • make lint: run pylava and friends

  • make fixlint: sort imports correctly

Releasing a new version

Assuming you have been handed the required credentials, a new version can be released as follows.

  1. adapt the version in setup.py, according to semver.

  2. commit this change as Version 1.2.3

  3. tag the resulting commit as v1.2.3

  4. push the new tag as well as the master branch

  5. update the package on PyPI:

$ rm dist/*
$ python setup.py sdist bdist_wheel
$ twine upload dist/*

Prerequisites

This library is currently python 3.6+. If you would like to use this library with a lower python version, please open an issue. We’re happy to change things around.

Versioning

New version numbers are assigned following semver. All 0.x.y versions are tested and usable, but do not have a stable public interface.

A version 1.0 will be released, once we deem the library stable.

License

All code in this repository is licensed under the MIT license.

Metadata

Release files for libestg3b 0.0.5

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

Source distribution (sdist)

Source distribution for libestg3b 0.0.5
File Size Uploaded Provenance
libestg3b-0.0.5.tar.gz 15.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for libestg3b 0.0.5
File Interpreter ABI Platform
libestg3b-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 28.6 kB

Release files / libestg3b-0.0.5.tar.gz

Download URL libestg3b-0.0.5.tar.gz
Size 15.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c71c4a32ab545596ec0273253ec50a5520bc8be528b42c6b6aebdb68d562b0c5
BLAKE2b-256 checksum
How to use checksums
53a7ccb3f22d599d6812a338348f97529d4ad7e67dcb8b84eccf060c2b2a6174
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.5

Release files / libestg3b-0.0.5-py3-none-any.whl

Download URL libestg3b-0.0.5-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7a69bf4dc2964aafad4f5d2d9a07dbd050c0d69e75eb424b1ccd22fedffa9f29
BLAKE2b-256 checksum
How to use checksums
41df8ee6f80f265971177ac3a6c5fb650db5c370e5f0e371c85f88fa9f0444cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.5

Security for libestg3b 0.0.5

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.

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