Python Library for the Codec API
Project description
Codec Python Library
The Codec Python library provides convenient access to the Codec API from applications written in Python 3.
Documentation
See the Codec docs.
Installation
You don't need this source code unless you want to modify the package. If you just want to use the package, just run:
pip install --upgrade codec-sdk
Requirements
Python 3.8+
Usage
The library needs to be configured with your team's API key which is available in the Codec Dashboard. Instantiate the Codec client with it:
from codec import Codec
codec = Codec("pk_xxx...")
# Get a collection
collection = codec.collections.get("col_xxx...")
# Search within videos in a collection
query = "trump wearing a red hat and talking about north korea"
results = codec.search(
query=query,
search_types=["visual", "speech"],
collection=collection.uid,
max_results=5
)
Handling exceptions
Unsuccessful requests raise exceptions. The class of the exception will reflect the sort of error that occurred, and the error message will provide more context. See the API reference for a description of the error classes you should handle.
Support
For support, reach out to support@codec.io.
Project details
Release history Release notifications | RSS feed
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 codec_sdk-0.2.5.tar.gz.
File metadata
- Download URL: codec_sdk-0.2.5.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3471799c038fd94fc72f9ab6d3cd4239e8ec9c1e024c1f25ff2c8c6968cf0689
|
|
| MD5 |
43f681be743b2d9985edf56ccde6a6a3
|
|
| BLAKE2b-256 |
89d7649893fc80cfa4a3ec24b846621ac62dcf62f17a68106ab9b1386338f7d5
|
File details
Details for the file codec_sdk-0.2.5-py3-none-any.whl.
File metadata
- Download URL: codec_sdk-0.2.5-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ad2942b4c5b047c10d11116139afc6ca001cc2ccbab9fd24abc6f8a984c46d6
|
|
| MD5 |
3c5ba19f5d2f565c133740ce6f2cbe46
|
|
| BLAKE2b-256 |
7d0424a96eea06e52b5c2f8bc594df606476f38f33cd93fb705052b964ed1e9f
|