Skip to main content

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-video

Install from source with:

python setup.py install

Requirements

Python 3.10+

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_visual=True,
    search_speech=True,
    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 contact@codec.io.

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

codec_video-0.1.0.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

codec_video-0.1.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file codec_video-0.1.0.tar.gz.

File metadata

  • Download URL: codec_video-0.1.0.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for codec_video-0.1.0.tar.gz
Algorithm Hash digest
SHA256 786d4c4f6a8eeb6cd7d538482edff3c121977f1bd3bec11f2a16b02261d97f05
MD5 3d6b2b7d8e86e43c7f2d6ff8cfbdfafa
BLAKE2b-256 8870f9c32389761e55236af4b8dfd89354bffd285fd48cac9fc75c15847f115c

See more details on using hashes here.

Provenance

File details

Details for the file codec_video-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for codec_video-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 24e45f9f2b40520eb78f6f1704147e7d8f207757cb1eb0a0664dd7f54dd6a53e
MD5 b31b935d09e44eec7d4c78f9b29e9611
BLAKE2b-256 82ae56d6ab620e265b8681a57acf9a1272f4a84c5bef42ac886b70d696a5d80e

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page