This commit is contained in:
14
docs/snippets/python/api/extract_bytes_async.md
Normal file
14
docs/snippets/python/api/extract_bytes_async.md
Normal file
@@ -0,0 +1,14 @@
|
||||
```python title="Python"
|
||||
import asyncio
|
||||
from kreuzberg import extract_bytes, ExtractionConfig
|
||||
|
||||
async def main() -> None:
|
||||
with open("document.pdf", "rb") as f:
|
||||
content = f.read()
|
||||
|
||||
result = await extract_bytes(content, "application/pdf", config=ExtractionConfig())
|
||||
print(result.content[:200])
|
||||
print(f"Tables: {len(result.tables)}")
|
||||
|
||||
asyncio.run(main())
|
||||
```
|
||||
Reference in New Issue
Block a user