claudette  by AnswerDotAI

SDK for Anthropic Claude automation, extending the Python SDK

created 1 year ago
251 stars

Top 99.8% on sourcepulse

GitHubView on GitHub
Project Summary

Claudette is a Python wrapper designed to simplify interactions with Anthropic's Claude API. It addresses the verbosity and manual effort often required by the base SDK, offering an automated, high-level interface for developers. Key features include stateful chat management, simplified tool use, image handling, and prefill capabilities.

How It Works

Claudette leverages a "literate nbdev" approach, where the source code is embedded within detailed Jupyter Notebooks. This methodology aims to make the code more understandable and educational, explaining the "why" behind the implementation. The library provides a Chat class for conversational state management and a Client for structured output generation, abstracting away much of the boilerplate associated with API calls.

Quick Start & Requirements

  • Install via pip: pip install claudette
  • Requires an ANTHROPIC_API_KEY environment variable.
  • Supports Anthropic's models (e.g., Claude 3 Opus, Sonnet, Haiku).
  • Detailed documentation and source code are available in the project's Jupyter Notebooks.

Highlighted Details

  • Stateful Chat class for managing conversation history.
  • Streamlined support for Claude's Tool Use API with docments for ergonomic function definition.
  • structured client method for extracting specific data types from LLM responses.
  • Image handling capabilities, allowing prompts with both text and image data.
  • Optional "extended thinking" feature (maxthinktok) for enhanced reasoning on complex tasks.

Maintenance & Community

The project is presented as the first "literate nbdev" project, emphasizing educational code. Further community or maintenance details are not explicitly detailed in the README.

Licensing & Compatibility

The README does not specify a license. Compatibility for commercial use or closed-source linking would require clarification on licensing terms.

Limitations & Caveats

The README does not specify any limitations or known issues. The project's novelty as the first "literate nbdev" project might imply a smaller community or less battle-testing compared to more established libraries.

Health Check
Last commit

1 week ago

Responsiveness

1+ week

Pull Requests (30d)
3
Issues (30d)
3
Star History
17 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems) and Carol Willing Carol Willing(Core Contributor to CPython, Jupyter).

genai by rgbkrk

0%
352
IPython extension for generative AI assistance in Jupyter notebooks
created 3 years ago
updated 1 year ago
Starred by Boris Cherny Boris Cherny(Creator of Claude Code; MTS at Anthropic) and Adam Wolff Adam Wolff(Claude Code Core; MTS at Anthropic).

claude-code-sdk-python by anthropics

4.0%
744
SDK for Claude Code interaction
created 1 month ago
updated 1 day ago
Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Travis Fischer Travis Fischer(Founder of Agentic), and
2 more.

courses by anthropics

0.5%
17k
Educational courses for Anthropic models
created 1 year ago
updated 8 months ago
Feedback? Help us improve.