See Attachments in action! This demo shows how to process various file types and extract content for LLM use.

What you’ll see in the demo:¶
- PDF processing: Extract text and images from PDF documents
- PowerPoint slides: Process PPTX files with slide-specific extraction
- Web scraping: Use CSS selectors to extract specific content from web pages
- Image processing: Handle various image formats with transformations
- Project analysis: Generate detailed file reports with character and line counts
- LLM integration: Send processed content directly to OpenAI and Claude APIs
Try it yourself:¶
from attachments import Attachments
# Process the same files shown in the demo
pdf = Attachments("https://github.com/MaximeRivest/attachments/raw/main/src/attachments/data/sample.pdf")
pptx = Attachments("https://github.com/MaximeRivest/attachments/raw/main/src/attachments/data/sample_multipage.pptx[3-5]")
print(f"PDF text length: {len(str(pdf))}")
print(f"PPTX images extracted: {len(pptx.images)}")
# Generate a detailed project report
report = Attachments("src/[mode:report][files:true][force:true]")
print("📊 Project Analysis:")
print(report.text)