Official SDKs
Integrate Dits version control into your applications with our official SDKs. Available for JavaScript/TypeScript, Python, Go, and Rust.
JavaScript
Node.js & Browser SDK
npm
ESM
TypeScript
npm install @dits/sdk• REST API client
• File upload/download
• Repository management
• Webhook handling
• File upload/download
• Repository management
• Webhook handling
Python
Python SDK with async support
pip
asyncio
Type hints
pip install dits-sdk• Async/await support
• Data science workflows
• ML model versioning
• Large dataset handling
• Data science workflows
• ML model versioning
• Large dataset handling
Go
High-performance Go SDK
go get
Concurrent
Streaming
go get github.com/dits-io/go-sdk• Concurrent operations
• Streaming uploads
• Context cancellation
• Enterprise integrations
• Streaming uploads
• Context cancellation
• Enterprise integrations
Rust
Native Rust SDK with zero-copy operations
cargo
Zero-copy
Async
cargo add dits-sdk• Memory-safe operations
• Zero-copy chunking
• Async runtime agnostic
• Performance-critical apps
• Zero-copy chunking
• Async runtime agnostic
• Performance-critical apps
JavaScript/TypeScript SDK
Installation
npm install @dits/sdk
# or
yarn add @dits/sdk
# or
pnpm add @dits/sdkBasic Usage
import { DitsClient } from '@dits/sdk';
const client = new DitsClient({
baseURL: 'https://api.dits.io/v1',
token: process.env.DITS_TOKEN
});
// List repositories
const repos = await client.repositories.list();
// Upload a file
await client.files.upload('path/to/video.mp4', {
repository: 'my-project',
commit: 'Add raw footage'
});
// Download a file
const buffer = await client.files.download('abc123...', {
repository: 'my-project'
});Advanced Features
- Streaming uploads: Handle large files without loading into memory
- Progress callbacks: Monitor upload/download progress
- Webhook handling: Built-in webhook signature verification
- TypeScript support: Full type definitions included
SDK Comparison
| Feature | JavaScript | Python | Go | Rust |
|---|---|---|---|---|
| REST API | ||||
| File Upload/Download | ||||
| Streaming Support | ||||
| Webhook Handling | ||||
| Async/Await | ||||
| Progress Callbacks | ||||
| Type Safety | ||||
| Zero-Copy Operations | — | — | — | |
| Concurrent Operations |
Contributing to SDKs
All SDKs are open source and welcome contributions. Each SDK follows consistent patterns and includes comprehensive test suites.
Development Setup
- Clone the SDK repository
- Install dependencies
- Run test suite
- Follow contribution guidelines
Testing
- Unit tests for all functionality
- Integration tests with live API
- Performance benchmarks
- Cross-platform compatibility