API Clients & SDKs
Download official SDKs and client libraries for seamless integration with Carapis API.
🚀 Available Clients
Python Client
Official Python SDK with full type safety and async support
- Type-safe with Pydantic models
- Async/await support
- Full API coverage
- Auto-generated from OpenAPI
- Comprehensive error handling
TypeScript Client
Official TypeScript SDK with modern ES6+ features
- Full TypeScript support
- Browser & Node.js compatible
- Modern ES6+ syntax
- Auto-generated from OpenAPI
- Zero-dependency design
Demo Portal
Ready-to-use car demo portal built with Next.js
- Pre-configured setup
- Docker ready
- Responsive design
- CarAPIS integration
- Production ready
🛠️ Quick Start
Python Example
from encar_public import Client
# Initialize
client = Client(
base_url="https://api2.carapis.com",
headers={"X-API-Key": "your-api-key"}
)
# Get vehicles
response = client.vehicles.list(limit=10)
vehicles = response.data.results
for vehicle in vehicles:
print(f"{vehicle.brand.name} {vehicle.vehicle_model.name}")
TypeScript Example
import { createClient } from './encar_public/client';
import { dataEncarApiVehiclesWebList } from './encar_public';
// Create API client
const api = createClient({
baseUrl: 'https://api2.carapis.com',
headers: {
'X-API-Key': 'your-api-key',
'Content-Type': 'application/json',
},
});
// List vehicles
const list = await dataEncarApiVehiclesWebList({
client: api,
query: { page: 1, page_size: 10 },
});
console.log(list.data.results);
📊 Features Comparison
Feature | Python Client | TypeScript Client | Demo Portal |
---|---|---|---|
Type Safety | ✅ Pydantic models | ✅ Full TypeScript | ✅ TypeScript |
Async Support | ✅ Async/await | ✅ Promises | ✅ React hooks |
Browser Support | ❌ Node.js only | ✅ Browser & Node.js | ✅ Browser |
Auto-generated | ✅ OpenAPI | ✅ OpenAPI | ✅ Manual |
Dependencies | Minimal | Zero | Next.js stack |
Production Ready | ✅ | ✅ | ✅ |
📦 Download Clients
Python Client
Extract the archive and include the generated client in your Python project.
TypeScript Client
Extract the archive and include the generated client files in your TypeScript/JavaScript project.
Demo Portal
git clone https://github.com/markolofsen/carapis-nextjs-demo.git
cd carapis-nextjs-demo
pnpm install
pnpm dev
🌐 Live Demo
Visit our live demo portal to see the API in action:
📚 Documentation
Each client comes with comprehensive documentation:
- Python Client Docs - Usage examples and best practices
- TypeScript Client Docs - Setup, API usage, and React integration
- Demo Portal Docs - Deployment and customization
💡 Best Practices
- Use Environment Variables - Store API keys securely
- Implement Error Handling - Handle API errors gracefully
- Cache Responses - Reduce API calls with caching
- Monitor Rate Limits - Stay within API limits
- Use Type Safety - Leverage TypeScript/Python types
🚀 Getting Started
Choose your preferred client and start integrating:
- Python Client - For Python applications
- TypeScript Client - For JavaScript/TypeScript applications
- Demo Portal - For quick prototyping and demos
All clients are production-ready and actively maintained!