Every scoring job I have written ends up next to a spreadsheet, a warehouse table or an export that someone emails at the end of the month. A python data pipeline is where text actually lives, so Python got the port before any other language.
Code: ReadSightPy, MIT licensed.
Python 3.10, two runtime dependencies, 133 tests, mypy strict, ruff clean. Five decisions shaped it.
Reason 1: two dependencies, both unavoidable
regex handles Unicode letter classes that the standard re module does not, and platformdirs puts the compiled pattern cache in the right directory per operating system. Everything else is in the standard library.
A data pipeline fails on a rebuild with a pinned version more often than on logic. Every dependency removed is a class of failure removed, and two well-known packages are a price I can state.
Reason 2: the API speaks Python
ReadSight("en-us"), rs.gunning_fog(text), result.grade_level, result.inputs as a dict. A Python developer should not have to translate method names to use a port.
Idioms differ: Python raises where Rust returns Result, and that is correct for both. What must not differ is the number and the meaning of the fields around it.
Reason 3: the result carries its inputs
FormulaResult holds the score, the grade level, the interpretation, the formula name, the language code and a dictionary of intermediate values: words, sentences, syllables, letters, polysyllables.
In a pipeline the intermediates are the debugging tool. A grade of 16 on Coleman-Liau is a verdict; the dict says which count produced it, and that decides whether the text or the check is wrong.
Reason 4: cache in the right place
Compiled patterns go to the platform cache directory, and Config can move them. On a build agent that means baking a warm cache into the image; locally it means the first run takes a minute and the rest take a second.
Putting a cache in the working directory is the default that breaks a read-only container. The library does not make that choice for the user.
Reason 5: types checked, suite honest
mypy --strict with zero errors, ruff with zero findings, 133 tests including parity vectors from the PHP reference. Golden vectors cover supported formula lists, analyze metrics, every applicable formula and syllable vectors.
Strict typing earns its place when a batch calls three methods a hundred thousand times. A wrong type in one branch does not crash: it returns a score for the wrong language, and nobody notices until a report looks strange.
What Python is good for here
Reading a CSV, joining with a warehouse table, grouping by language, writing a report. The scorer is a small part of that script, and a small part should not arrive with a dependency graph.
The performance numbers are modest and sufficient: about a millisecond for a 45-word text, ten to build an engine from cache. A batch is dominated by the database either way.
What it cannot do
It does not judge structure, grammar or whether the argument holds. It scores text and names its approximations, including the TeX syllable count that is exact for line breaks and approximate for phonetics.
The same boundary exists in every language of the family, and a pipeline that forgets it produces a number where a decision was needed.
That boundary is the same in every language of the family, which is the point of the ports: one definition, many runtimes, no drifting numbers.
Related: porting a library for the rules that keep the ports equal, and readability library for the canonical PHP library.