News for hackers. Stuff that matters.
Re:Show HN: Kreuzberg – Modern async Python library for docu... by nhirschfeld on Saturday February 15, 2025 @11:48AM (#43059936)
Thanks for asking!

It's both. The OCR part is ofc CPU bound, but the entire text extraction involves reading files, or writing and then reading files.

Without async, these simply block.

As for efficiency - if you're working in an async application context you have to "asyncify" these operations or suffer the consequences.

Re:Show HN: Kreuzberg – Modern async Python library for docu... by skavi on Saturday February 15, 2025 @09:54PM (#43064874)
in that case, what’s the deal with extract_bytes being async? i’m not incredibly familiar with python, but i’d expect a “byte string” to be in memory.
Re:Show HN: Kreuzberg – Modern async Python library for docu... by nhirschfeld on Sunday February 16, 2025 @02:41AM (#43066164)
You still need to write it to file to process it via pandoc/tesseract etc.

There are alternative options to tesseract ofc.

Re:Show HN: Kreuzberg – Modern async Python library for docu... by LoganDark on Sunday February 16, 2025 @05:38AM (#43067063)
> You still need to write it to file to process it via pandoc/tesseract etc.

This sounds... I guess Pythonic? Sheesh.