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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codec_sdk-0.2.6.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codec_sdk-0.2.6-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file codec_sdk-0.2.6.tar.gz.

File metadata

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

File hashes

Hashes for codec_sdk-0.2.6.tar.gz
Algorithm Hash digest
SHA256 d8098332a67ae0b85e93b9c4b6e4bac76fd4fe0ee93be9c0b6f4dd84548ce23c
MD5 dc09d9586fb105c758eb364e9af0b206
BLAKE2b-256 3d2ab9f3d31d8ae2fcf65d69ad8e37516ba3c93c8b0b6c3d5406d34a0634c517

See more details on using hashes here.

File details

Details for the file codec_sdk-0.2.6-py3-none-any.whl.

File metadata

  • Download URL: codec_sdk-0.2.6-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

Hashes for codec_sdk-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a7975f5de046bea7a317406204f13238bc8a61e9d05a254be4f3183bc6e145ba
MD5 0e1f2b1767f4eaf66da4adfec3fb7027
BLAKE2b-256 69f288d0eeb109041586c182d48cfaade524ef62d3815cccca8b3686467ac5d3

See more details on using hashes here.

Supported by

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