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_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]]transcribe_video(video_id: str, transcribe_type: str = "AUDIO", callback_uri: Optional[str] = None) -> strget_transcription(taskNo: 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.
Metadata
Release files for pymavi 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pymavi-0.1.7.tar.gz | 9.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pymavi-0.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.8 kB
Release files / pymavi-0.1.7.tar.gz
| Download URL | pymavi-0.1.7.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
99b1880b1f8c54a199e0ed0c455619787041c2b6dd2418df164468cfcc6bc84d
|
|
BLAKE2b-256 checksum How to use checksums |
cba1ec9e3d36d08ca98b9b3910978f54ebcdb2914ac675a5a1459f70d84400da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / pymavi-0.1.7-py3-none-any.whl
| Download URL | pymavi-0.1.7-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
13cf1829ce68e0c8a1282bcea368a6cc53a553aaf788c021e54c97ddd8b9bcb8
|
|
BLAKE2b-256 checksum How to use checksums |
c262738f15b35d34802b50fb0864590c93f8061216faedc754d36c73272b675e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Security for pymavi 0.1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.