Skip to main content

sdb-reader

Reads German safety data sheets (Sicherheitsdatenblätter) under REACH and CLP from PDF files, without a language model: the same file always gives the same result, and every rule the reader follows is written down.

Deutsch: README.de.md

sdb-reader read sheet.pdf

For each PDF it says:

  • what the file is: a German safety data sheet, a safety information, a safety data sheet in another language, or another document;
  • the classification that section 2 states;
  • the label: signal word, pictograms, and the H, P and EUH statements, with the sheet's wording beside the regulation's;
  • dates and version, the countries the sheet is issued for, and the supplier;
  • what is wrong with the sheet as a document: revised before 2021, no readable date, a classification and a label that contradict each other, a statement worded differently from the regulation.

The result is JSON. Warnings and findings come as a fixed code with a sentence, in German or English. To read a sheet yourself, show prints the same as a report:

sdb-reader show sheet.pdf

What it handles says on one page, without technical terms, what the reader does.

Why not just give the PDF to a language model?

For a single sheet you look at yourself, that works well. In a test in November 2026 on 30 difficult sheets, current large commercial models read the supplier, the date and the codes printed on the label almost without error, and so did the smaller models of the same providers. sdb-reader is for when you read many sheets and act on the result: decide whether a product may be sold, fill a shop or a database, check a supplier's sheets. Then a few things matter that a model does not give you:

  • One rule instead of a model's judgement. Many labels print some statements only as a sentence, without the code. Asked for "the codes", one model names the code of such a sentence, another leaves it out, a third guesses: in the same test, an open model listed six precautionary codes for a spray that its label does not print, and none on a second run with the same input. sdb-reader applies a fixed rule and says for each code whether the sheet prints it or the reader assigned it from the sentence.
  • The same sheet, the same answer. A model may answer differently on a second run. sdb-reader reads a file the same way every time, so a result you act on today is the result you get tomorrow.
  • Every value can be traced. Each part of a reading comes from a numbered, tested rule. A wrong reading is a rule to fix, not a question to ask again.
  • Thousands of sheets, no cost per page, offline. A large commercial model costs a few cents per sheet; a model on your own computer costs time and is less reliable. sdb-reader runs on an ordinary computer and sends no sheet anywhere.
  • A fixed format with findings. The result is JSON with a published schema, with fixed codes for every warning and finding, including where a sheet falls short of the CLP Regulation.

What kind of model it takes. If you use a model anyway: current models from the large providers read sheets very well, their small and cheap ones included. Open models run on your own computer did noticeably worse in the same test, even on a high-end workstation with 128 GB of memory, the most that ordinary desktop and laptop computers offer (we tried models of about 27 billion parameters and a larger mixture-of-experts model). They read printed codes reliably, but where a label prints only sentences, they leave statements out or guess. Open models too large for such a machine were not tested. Asking for a word-for-word quote of each sentence and checking it against the text catches most guesses, but also drops correct answers where the sheet words a statement differently from the regulation. (As of 2026; models change quickly.)

sdb-reader ask puts a sheet to a model of your choice and keeps its answer beside the reading, so the two can be compared. How it works explains more.

The idea behind it. The reader gives what a sheet prints and reports, separately, where the sheet falls short of the regulation; what to do about it stays with you. How it works describes the philosophy behind it.

Documentation

The documentation is at https://foerdebaumarkt.github.io/sdb-reader/, one edition per released version. The same pages are in the repository under docs/.

You want to Read
run the command and understand what it prints Using the command line, in German: Bedienung
read sheets from a Python program Using the library
see what the reader deals with What it handles, in German: Was es abdeckt
understand how a file becomes a reading How it works
change the reader Contributing
know what a version changed CHANGELOG.md
read the binding rules specs/, in German

Install

Needs Python 3.12 or newer. Install it from the Python Package Index:

uv tool install sdb-reader

Scanned sheets are read by text recognition, which needs tesseract with German language data. Installing has the details.

Limits

  • German sheets only. A sheet in another language is recognised as one and not read.
  • It reads one file at a time. Which sheets belong to one product is for the program that uses it; the library then chooses the current one among them.
  • Whether a product needs a safety data sheet is read from the classification and the label. Section 2.3 (PBT, vPvB, candidate list) is not read.
  • An older sheet in another language, without numbered subsections, counts as a document.
  • A form in two columns without colons is read as label and value in section 1 only. In the other sections of such a sheet a value may not be found.

Licence

GNU Affero General Public License, version 3 or later (LICENSE). The PDF library the reader is built on, PyMuPDF (installed as pymupdf-lite), is under the AGPL, so a program that uses this package takes on its obligations.

Copyright © 2026 Förde-Baumarkt Holger Claussen GmbH & Co. KG (service@foerde-baumarkt.de). NOTICE names the copyright holder and the source of the regulation's wording that the package carries.

Metadata

Release files for sdb-reader 0.13.0

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

Source distribution (sdist)

Source distribution for sdb-reader 0.13.0
File Size Uploaded Provenance Actions
sdb_reader-0.13.0.tar.gz 281.2 kB With provenance Details for sdb_reader-0.13.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sdb-reader 0.13.0
File Interpreter ABI Platform Actions
sdb_reader-0.13.0-py3-none-any.whl Python 3 none any Details for sdb_reader-0.13.0-py3-none-any.whl

Total release size: 561.3 kB

Release files / sdb_reader-0.13.0.tar.gz

Download URL sdb_reader-0.13.0.tar.gz
Size 281.2 kB
Tags Source
SHA-256 checksum
How to use checksums
36134330f0f2e663c7e0a523984c522cb34cf53a8d2a1c87ed55488215c4b94b
BLAKE2b-256 checksum
How to use checksums
d6c64e3e7c2f56d8ad9688072659cbfe294f57e2ba21c0cf3c9f9362acbe403d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / sdb_reader-0.13.0-py3-none-any.whl

Download URL sdb_reader-0.13.0-py3-none-any.whl
Size 280.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
04361c42c4bc154c8c0052a9cf1f7b3b661962325c412e8f09c6954d2bc2b346
BLAKE2b-256 checksum
How to use checksums
ff42f4d4a56b27a01c8b17ff563e0566bd709947579dbb138a83e3e1261f7c35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Security for sdb-reader 0.13.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sdb_reader-0.13.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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