The official Solvice VRP Solver Python SDK is now available on PyPI! Install it today to streamline your route optimization integrations.
Installation
Install the SDK using your preferred Python package manager:- pip
- poetry
- pipenv
The
--pre flag is currently required as the package is in pre-release status.Quick Start
Get up and running with the VRP Solver in minutes:Key Features
Type Safety
Full type definitions for all request parameters and response fields
Async Support
Native async/await support with both httpx and optional aiohttp backends
Pythonic Interface
Follows Python conventions with snake_case methods and proper error handling
Auto Retry
Built-in retry logic with configurable attempts for resilient integrations
Configuration
Configure the SDK client with these options:Advanced Usage
Asynchronous Client
For better performance with multiple requests, use the async client:Error Handling
The SDK provides comprehensive error handling:Using with Real Road Distances
Enable real-world routing distances instead of straight-line calculations:Python Version Support
The SDK supports multiple Python versions:- Python 3.8+
- Type Hints
Minimum supported version:
Complete Example
Here’s a comprehensive example showcasing various SDK features:API Methods
The SDK provides access to all VRP Solver endpoints:Core Methods
sync_solve()- Synchronous solving for smaller problemssolve()- Asynchronous solving for larger problemsjobs.status()- Check job statusjobs.solution()- Retrieve solution
Advanced Methods
evaluate()- Evaluate an existing solutionsuggest()- Get improvement suggestionsjobs.explanation()- Get detailed explanationsdemo()- Get a demo request for testing
Integration with Data Science Libraries
The Python SDK works seamlessly with popular data science libraries:Resources
PyPI Package
View on Python Package Index
GitHub Repository
View source code and contribute
API Reference
Complete API documentation
Support
Get help from our team