Skip to content

NumanIjaz/steuerid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tests Python versions

Steuer-ID

Validates the German Tax-ID (Steuerliche Identifikationsnummer, short: Steuer-ID) using Python.

Based on the official ELSTER documentation (chapter: 2).

Note

This package validates solely the syntax and check digit of the provided input. It does not confirm, that the validated Steuer-ID was assigned to a person. Please contact the Bundeszentralamt für Steuern in case you are unsure about your Steuer-ID.

Usage

An example of how it can be used:

from steuerid import SteuerId

validation_result = SteuerId.validate("02476291358")

print(validation_result) # (True, None) -> the provided input is a valid steuer id

validation_result = SteuerId.validate("x1234567890")
print(validation_result) # (False, OnlyDigitsAllowedException) -> invalid input, only digits are allowed

Test-Steuer-IDs

Support for test Steuer-IDs (starting with 0) is enabled by default. Test Steuer-IDs are typically invalid in production. It is recommended to disable them with the following environment variable:

STEUERID_PRODUCTION=true

Development

For development first clone the repo. It is recommended to create a virtual env and activate that virtual env. Inside the venv install the dependencies using poetry install command.

Testing

Execute pytest to run the unit tests:

pytest

Credits

License

The MIT License (MIT). Please see License File for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages