SDK Overview
Official client libraries for CTWiseAPI.
Available SDKs
| Language | Package | Status |
|---|---|---|
| Python | pip install ctwise | ✅ Available |
| JavaScript/TypeScript | npm install @ctwise/sdk | ✅ Available |
| Java | com.ctwise:ctwise-sdk | 🔜 Coming Soon |
| C# | CTWise.SDK | 🔜 Coming Soon |
| Go | github.com/ctwise/go-sdk | 🔜 Coming Soon |
Quick Installation
Python
pip install ctwise
from ctwise import CTWiseClient
client = CTWiseClient(api_key="ctwise_sk_live_xxx")
results = client.search("informed consent requirements")
for rule in results.rules:
print(f"{rule.title} ({rule.confidence:.0%})")
JavaScript/TypeScript
npm install @ctwise/sdk
import { CTWiseClient } from '@ctwise/sdk';
const client = new CTWiseClient({ apiKey: 'ctwise_sk_live_xxx' });
const results = await client.search('informed consent requirements');
results.rules.forEach(rule => {
console.log(`${rule.title} (${rule.confidence})`);
});
Common Features
All SDKs provide:
- ✅ Type-safe API methods
- ✅ Automatic retry with exponential backoff
- ✅ Rate limit handling
- ✅ Error handling with typed exceptions
- ✅ Async/await support
- ✅ Configurable timeouts
- ✅ Response pagination helpers
SDK vs. REST API
| Feature | SDK | REST API |
|---|---|---|
| Type safety | ✅ | ❌ |
| Auto-retry | ✅ | Manual |
| Pagination | Helpers | Manual |
| Learning curve | Lower | Higher |
| Flexibility | Standard | Full control |
tip
Use SDKs for faster development. Use REST API for custom integrations or unsupported languages.
Support
- GitHub Issues: Report bugs and request features
- Documentation: Each SDK has inline docs
- Examples: See
/examplesin each SDK repo