Skip to main content

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.

Metadata

Release files for codec-sdk 0.2.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for codec-sdk 0.2.9
File Size Uploaded
codec_sdk-0.2.9.tar.gz 10.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for codec-sdk 0.2.9
File Interpreter ABI Platform
codec_sdk-0.2.9-py3-none-any.whl Python 3 none any Details

Total release size: 22.3 kB

Release files / codec_sdk-0.2.9.tar.gz

Download URL codec_sdk-0.2.9.tar.gz
Size 10.1 kB
Tags Source
SHA-256 checksum
How to use checksums
698b5f2ebe32e6986fe947306415a70b080d6b7a6701abc123983f7807a633e5
BLAKE2b-256 checksum
How to use checksums
5be1b26c546968d61b881ec3a1a40150c50ed3ab1bdfb6a285fffd873f6e1b16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Release files / codec_sdk-0.2.9-py3-none-any.whl

Download URL codec_sdk-0.2.9-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
57388557d747d16de4f00ac386566fd6bed799ddbd63724fcd78de86556ad45b
BLAKE2b-256 checksum
How to use checksums
3eae3e979b95506ccbf6aea971ccd6f84eac39617cca342aa275c54bb4191003
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Release history Release notifications | RSS feed

This release

0.2.9 This release

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page