Python SDK for the Mavi Video AI Platform
Project description
Pymavi
Python SDK for the Mavi Video AI Platform. This SDK provides a simple and intuitive interface to interact with the Mavi API for video processing, search, and analysis.
Installation
pip install pymavi
Quick Start
from pymavi import MaviClient
# Initialize the client
client = MaviClient(api_key="your_api_key")
# Upload a video
response = client.upload_video(
video_path="path/to/video.mp4",
callback_uri="https://your-callback-url.com/webhook"
)
# Search for videos
results = client.search_video("find me videos with cars")
# Chat with videos
response = client.chat_with_videos(
video_nos=["video_id_1", "video_id_2"],
message="What's happening in these videos?",
stream=True
)
Features
- Video upload and management
- Natural language video search
- Key clip extraction
- AI-powered video chat
- Comprehensive error handling
- Type hints and documentation
API Reference
MaviClient
The main client class for interacting with the Mavi API.
Methods
upload_video(video_name: str, video_path: str, callback_uri: Optional[str] = None) -> Dict[str, Any]search_video_metadata(start_time: Optional[int] = None, end_time: Optional[int] = None, video_status: str = "PARSE", range_bucket: int = 1, num_results: int = 10) -> Dict[str, Any]search_video(search_query: str) -> Dict[str, Any]search_key_clip(search_query: str, video_ids: Optional[List[str]] = None) -> Dict[str, Any]chat_with_videos(video_nos: List[str], message: str, history: Optional[List[Dict[str, str]]] = None, stream: bool = False) -> Union[str, Dict[str, Any]]delete_video(video_ids: List[str]) -> Dict[str, Any]
Exceptions
MaviError: Base exception for all Pymavi-related errorsMaviAuthenticationError: Raised when there are authentication-related errorsMaviAPIError: Raised when the API returns an error responseMaviValidationError: Raised when there are validation errors in the input parameters
Development
- Clone the repository
- Install development dependencies:
pip install -e ".[dev]" - Run tests:
pytest
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pymavi-0.1.3.tar.gz.
File metadata
- Download URL: pymavi-0.1.3.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3279cfc8a56fd33596bea46df6922f58a15c7e0cd5c7008432311a9d451f90ce
|
|
| MD5 |
d08686cf933956fce75f9b8fedec9d25
|
|
| BLAKE2b-256 |
cc730cf014ac7a328a662d5644832bb43ad573b5d1ca5500ddbec7502327dccd
|
File details
Details for the file pymavi-0.1.3-py3-none-any.whl.
File metadata
- Download URL: pymavi-0.1.3-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8fa3dc88b47267735da520dc8c7029d27542d7cf4cf16a19cd82eaebfb21ae3
|
|
| MD5 |
b8f884b95aa5ce5bcc721c632c6b9ce9
|
|
| BLAKE2b-256 |
3e710e3cdad9a1e9301684595f0db0e8206cf632b041f8d28e8390b5b916cde8
|