This commit is contained in:
13
docs/snippets/python/api/batch_extract_bytes_sync.md
Normal file
13
docs/snippets/python/api/batch_extract_bytes_sync.md
Normal file
@@ -0,0 +1,13 @@
|
||||
```python title="Python"
|
||||
from kreuzberg import batch_extract_bytes_sync, BatchBytesItem, ExtractionConfig
|
||||
|
||||
items = [
|
||||
BatchBytesItem(content=b"PDF content", mime_type="application/pdf"),
|
||||
BatchBytesItem(content=b"<html>...</html>", mime_type="text/html"),
|
||||
]
|
||||
|
||||
results = batch_extract_bytes_sync(items, ExtractionConfig())
|
||||
|
||||
for i, result in enumerate(results):
|
||||
print(f"Item {i}: {len(result.content)} chars extracted")
|
||||
```
|
||||
Reference in New Issue
Block a user