PyStreamPDF 2.2.0__tar.gz → 2.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/Cargo.lock +70 -81
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/Cargo.toml +1 -1
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/PKG-INFO +78 -59
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/README.md +77 -58
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/__init__.py +3 -2
- pystreampdf-2.3.0/python/pystreampdf/_mcp_tools.py +537 -0
- pystreampdf-2.2.0/python/pystreampdf/_mcp_tools.py +0 -271
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/LICENSE +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/core/Cargo.toml +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/core/src/audit.rs +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/core/src/context.rs +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/core/src/document.rs +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/core/src/error.rs +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/core/src/forms.rs +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/core/src/heading_extractor.rs +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/core/src/index.rs +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/core/src/lib.rs +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/core/src/markdown.rs +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/core/src/navigator.rs +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/core/src/page.rs +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/core/src/pdf_parser.rs +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/core/src/security.rs +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/core/src/structure.rs +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/pyproject.toml +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/Cargo.toml +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/_mcp_connector.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/cache.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/cli.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/cli_daemon.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/cli_dashboard.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/excel_export.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/extraction.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/intelligence/__init__.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/intelligence/code_intelligence.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/intelligence/json_intelligence.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/intelligence/log_intelligence.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/intelligence/sql_intelligence.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/intelligence/types.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/intelligence/yaml_intelligence.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/ocr/__init__.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/ocr/manager.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/ocr/pipeline.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/ocr/provider.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/ocr/providers/__init__.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/ocr/providers/paddle.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/ocr/providers/tesseract.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/okf_entity_profiles.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/optimization/__init__.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/optimization/chunking.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/optimization/compressor.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/optimization/metadata.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/optimization/selector.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/pipeline.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/scripts/__init__.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/scripts/post_install.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/semantic/__init__.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/semantic/assembler.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/semantic/citations.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/semantic/entities.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/semantic/graph.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/semantic/relationships.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/semantic/topics.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/semantic/verifier.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/structure/__init__.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/structure/builder.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/structure/exporters.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/structure/recovery.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/structure/relationships.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/token_budget.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/tokenizer.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/validation/__init__.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/validation/layout.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/validation/scorer.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/validation/table.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/validation/text.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/pystreampdf/validation/types.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/src/lib.rs +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/streampdf/cli.py +0 -0
- {pystreampdf-2.2.0 → pystreampdf-2.3.0}/python/streampdf/server.py +0 -0
|
@@ -16,9 +16,9 @@ dependencies = [
|
|
|
16
16
|
|
|
17
17
|
[[package]]
|
|
18
18
|
name = "android_system_properties"
|
|
19
|
-
version = "0.1.
|
|
19
|
+
version = "0.1.5"
|
|
20
20
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
21
|
-
checksum = "
|
|
21
|
+
checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
|
|
22
22
|
dependencies = [
|
|
23
23
|
"libc",
|
|
24
24
|
]
|
|
@@ -31,9 +31,9 @@ checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
|
|
|
31
31
|
|
|
32
32
|
[[package]]
|
|
33
33
|
name = "bitflags"
|
|
34
|
-
version = "2.13.
|
|
34
|
+
version = "2.13.0"
|
|
35
35
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
36
|
-
checksum = "
|
|
36
|
+
checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8"
|
|
37
37
|
|
|
38
38
|
[[package]]
|
|
39
39
|
name = "block-buffer"
|
|
@@ -52,9 +52,9 @@ checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"
|
|
|
52
52
|
|
|
53
53
|
[[package]]
|
|
54
54
|
name = "bytemuck"
|
|
55
|
-
version = "1.25.
|
|
55
|
+
version = "1.25.1"
|
|
56
56
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
57
|
-
checksum = "
|
|
57
|
+
checksum = "d6aedf8ae72766347502cf3cb4f41cf5e9cc37d28bee90f1fdaaae15f9cf9424"
|
|
58
58
|
|
|
59
59
|
[[package]]
|
|
60
60
|
name = "byteorder"
|
|
@@ -76,9 +76,9 @@ checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
|
|
|
76
76
|
|
|
77
77
|
[[package]]
|
|
78
78
|
name = "cc"
|
|
79
|
-
version = "1.
|
|
79
|
+
version = "1.2.67"
|
|
80
80
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
81
|
-
checksum = "
|
|
81
|
+
checksum = "e17dd265a7d0f31ef544e1b20e03add05d3b45b491b633b10d67145d2acc1a38"
|
|
82
82
|
dependencies = [
|
|
83
83
|
"find-msvc-tools",
|
|
84
84
|
"shlex",
|
|
@@ -160,9 +160,9 @@ dependencies = [
|
|
|
160
160
|
|
|
161
161
|
[[package]]
|
|
162
162
|
name = "either"
|
|
163
|
-
version = "1.
|
|
163
|
+
version = "1.16.0"
|
|
164
164
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
165
|
-
checksum = "
|
|
165
|
+
checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e"
|
|
166
166
|
|
|
167
167
|
[[package]]
|
|
168
168
|
name = "errno"
|
|
@@ -188,27 +188,27 @@ checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a"
|
|
|
188
188
|
|
|
189
189
|
[[package]]
|
|
190
190
|
name = "find-msvc-tools"
|
|
191
|
-
version = "0.1.
|
|
191
|
+
version = "0.1.9"
|
|
192
192
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
193
|
-
checksum = "
|
|
193
|
+
checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
|
|
194
194
|
|
|
195
195
|
[[package]]
|
|
196
196
|
name = "futures-core"
|
|
197
|
-
version = "0.3.
|
|
197
|
+
version = "0.3.32"
|
|
198
198
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
199
|
-
checksum = "
|
|
199
|
+
checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d"
|
|
200
200
|
|
|
201
201
|
[[package]]
|
|
202
202
|
name = "futures-task"
|
|
203
|
-
version = "0.3.
|
|
203
|
+
version = "0.3.32"
|
|
204
204
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
205
|
-
checksum = "
|
|
205
|
+
checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393"
|
|
206
206
|
|
|
207
207
|
[[package]]
|
|
208
208
|
name = "futures-util"
|
|
209
|
-
version = "0.3.
|
|
209
|
+
version = "0.3.32"
|
|
210
210
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
211
|
-
checksum = "
|
|
211
|
+
checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6"
|
|
212
212
|
dependencies = [
|
|
213
213
|
"futures-core",
|
|
214
214
|
"futures-task",
|
|
@@ -314,9 +314,9 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
|
|
|
314
314
|
|
|
315
315
|
[[package]]
|
|
316
316
|
name = "js-sys"
|
|
317
|
-
version = "0.3.
|
|
317
|
+
version = "0.3.103"
|
|
318
318
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
319
|
-
checksum = "
|
|
319
|
+
checksum = "53b44bfcdb3f8d5837a46dae1ca9660a837176eee74a28b229bc626816589102"
|
|
320
320
|
dependencies = [
|
|
321
321
|
"cfg-if",
|
|
322
322
|
"futures-util",
|
|
@@ -325,9 +325,9 @@ dependencies = [
|
|
|
325
325
|
|
|
326
326
|
[[package]]
|
|
327
327
|
name = "libc"
|
|
328
|
-
version = "0.2.
|
|
328
|
+
version = "0.2.186"
|
|
329
329
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
330
|
-
checksum = "
|
|
330
|
+
checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
|
|
331
331
|
|
|
332
332
|
[[package]]
|
|
333
333
|
name = "libloading"
|
|
@@ -491,15 +491,15 @@ checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e"
|
|
|
491
491
|
|
|
492
492
|
[[package]]
|
|
493
493
|
name = "portable-atomic"
|
|
494
|
-
version = "1.
|
|
494
|
+
version = "1.13.1"
|
|
495
495
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
496
|
-
checksum = "
|
|
496
|
+
checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
|
|
497
497
|
|
|
498
498
|
[[package]]
|
|
499
499
|
name = "proc-macro2"
|
|
500
|
-
version = "1.0.
|
|
500
|
+
version = "1.0.106"
|
|
501
501
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
502
|
-
checksum = "
|
|
502
|
+
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
|
|
503
503
|
dependencies = [
|
|
504
504
|
"unicode-ident",
|
|
505
505
|
]
|
|
@@ -557,7 +557,7 @@ dependencies = [
|
|
|
557
557
|
"proc-macro2",
|
|
558
558
|
"pyo3-macros-backend",
|
|
559
559
|
"quote",
|
|
560
|
-
"syn
|
|
560
|
+
"syn",
|
|
561
561
|
]
|
|
562
562
|
|
|
563
563
|
[[package]]
|
|
@@ -570,12 +570,12 @@ dependencies = [
|
|
|
570
570
|
"proc-macro2",
|
|
571
571
|
"pyo3-build-config",
|
|
572
572
|
"quote",
|
|
573
|
-
"syn
|
|
573
|
+
"syn",
|
|
574
574
|
]
|
|
575
575
|
|
|
576
576
|
[[package]]
|
|
577
577
|
name = "pystreampdf"
|
|
578
|
-
version = "2.
|
|
578
|
+
version = "2.3.0"
|
|
579
579
|
dependencies = [
|
|
580
580
|
"chrono",
|
|
581
581
|
"pyo3",
|
|
@@ -584,9 +584,9 @@ dependencies = [
|
|
|
584
584
|
|
|
585
585
|
[[package]]
|
|
586
586
|
name = "quote"
|
|
587
|
-
version = "1.0.
|
|
587
|
+
version = "1.0.46"
|
|
588
588
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
589
|
-
checksum = "
|
|
589
|
+
checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368"
|
|
590
590
|
dependencies = [
|
|
591
591
|
"proc-macro2",
|
|
592
592
|
]
|
|
@@ -629,9 +629,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
|
|
629
629
|
|
|
630
630
|
[[package]]
|
|
631
631
|
name = "serde"
|
|
632
|
-
version = "1.0.
|
|
632
|
+
version = "1.0.228"
|
|
633
633
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
634
|
-
checksum = "
|
|
634
|
+
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
|
|
635
635
|
dependencies = [
|
|
636
636
|
"serde_core",
|
|
637
637
|
"serde_derive",
|
|
@@ -639,29 +639,29 @@ dependencies = [
|
|
|
639
639
|
|
|
640
640
|
[[package]]
|
|
641
641
|
name = "serde_core"
|
|
642
|
-
version = "1.0.
|
|
642
|
+
version = "1.0.228"
|
|
643
643
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
644
|
-
checksum = "
|
|
644
|
+
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
|
|
645
645
|
dependencies = [
|
|
646
646
|
"serde_derive",
|
|
647
647
|
]
|
|
648
648
|
|
|
649
649
|
[[package]]
|
|
650
650
|
name = "serde_derive"
|
|
651
|
-
version = "1.0.
|
|
651
|
+
version = "1.0.228"
|
|
652
652
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
653
|
-
checksum = "
|
|
653
|
+
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
|
|
654
654
|
dependencies = [
|
|
655
655
|
"proc-macro2",
|
|
656
656
|
"quote",
|
|
657
|
-
"syn
|
|
657
|
+
"syn",
|
|
658
658
|
]
|
|
659
659
|
|
|
660
660
|
[[package]]
|
|
661
661
|
name = "serde_json"
|
|
662
|
-
version = "1.0.
|
|
662
|
+
version = "1.0.150"
|
|
663
663
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
664
|
-
checksum = "
|
|
664
|
+
checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9"
|
|
665
665
|
dependencies = [
|
|
666
666
|
"itoa",
|
|
667
667
|
"memchr",
|
|
@@ -721,7 +721,7 @@ dependencies = [
|
|
|
721
721
|
|
|
722
722
|
[[package]]
|
|
723
723
|
name = "streampdf-core"
|
|
724
|
-
version = "2.
|
|
724
|
+
version = "2.3.0"
|
|
725
725
|
dependencies = [
|
|
726
726
|
"chrono",
|
|
727
727
|
"pdfium-render",
|
|
@@ -746,17 +746,6 @@ dependencies = [
|
|
|
746
746
|
"unicode-ident",
|
|
747
747
|
]
|
|
748
748
|
|
|
749
|
-
[[package]]
|
|
750
|
-
name = "syn"
|
|
751
|
-
version = "3.0.3"
|
|
752
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
753
|
-
checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3"
|
|
754
|
-
dependencies = [
|
|
755
|
-
"proc-macro2",
|
|
756
|
-
"quote",
|
|
757
|
-
"unicode-ident",
|
|
758
|
-
]
|
|
759
|
-
|
|
760
749
|
[[package]]
|
|
761
750
|
name = "target-lexicon"
|
|
762
751
|
version = "0.12.16"
|
|
@@ -780,14 +769,14 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
|
|
|
780
769
|
dependencies = [
|
|
781
770
|
"proc-macro2",
|
|
782
771
|
"quote",
|
|
783
|
-
"syn
|
|
772
|
+
"syn",
|
|
784
773
|
]
|
|
785
774
|
|
|
786
775
|
[[package]]
|
|
787
776
|
name = "tokio"
|
|
788
|
-
version = "1.
|
|
777
|
+
version = "1.52.3"
|
|
789
778
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
790
|
-
checksum = "
|
|
779
|
+
checksum = "8fc7f01b389ac15039e4dc9531aa973a135d7a4135281b12d7c1bc79fd57fffe"
|
|
791
780
|
dependencies = [
|
|
792
781
|
"bytes",
|
|
793
782
|
"libc",
|
|
@@ -802,13 +791,13 @@ dependencies = [
|
|
|
802
791
|
|
|
803
792
|
[[package]]
|
|
804
793
|
name = "tokio-macros"
|
|
805
|
-
version = "2.7.
|
|
794
|
+
version = "2.7.0"
|
|
806
795
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
807
|
-
checksum = "
|
|
796
|
+
checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496"
|
|
808
797
|
dependencies = [
|
|
809
798
|
"proc-macro2",
|
|
810
799
|
"quote",
|
|
811
|
-
"syn
|
|
800
|
+
"syn",
|
|
812
801
|
]
|
|
813
802
|
|
|
814
803
|
[[package]]
|
|
@@ -830,7 +819,7 @@ checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da"
|
|
|
830
819
|
dependencies = [
|
|
831
820
|
"proc-macro2",
|
|
832
821
|
"quote",
|
|
833
|
-
"syn
|
|
822
|
+
"syn",
|
|
834
823
|
]
|
|
835
824
|
|
|
836
825
|
[[package]]
|
|
@@ -898,9 +887,9 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
|
|
|
898
887
|
|
|
899
888
|
[[package]]
|
|
900
889
|
name = "wasm-bindgen"
|
|
901
|
-
version = "0.2.
|
|
890
|
+
version = "0.2.126"
|
|
902
891
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
903
|
-
checksum = "
|
|
892
|
+
checksum = "4b067c0c11094aef6b7a801c1e34a26affafdf3d051dba08456b868789aaf9a4"
|
|
904
893
|
dependencies = [
|
|
905
894
|
"cfg-if",
|
|
906
895
|
"once_cell",
|
|
@@ -911,9 +900,9 @@ dependencies = [
|
|
|
911
900
|
|
|
912
901
|
[[package]]
|
|
913
902
|
name = "wasm-bindgen-futures"
|
|
914
|
-
version = "0.4.
|
|
903
|
+
version = "0.4.76"
|
|
915
904
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
916
|
-
checksum = "
|
|
905
|
+
checksum = "c62df1340f32221cb9c54d6a27b030e3dba64361d4a95bed55f9aacb44da291d"
|
|
917
906
|
dependencies = [
|
|
918
907
|
"js-sys",
|
|
919
908
|
"wasm-bindgen",
|
|
@@ -921,9 +910,9 @@ dependencies = [
|
|
|
921
910
|
|
|
922
911
|
[[package]]
|
|
923
912
|
name = "wasm-bindgen-macro"
|
|
924
|
-
version = "0.2.
|
|
913
|
+
version = "0.2.126"
|
|
925
914
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
926
|
-
checksum = "
|
|
915
|
+
checksum = "167ce5e579f6bcf889c4f7175a8a5a585de84e8ff93976ce393efa5f2837aab1"
|
|
927
916
|
dependencies = [
|
|
928
917
|
"quote",
|
|
929
918
|
"wasm-bindgen-macro-support",
|
|
@@ -931,31 +920,31 @@ dependencies = [
|
|
|
931
920
|
|
|
932
921
|
[[package]]
|
|
933
922
|
name = "wasm-bindgen-macro-support"
|
|
934
|
-
version = "0.2.
|
|
923
|
+
version = "0.2.126"
|
|
935
924
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
936
|
-
checksum = "
|
|
925
|
+
checksum = "f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e"
|
|
937
926
|
dependencies = [
|
|
938
927
|
"bumpalo",
|
|
939
928
|
"proc-macro2",
|
|
940
929
|
"quote",
|
|
941
|
-
"syn
|
|
930
|
+
"syn",
|
|
942
931
|
"wasm-bindgen-shared",
|
|
943
932
|
]
|
|
944
933
|
|
|
945
934
|
[[package]]
|
|
946
935
|
name = "wasm-bindgen-shared"
|
|
947
|
-
version = "0.2.
|
|
936
|
+
version = "0.2.126"
|
|
948
937
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
949
|
-
checksum = "
|
|
938
|
+
checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24"
|
|
950
939
|
dependencies = [
|
|
951
940
|
"unicode-ident",
|
|
952
941
|
]
|
|
953
942
|
|
|
954
943
|
[[package]]
|
|
955
944
|
name = "web-sys"
|
|
956
|
-
version = "0.3.
|
|
945
|
+
version = "0.3.103"
|
|
957
946
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
958
|
-
checksum = "
|
|
947
|
+
checksum = "8622dcb61c0bcc9fffa6938bed81210af2da9a7e4a1a834b2e37a59b6dfb6141"
|
|
959
948
|
dependencies = [
|
|
960
949
|
"js-sys",
|
|
961
950
|
"wasm-bindgen",
|
|
@@ -982,7 +971,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"
|
|
|
982
971
|
dependencies = [
|
|
983
972
|
"proc-macro2",
|
|
984
973
|
"quote",
|
|
985
|
-
"syn
|
|
974
|
+
"syn",
|
|
986
975
|
]
|
|
987
976
|
|
|
988
977
|
[[package]]
|
|
@@ -993,7 +982,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"
|
|
|
993
982
|
dependencies = [
|
|
994
983
|
"proc-macro2",
|
|
995
984
|
"quote",
|
|
996
|
-
"syn
|
|
985
|
+
"syn",
|
|
997
986
|
]
|
|
998
987
|
|
|
999
988
|
[[package]]
|
|
@@ -1031,22 +1020,22 @@ dependencies = [
|
|
|
1031
1020
|
|
|
1032
1021
|
[[package]]
|
|
1033
1022
|
name = "zerocopy"
|
|
1034
|
-
version = "0.8.
|
|
1023
|
+
version = "0.8.54"
|
|
1035
1024
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1036
|
-
checksum = "
|
|
1025
|
+
checksum = "b7cbbc0a705a0fd05cc3676525980d2bf5a9bc4adac6d6475209a7887cf59d19"
|
|
1037
1026
|
dependencies = [
|
|
1038
1027
|
"zerocopy-derive",
|
|
1039
1028
|
]
|
|
1040
1029
|
|
|
1041
1030
|
[[package]]
|
|
1042
1031
|
name = "zerocopy-derive"
|
|
1043
|
-
version = "0.8.
|
|
1032
|
+
version = "0.8.54"
|
|
1044
1033
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1045
|
-
checksum = "
|
|
1034
|
+
checksum = "e2e817b7b52d0c7358d3246da9d69935ebb18116b2b102b4230dac079b4862f5"
|
|
1046
1035
|
dependencies = [
|
|
1047
1036
|
"proc-macro2",
|
|
1048
1037
|
"quote",
|
|
1049
|
-
"syn
|
|
1038
|
+
"syn",
|
|
1050
1039
|
]
|
|
1051
1040
|
|
|
1052
1041
|
[[package]]
|
|
@@ -1057,9 +1046,9 @@ checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
|
|
|
1057
1046
|
|
|
1058
1047
|
[[package]]
|
|
1059
1048
|
name = "zune-core"
|
|
1060
|
-
version = "0.5.
|
|
1049
|
+
version = "0.5.1"
|
|
1061
1050
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1062
|
-
checksum = "
|
|
1051
|
+
checksum = "cb8a0807f7c01457d0379ba880ba6322660448ddebc890ce29bb64da71fb40f9"
|
|
1063
1052
|
|
|
1064
1053
|
[[package]]
|
|
1065
1054
|
name = "zune-jpeg"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyStreamPDF
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.0
|
|
4
4
|
Classifier: Development Status :: 4 - Beta
|
|
5
5
|
Classifier: Intended Audience :: Developers
|
|
6
6
|
Classifier: Intended Audience :: Science/Research
|
|
@@ -35,13 +35,16 @@ Project-URL: Repository, https://github.com/Mullassery/StreamPDF
|
|
|
35
35
|
|
|
36
36
|
# PyStreamPDF
|
|
37
37
|
|
|
38
|
-
**
|
|
38
|
+
**Extract only what matters from PDFs, so you send less to LLMs.**
|
|
39
39
|
|
|
40
|
-
Stop sending entire documents to LLMs. PyStreamPDF
|
|
40
|
+
Stop sending entire documents to LLMs. PyStreamPDF parses PDF structure and
|
|
41
|
+
splits content into semantic, token-budget-aware chunks so you can send
|
|
42
|
+
only the relevant parts of a document to a model. See "Token Savings"
|
|
43
|
+
below for how much that saves in practice — it depends on your documents.
|
|
41
44
|
|
|
42
45
|
[](https://pypi.org/project/pystreampdf)
|
|
43
46
|
[](https://www.python.org)
|
|
44
|
-
[](./tests)
|
|
45
48
|
[](./LICENSE)
|
|
46
49
|
|
|
47
50
|
---
|
|
@@ -49,21 +52,24 @@ Stop sending entire documents to LLMs. PyStreamPDF analyzes structure, identifie
|
|
|
49
52
|
## 30-Second Start
|
|
50
53
|
|
|
51
54
|
```python
|
|
52
|
-
from pystreampdf import
|
|
55
|
+
from pystreampdf import SemanticChunker, ElementType
|
|
53
56
|
|
|
54
|
-
|
|
55
|
-
|
|
57
|
+
with open("financial_report.pdf", "rb") as f:
|
|
58
|
+
text = f.read().decode("latin-1", errors="ignore") # or use a real PDF text extractor first
|
|
56
59
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
# Send only relevant parts to LLM
|
|
63
|
-
for chunk in relevant:
|
|
64
|
-
response = llm.query(chunk, "What was Q3 revenue?")
|
|
60
|
+
chunker = SemanticChunker(target_tokens=500)
|
|
61
|
+
chunks = chunker.chunk_content(
|
|
62
|
+
text, element_type=ElementType.TEXT, page_start=1, page_end=1
|
|
63
|
+
)
|
|
64
|
+
print(f"Split into {len(chunks)} semantic chunks")
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
+
There is no `Document`/`.extract_relevant()` class in this package —
|
|
68
|
+
`SemanticChunker` (shown above) and `PDFCache` (see "Quick Start: Document
|
|
69
|
+
Extraction" below) are the real, exported API. If you built against a
|
|
70
|
+
`Document` class from an earlier version of these docs, it never actually
|
|
71
|
+
existed in source; see Known Issues.
|
|
72
|
+
|
|
67
73
|
---
|
|
68
74
|
|
|
69
75
|
## Why PyStreamPDF?
|
|
@@ -75,10 +81,10 @@ for chunk in relevant:
|
|
|
75
81
|
- No way to know which parts actually matter
|
|
76
82
|
|
|
77
83
|
**The Solution:**
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
81
|
-
|
|
84
|
+
- Semantic chunking with context awareness (real, in `SemanticChunker`)
|
|
85
|
+
- Token-budget-aware caching (real, in `PDFCache` / `TokenBudgetConfig`)
|
|
86
|
+
- Reduces the volume of text you send per query — see "Token Savings"
|
|
87
|
+
below for what's measured vs. illustrative
|
|
82
88
|
|
|
83
89
|
---
|
|
84
90
|
|
|
@@ -92,52 +98,24 @@ for chunk in relevant:
|
|
|
92
98
|
- **Token Budgeting:** Allocate tokens by document type
|
|
93
99
|
- **Smart Caching:** L1 memory + L2 disk (HMAC-signed on disk — no unverified deserialization)
|
|
94
100
|
- **Metadata Preservation:** Keep tables, images, structure
|
|
95
|
-
- **Production-Ready:**
|
|
101
|
+
- **Production-Ready:** 557 passing tests (2 skipped when optional OCR system deps aren't installed)
|
|
96
102
|
|
|
97
103
|
---
|
|
98
104
|
|
|
99
105
|
## Real-World Use Cases
|
|
100
106
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
# 70% fewer tokens than sending whole PDF
|
|
109
|
-
for section in revenue_sections:
|
|
110
|
-
summary = llm.query(section, "What was total revenue?")
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
**Legal Contracts:**
|
|
114
|
-
```python
|
|
115
|
-
# Find clauses without reading everything
|
|
116
|
-
doc = Document("contract.pdf")
|
|
117
|
-
liability = doc.extract_relevant("liability", "indemnification")
|
|
118
|
-
print(f"Found in {len(liability)} sections")
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
**Research Papers:**
|
|
122
|
-
```python
|
|
123
|
-
# Extract methodology and results
|
|
124
|
-
doc = Document("paper.pdf")
|
|
125
|
-
methods = doc.extract_relevant("methods", "experiment")
|
|
126
|
-
results = doc.extract_relevant("results", "findings")
|
|
127
|
-
```
|
|
107
|
+
See [examples/basic_parse.py](examples/basic_parse.py) for the Rust-backed
|
|
108
|
+
`pystreampdf.open()` path (document/page/structure inspection — requires
|
|
109
|
+
the compiled `_core` extension, see Known Issues) and
|
|
110
|
+
[examples/token_budget_and_cache_example.py](examples/token_budget_and_cache_example.py)
|
|
111
|
+
for the pure-Python `SemanticChunker` + `PDFCache` + `TokenBudgetConfig`
|
|
112
|
+
path shown above. Both are real, runnable scripts — copying them is more
|
|
113
|
+
reliable than a README snippet for an evolving API.
|
|
128
114
|
|
|
129
115
|
---
|
|
130
116
|
|
|
131
117
|
## Token Savings
|
|
132
118
|
|
|
133
|
-
| Document | Size | Full PDF Tokens | PyStreamPDF | Savings |
|
|
134
|
-
|----------|------|-----------------|-------------|---------|
|
|
135
|
-
| Annual Report | 200 pages | 50K | 15K | 70% |
|
|
136
|
-
| Contract | 50 pages | 12K | 4K | 67% |
|
|
137
|
-
| Research Paper | 30 pages | 8K | 2K | 75% |
|
|
138
|
-
|
|
139
|
-
**Results:** Lower costs + better retrieval accuracy + faster responses
|
|
140
|
-
|
|
141
119
|
**A note on how token counts are computed:** by default, token counts use a
|
|
142
120
|
`len(text) / 4` heuristic (a common rule of thumb, but approximate — it can
|
|
143
121
|
be off by a meaningful margin, especially for code or non-English text).
|
|
@@ -150,9 +128,15 @@ pip install "pystreampdf[tiktoken]"
|
|
|
150
128
|
When `tiktoken` is installed, `pystreampdf.tokenizer.is_exact()` returns
|
|
151
129
|
`True` and counts use the real `cl100k_base` encoding; otherwise it falls
|
|
152
130
|
back to the heuristic. Check `pystreampdf.tokenizer.TOKENIZER_MODE` to see
|
|
153
|
-
which mode produced a given number.
|
|
154
|
-
|
|
155
|
-
|
|
131
|
+
which mode produced a given number.
|
|
132
|
+
|
|
133
|
+
Actual token savings depend entirely on your documents and how narrowly
|
|
134
|
+
you scope `extract_relevant`-style queries — there's no committed
|
|
135
|
+
benchmark result in this repo backing a specific percentage (the earlier
|
|
136
|
+
"70%"/"10-50x" style claims in this README and in `__init__.py`'s
|
|
137
|
+
docstring weren't measured against anything checked in). Run
|
|
138
|
+
[examples/token_budget_and_cache_example.py](examples/token_budget_and_cache_example.py)
|
|
139
|
+
against your own documents to get a real number for your use case.
|
|
156
140
|
|
|
157
141
|
---
|
|
158
142
|
|
|
@@ -242,11 +226,46 @@ structure detection, metadata, chunking, citations, validation). It's
|
|
|
242
226
|
opt-in, binds to `127.0.0.1` only, and requires `allow_remote=True` to be
|
|
243
227
|
exposed beyond localhost. See [examples/mcp_pystreampdf.py](examples/mcp_pystreampdf.py).
|
|
244
228
|
|
|
229
|
+
## Known Issues
|
|
230
|
+
|
|
231
|
+
- Earlier versions of this README documented a `Document` class with
|
|
232
|
+
`.extract_relevant()` and a `.token_savings` attribute — verified
|
|
233
|
+
against source: this class has never existed in this package. Fixed
|
|
234
|
+
in this pass to describe the real, exported API (`SemanticChunker`,
|
|
235
|
+
`PDFCache`, `TokenBudgetConfig`, and the Rust-backed `pystreampdf.open()`).
|
|
236
|
+
- The published PyPI wheel is the only wheel on PyPI — macOS arm64 only,
|
|
237
|
+
no sdist. On any other platform or Python version, `pip install` will
|
|
238
|
+
fail without a local Rust toolchain to build from source.
|
|
239
|
+
- ~~The published version (2.2.1) is ahead of what's tagged in this repo's
|
|
240
|
+
Cargo.toml/__init__.py (2.2.0)~~ Resolved: 2.3.0 (this release) is
|
|
241
|
+
unambiguously ahead of both 2.2.0 and 2.2.1.
|
|
242
|
+
- The Rust-backed `pystreampdf.open()` / `pystreampdf.load_index()` API
|
|
243
|
+
(used in `examples/basic_parse.py`) silently becomes `None` if the
|
|
244
|
+
compiled `_core` extension isn't available (e.g. a from-source install
|
|
245
|
+
without `maturin develop`) — falling back to `SemanticChunker`/`PDFCache`
|
|
246
|
+
in that case, per the code above, not a hard error.
|
|
247
|
+
- The "Tests & Build" GitHub Actions workflow was red for several weeks
|
|
248
|
+
due to two CI infrastructure bugs (not the test suite itself), both
|
|
249
|
+
now fixed and confirmed green in CI:
|
|
250
|
+
[run 32611116541](https://github.com/Mullassery/PyStreamPDF/actions/runs/32611116541).
|
|
251
|
+
First, `dtolnay/rust-toolchain@v1` required an explicit `toolchain`
|
|
252
|
+
input the workflow didn't provide, failing both jobs before any tests
|
|
253
|
+
ran — fixed by pinning to `dtolnay/rust-toolchain@stable`. Second, once
|
|
254
|
+
that was fixed, `maturin develop` failed in the Python-test job because
|
|
255
|
+
`actions/setup-python` doesn't provide an active virtualenv, which
|
|
256
|
+
maturin requires — fixed by creating and activating a `.venv` before
|
|
257
|
+
the build step. Actual CI output as of 2.2.0: `pytest` — 536 passed, 2
|
|
258
|
+
skipped (Python 3.10, 3.11, and 3.12, each identical); `cargo test` — 23
|
|
259
|
+
passed, 0 failed. (The Rust suite has 23 tests, not 536 — an earlier
|
|
260
|
+
version of this section conflated the pytest count with the Rust one.)
|
|
261
|
+
As of 2.3.0: `pytest` — 557 passed, 2 skipped (21 new tests added for
|
|
262
|
+
`tests/test_mcp_tools.py`).
|
|
263
|
+
|
|
245
264
|
## License
|
|
246
265
|
|
|
247
266
|
Proprietary License — Free to use with explicit attribution. See [LICENSE](LICENSE).
|
|
248
267
|
|
|
249
268
|
---
|
|
250
269
|
|
|
251
|
-
**PyStreamPDF v2.
|
|
270
|
+
**PyStreamPDF v2.3.0** | Intelligent PDF processing for AI | Python 3.9+ | 557 passing tests
|
|
252
271
|
|