ITADN

Add async support

#109Pull Requesthellerphilipp 创建于 2024-11-10
H
hellerphilippcommented
This PR introduces asynchronous APIs and refactors existing HTTP handling to improve performance and flexibility in `LayoutPDFReader`. Key changes include: - **Unit Tests**: Added tests for `read_pdf` (from URL) to ensure my changes aren't breaking anything. - **Refactor to httpx**: Replaced `urllib3` with `httpx` in `_download_pdf` and `_parse_pdf` for support of asynchronous operations. - **Async Alternatives**: Added `_download_pdf_async`, `_parse_pdf_async`, and `read_pdf_async`, allowing non-blocking operations for both HTTP requests and local file reading. This PR resolves issue #44.
合并状态:未合并 1 条评论