Skip to main content

Validate German Tax-ID (Steuer-ID).

Project description

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.

Project details


Download files

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

Source Distribution

steuerid-2.0.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

steuerid-2.0.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file steuerid-2.0.0.tar.gz.

File metadata

  • Download URL: steuerid-2.0.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for steuerid-2.0.0.tar.gz
Algorithm Hash digest
SHA256 48e6e3fdcbe0ca7935ac645f35c6eec89257d174d808641e78d201c20d2e7bd1
MD5 51ea1bd411a4cc93f539c7c24a259db6
BLAKE2b-256 f38f2fc1590ae14de6f0d6d3ddaec0ac53ee87ffacb4c328360a0be9e3d5aac3

See more details on using hashes here.

Provenance

The following attestation bundles were made for steuerid-2.0.0.tar.gz:

Publisher: publish.yml on NumanIjaz/steuerid

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file steuerid-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: steuerid-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for steuerid-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e1501636db84e1eb48f2043bff4798f70a16004eb16174e77b0d6b2fe450c7a7
MD5 c7c8c4b5093e288f9a34685147117991
BLAKE2b-256 2a5149421bf842c218624b41f49873d1ff188e24fb62f5df1d875500b6ae199e

See more details on using hashes here.

Provenance

The following attestation bundles were made for steuerid-2.0.0-py3-none-any.whl:

Publisher: publish.yml on NumanIjaz/steuerid

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page