No preview available
Claude API Python Toolkit — 15 Ready-to-Run Scripts
Description
A collection of 15 well-commented, production-ready Python scripts covering the most common Claude API use cases.
**Scripts included:**
1. `batch_processor.py` — Process thousands of items in parallel with rate limiting
2. `streaming_chat.py` — Real-time streaming responses with clean terminal UI
3. `vision_analyser.py` — Analyse images from URL or local file
4. `tool_use_demo.py` — Full tool/function calling example with calculator + search
5. `pdf_summariser.py` — Extract text from PDF and summarise with Claude
6. `conversation_manager.py` — Multi-turn conversations with persistent history
7. `structured_extractor.py` — Extract structured JSON from unstructured text
8. `content_moderator.py` — Build a content moderation pipeline
9. `embeddings_search.py` — Semantic search over your own documents
10. `cost_tracker.py` — Track API usage and costs across all calls
Plus 5 bonus scripts covering caching, error handling, and retry logic.
**Requirements:** Python 3.10+, anthropic SDK