deepgram-unstable-sdk


Namedeepgram-unstable-sdk JSON
Version 3.8.0.dev3 PyPI version JSON
download
home_pagehttps://github.com/deepgram/deepgram-python-sdk
SummaryThe official Python SDK for the Deepgram automated speech recognition platform.
upload_time2024-11-04 18:31:31
maintainerNone
docs_urlNone
authorDeepgram
requires_pythonNone
licenseMIT
keywords deepgram deepgram speech-to-text
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Deepgram Python SDK

[![Discord](https://dcbadge.vercel.app/api/server/xWRaCDBtW4?style=flat)](https://discord.gg/xWRaCDBtW4) [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/deepgram/deepgram-python-sdk/CI)](https://github.com/deepgram/deepgram-python-sdk/actions/workflows/CI.yml) [![PyPI](https://img.shields.io/pypi/v/deepgram-sdk)](https://pypi.org/project/deepgram-sdk/)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg?style=flat-rounded)](./.github/CODE_OF_CONDUCT.md)

Official Python SDK for [Deepgram](https://www.deepgram.com/). Power your apps with world-class speech and Language AI models.

- [Deepgram Python SDK](#deepgram-python-sdk)
- [Documentation](#documentation)
- [Getting an API Key](#getting-an-api-key)
- [Requirements](#requirements)
- [Installation](#installation)
- [Quickstarts](#quickstarts)
  - [PreRecorded Audio Transcription Quickstart](#prerecorded-audio-transcription-quickstart)
  - [Live Audio Transcription Quickstart](#live-audio-transcription-quickstart)
- [Examples](#examples)
- [Logging](#logging)
- [Backwards Compatibility](#backwards-compatibility)
- [Development and Contributing](#development-and-contributing)
- [Getting Help](#getting-help)

## Documentation

You can learn more about the Deepgram API at [developers.deepgram.com](https://developers.deepgram.com/docs).

## Getting an API Key

🔑 To access the Deepgram API you will need a [free Deepgram API Key](https://console.deepgram.com/signup?jump=keys).

## Requirements

[Python](https://www.python.org/downloads/) (version ^3.10)

## Installation

To install the latest version available (which will guarantee change over time):

```sh
pip install deepgram-sdk
```

If you are going to write an application to consume this SDK, it's [highly recommended](https://discuss.python.org/t/how-to-pin-a-package-to-a-specific-major-version-or-lower/17077) and a [programming staple](https://www.easypost.com/dependency-pinning-guide) to pin to at **least** a major version of an SDK (ie `==2.*`) or **with due diligence**, to a minor and/or specific version (ie `==2.1.*` or `==2.12.0`, respectively). If you are unfamiliar with [semantic versioning or semver](https://semver.org/), it's a must-read.

In a `requirements.txt` file, pinning to a major (or minor) version, like if you want to stick to using the SDK `v2.12.0` release, that can be done like this:

```sh
deepgram-sdk==2.*
```

Or using pip:

```sh
pip install deepgram-sdk==2.*
```

Pinning to a specific version can be done like this in a `requirements.txt` file:

```sh
deepgram-sdk==2.12.0
```

Or using pip:

```sh
pip install deepgram-sdk==2.12.0
```

We guarantee that major interfaces will not break in a given major semver (ie `2.*` release). However, all bets are off moving from a `2.*` to `3.*` major release. This follows standard semver best-practices.

## Quickstarts

This SDK aims to reduce complexity and abtract/hide some internal Deepgram details that clients shouldn't need to know about.  However you can still tweak options and settings if you need.

### PreRecorded Audio Transcription Quickstart

You can find a [walkthrough](https://developers.deepgram.com/docs/python-sdk-pre-recorded-transcription) on our documentation site. Transcribing Pre-Recorded Audio can be done using the following sample code:

```python
AUDIO_URL = {
    "url": "https://static.deepgram.com/examples/Bueller-Life-moves-pretty-fast.wav"
}

## STEP 1 Create a Deepgram client using the API key from environment variables
deepgram: DeepgramClient = DeepgramClient("", ClientOptionsFromEnv())

## STEP 2 Call the transcribe_url method on the prerecorded class
options: PrerecordedOptions = PrerecordedOptions(
    model="nova-2",
    smart_format=True,
)
response = deepgram.listen.rest.v("1").transcribe_url(AUDIO_URL, options)
print(f"response: {response}\n\n")
```

### Live Audio Transcription Quickstart

You can find a [walkthrough](https://developers.deepgram.com/docs/live-streaming-audio-transcription) on our documentation site. Transcribing Live Audio can be done using the following sample code:

```python
deepgram: DeepgramClient = DeepgramClient()

dg_connection = deepgram.listen.websocket.v("1")

def on_open(self, open, **kwargs):
    print(f"\n\n{open}\n\n")

def on_message(self, result, **kwargs):
    sentence = result.channel.alternatives[0].transcript
    if len(sentence) == 0:
        return
    print(f"speaker: {sentence}")

def on_metadata(self, metadata, **kwargs):
    print(f"\n\n{metadata}\n\n")

def on_speech_started(self, speech_started, **kwargs):
    print(f"\n\n{speech_started}\n\n")

def on_utterance_end(self, utterance_end, **kwargs):
    print(f"\n\n{utterance_end}\n\n")

def on_error(self, error, **kwargs):
    print(f"\n\n{error}\n\n")

def on_close(self, close, **kwargs):
    print(f"\n\n{close}\n\n")

dg_connection.on(LiveTranscriptionEvents.Open, on_open)
dg_connection.on(LiveTranscriptionEvents.Transcript, on_message)
dg_connection.on(LiveTranscriptionEvents.Metadata, on_metadata)
dg_connection.on(LiveTranscriptionEvents.SpeechStarted, on_speech_started)
dg_connection.on(LiveTranscriptionEvents.UtteranceEnd, on_utterance_end)
dg_connection.on(LiveTranscriptionEvents.Error, on_error)
dg_connection.on(LiveTranscriptionEvents.Close, on_close)

options: LiveOptions = LiveOptions(
    model="nova-2",
    punctuate=True,
    language="en-US",
    encoding="linear16",
    channels=1,
    sample_rate=16000,
    ## To get UtteranceEnd, the following must be set:
    interim_results=True,
    utterance_end_ms="1000",
    vad_events=True,
)
dg_connection.start(options)

## create microphone
microphone = Microphone(dg_connection.send)

## start microphone
microphone.start()

## wait until finished
input("Press Enter to stop recording...\n\n")

## Wait for the microphone to close
microphone.finish()

## Indicate that we've finished
dg_connection.finish()

print("Finished")
```

## Examples

There are examples for **every** API call in this SDK. You can find all of these examples in the [examples folder](https://github.com/deepgram/deepgram-python-sdk/tree/main/examples) at the root of this repo.

Before running any of these examples, then you need to take a look at the README and install the following dependencies:

```bash
pip install -r examples/requirements-examples.txt
```

Text to Speech:

- Asynchronous - [examples/text-to-speech](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/text-to-speech/rest/file/async_hello_world/main.py)
- Synchronous - [examples/text-to-speech](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/text-to-speech/rest/file/hello_world/main.py)

Analyze Text:

- Intent Recognition - [examples/analyze/intent](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/analyze/intent/main.py)
- Sentiment Analysis - [examples/sentiment/intent](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/analyze/sentiment/main.py)
- Summarization - [examples/analyze/intent](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/analyze/summary/main.py)
- Topic Detection - [examples/analyze/intent](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/analyze/topic/main.py)

PreRecorded Audio:

- Transcription From an Audio File - [examples/prerecorded/file](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/speech-to-text/rest/file/main.py)
- Transcription From an URL - [examples/prerecorded/url](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/speech-to-text/rest/url/main.py)
- Intent Recognition - [examples/speech-to-text/rest/intent](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/speech-to-text/rest/intent/main.py)
- Sentiment Analysis - [examples/speech-to-text/rest/sentiment](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/speech-to-text/rest/sentiment/main.py)
- Summarization - [examples/speech-to-text/rest/summary](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/speech-to-text/rest/summary/main.py)
- Topic Detection - [examples/speech-to-text/rest/topic](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/speech-to-text/rest/topic/main.py)

Live Audio Transcription:

- From a Microphone - [examples/streaming/microphone](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/speech-to-text/rest/stream_file/main.py)
- From an HTTP Endpoint - [examples/streaming/http](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/speech-to-text/rest/async_url/main.py)

Management API exercise the full [CRUD](https://en.wikipedia.org/wiki/Create,_read,_update_and_delete) operations for:

- Balances - [examples/manage/balances](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/manage/balances/main.py)
- Invitations - [examples/manage/invitations](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/manage/invitations/main.py)
- Keys - [examples/manage/keys](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/manage/keys/main.py)
- Members - [examples/manage/members](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/manage/members/main.py)
- Projects - [examples/manage/projects](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/manage/projects/main.py)
- Scopes - [examples/manage/scopes](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/manage/scopes/main.py)
- Usage - [examples/manage/usage](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/manage/usage/main.py)

To run each example set the `DEEPGRAM_API_KEY` as an environment variable, then `cd` into each example folder and execute the example: `go run main.py`.

## Logging

This SDK provides logging as a means to troubleshoot and debug issues encountered. By default, this SDK will enable `Information` level messages and higher (ie `Warning`, `Error`, etc) when you initialize the library as follows:

```python
deepgram: DeepgramClient = DeepgramClient()
```

To increase the logging output/verbosity for debug or troubleshooting purposes, you can set the `DEBUG` level but using this code:

```python
config: DeepgramClientOptions = DeepgramClientOptions(
    verbose=logging.DEBUG,
)
deepgram: DeepgramClient = DeepgramClient("", config)
```

## Backwards Compatibility

Older SDK versions will receive Priority 1 (P1) bug support only. Security issues, both in our code and dependencies, are promptly addressed. Significant bugs without clear workarounds are also given priority attention.

## Development and Contributing

Interested in contributing? We ❤️ pull requests!

To make sure our community is safe for all, be sure to review and agree to our
[Code of Conduct](https://github.com/deepgram/deepgram-python-sdk/blob/main/.github/CODE_OF_CONDUCT.md). Then see the
[Contribution](https://github.com/deepgram/deepgram-python-sdk/blob/main/.github/CONTRIBUTING.md) guidelines for more information.

### Prerequisites

In order to develop new features for the SDK itself, you first need to uninstall any previous installation of the `deepgram-sdk` and then install/pip the dependencies contained in the `requirements.txt` then instruct python (via pip) to use the SDK by installing it locally.

From the root of the repo, that would entail:

```bash
pip uninstall deepgram-sdk
pip install -r requirements.txt
pip install -e .
```

### Daily and Unit Tests

If you are looking to use, run, contribute or modify to the daily/unit tests, then you need to install the following dependencies:

```bash
pip install -r requirements-dev.txt
```

#### Daily Tests

The daily tests invoke a series of checks against the actual/real API endpoint and save the results in the `tests/response_data` folder. This response data is updated nightly to reflect the latest response from the server. Running the daily tests does require a `DEEPGRAM_API_KEY` set in your environment variables.

To run the Daily Tests:

```bash
make daily-test
```

#### Unit Tests

The unit tests invoke a series of checks against mock endpoints using the responses saved in `tests/response_data` from the daily tests. These tests are meant to simulate running against the endpoint without actually reaching out to the endpoint; running the unit tests does require a `DEEPGRAM_API_KEY` set in your environment variables, but you will not actually reach out to the server.

```bash
make unit-test
```

## Getting Help

We love to hear from you so if you have questions, comments or find a bug in the
project, let us know! You can either:

- [Open an issue in this repository](https://github.com/deepgram/deepgram-python-sdk/issues/new)
- [Join the Deepgram Github Discussions Community](https://github.com/orgs/deepgram/discussions)
- [Join the Deepgram Discord Community](https://discord.gg/xWRaCDBtW4)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/deepgram/deepgram-python-sdk",
    "name": "deepgram-unstable-sdk",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "deepgram, deepgram speech-to-text",
    "author": "Deepgram",
    "author_email": "devrel@deepgram.com",
    "download_url": "https://files.pythonhosted.org/packages/eb/fa/6aceaad3a94eb475a889ec3511e253b523b69cc7e6a785251edc297e1a3f/deepgram_unstable_sdk-3.8.0.dev3.tar.gz",
    "platform": null,
    "description": "# Deepgram Python SDK\n\n[![Discord](https://dcbadge.vercel.app/api/server/xWRaCDBtW4?style=flat)](https://discord.gg/xWRaCDBtW4) [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/deepgram/deepgram-python-sdk/CI)](https://github.com/deepgram/deepgram-python-sdk/actions/workflows/CI.yml) [![PyPI](https://img.shields.io/pypi/v/deepgram-sdk)](https://pypi.org/project/deepgram-sdk/)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg?style=flat-rounded)](./.github/CODE_OF_CONDUCT.md)\n\nOfficial Python SDK for [Deepgram](https://www.deepgram.com/). Power your apps with world-class speech and Language AI models.\n\n- [Deepgram Python SDK](#deepgram-python-sdk)\n- [Documentation](#documentation)\n- [Getting an API Key](#getting-an-api-key)\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Quickstarts](#quickstarts)\n  - [PreRecorded Audio Transcription Quickstart](#prerecorded-audio-transcription-quickstart)\n  - [Live Audio Transcription Quickstart](#live-audio-transcription-quickstart)\n- [Examples](#examples)\n- [Logging](#logging)\n- [Backwards Compatibility](#backwards-compatibility)\n- [Development and Contributing](#development-and-contributing)\n- [Getting Help](#getting-help)\n\n## Documentation\n\nYou can learn more about the Deepgram API at [developers.deepgram.com](https://developers.deepgram.com/docs).\n\n## Getting an API Key\n\n\ud83d\udd11 To access the Deepgram API you will need a [free Deepgram API Key](https://console.deepgram.com/signup?jump=keys).\n\n## Requirements\n\n[Python](https://www.python.org/downloads/) (version ^3.10)\n\n## Installation\n\nTo install the latest version available (which will guarantee change over time):\n\n```sh\npip install deepgram-sdk\n```\n\nIf you are going to write an application to consume this SDK, it's [highly recommended](https://discuss.python.org/t/how-to-pin-a-package-to-a-specific-major-version-or-lower/17077) and a [programming staple](https://www.easypost.com/dependency-pinning-guide) to pin to at **least** a major version of an SDK (ie `==2.*`) or **with due diligence**, to a minor and/or specific version (ie `==2.1.*` or `==2.12.0`, respectively). If you are unfamiliar with [semantic versioning or semver](https://semver.org/), it's a must-read.\n\nIn a `requirements.txt` file, pinning to a major (or minor) version, like if you want to stick to using the SDK `v2.12.0` release, that can be done like this:\n\n```sh\ndeepgram-sdk==2.*\n```\n\nOr using pip:\n\n```sh\npip install deepgram-sdk==2.*\n```\n\nPinning to a specific version can be done like this in a `requirements.txt` file:\n\n```sh\ndeepgram-sdk==2.12.0\n```\n\nOr using pip:\n\n```sh\npip install deepgram-sdk==2.12.0\n```\n\nWe guarantee that major interfaces will not break in a given major semver (ie `2.*` release). However, all bets are off moving from a `2.*` to `3.*` major release. This follows standard semver best-practices.\n\n## Quickstarts\n\nThis SDK aims to reduce complexity and abtract/hide some internal Deepgram details that clients shouldn't need to know about.  However you can still tweak options and settings if you need.\n\n### PreRecorded Audio Transcription Quickstart\n\nYou can find a [walkthrough](https://developers.deepgram.com/docs/python-sdk-pre-recorded-transcription) on our documentation site. Transcribing Pre-Recorded Audio can be done using the following sample code:\n\n```python\nAUDIO_URL = {\n    \"url\": \"https://static.deepgram.com/examples/Bueller-Life-moves-pretty-fast.wav\"\n}\n\n## STEP 1 Create a Deepgram client using the API key from environment variables\ndeepgram: DeepgramClient = DeepgramClient(\"\", ClientOptionsFromEnv())\n\n## STEP 2 Call the transcribe_url method on the prerecorded class\noptions: PrerecordedOptions = PrerecordedOptions(\n    model=\"nova-2\",\n    smart_format=True,\n)\nresponse = deepgram.listen.rest.v(\"1\").transcribe_url(AUDIO_URL, options)\nprint(f\"response: {response}\\n\\n\")\n```\n\n### Live Audio Transcription Quickstart\n\nYou can find a [walkthrough](https://developers.deepgram.com/docs/live-streaming-audio-transcription) on our documentation site. Transcribing Live Audio can be done using the following sample code:\n\n```python\ndeepgram: DeepgramClient = DeepgramClient()\n\ndg_connection = deepgram.listen.websocket.v(\"1\")\n\ndef on_open(self, open, **kwargs):\n    print(f\"\\n\\n{open}\\n\\n\")\n\ndef on_message(self, result, **kwargs):\n    sentence = result.channel.alternatives[0].transcript\n    if len(sentence) == 0:\n        return\n    print(f\"speaker: {sentence}\")\n\ndef on_metadata(self, metadata, **kwargs):\n    print(f\"\\n\\n{metadata}\\n\\n\")\n\ndef on_speech_started(self, speech_started, **kwargs):\n    print(f\"\\n\\n{speech_started}\\n\\n\")\n\ndef on_utterance_end(self, utterance_end, **kwargs):\n    print(f\"\\n\\n{utterance_end}\\n\\n\")\n\ndef on_error(self, error, **kwargs):\n    print(f\"\\n\\n{error}\\n\\n\")\n\ndef on_close(self, close, **kwargs):\n    print(f\"\\n\\n{close}\\n\\n\")\n\ndg_connection.on(LiveTranscriptionEvents.Open, on_open)\ndg_connection.on(LiveTranscriptionEvents.Transcript, on_message)\ndg_connection.on(LiveTranscriptionEvents.Metadata, on_metadata)\ndg_connection.on(LiveTranscriptionEvents.SpeechStarted, on_speech_started)\ndg_connection.on(LiveTranscriptionEvents.UtteranceEnd, on_utterance_end)\ndg_connection.on(LiveTranscriptionEvents.Error, on_error)\ndg_connection.on(LiveTranscriptionEvents.Close, on_close)\n\noptions: LiveOptions = LiveOptions(\n    model=\"nova-2\",\n    punctuate=True,\n    language=\"en-US\",\n    encoding=\"linear16\",\n    channels=1,\n    sample_rate=16000,\n    ## To get UtteranceEnd, the following must be set:\n    interim_results=True,\n    utterance_end_ms=\"1000\",\n    vad_events=True,\n)\ndg_connection.start(options)\n\n## create microphone\nmicrophone = Microphone(dg_connection.send)\n\n## start microphone\nmicrophone.start()\n\n## wait until finished\ninput(\"Press Enter to stop recording...\\n\\n\")\n\n## Wait for the microphone to close\nmicrophone.finish()\n\n## Indicate that we've finished\ndg_connection.finish()\n\nprint(\"Finished\")\n```\n\n## Examples\n\nThere are examples for **every** API call in this SDK. You can find all of these examples in the [examples folder](https://github.com/deepgram/deepgram-python-sdk/tree/main/examples) at the root of this repo.\n\nBefore running any of these examples, then you need to take a look at the README and install the following dependencies:\n\n```bash\npip install -r examples/requirements-examples.txt\n```\n\nText to Speech:\n\n- Asynchronous - [examples/text-to-speech](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/text-to-speech/rest/file/async_hello_world/main.py)\n- Synchronous - [examples/text-to-speech](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/text-to-speech/rest/file/hello_world/main.py)\n\nAnalyze Text:\n\n- Intent Recognition - [examples/analyze/intent](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/analyze/intent/main.py)\n- Sentiment Analysis - [examples/sentiment/intent](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/analyze/sentiment/main.py)\n- Summarization - [examples/analyze/intent](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/analyze/summary/main.py)\n- Topic Detection - [examples/analyze/intent](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/analyze/topic/main.py)\n\nPreRecorded Audio:\n\n- Transcription From an Audio File - [examples/prerecorded/file](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/speech-to-text/rest/file/main.py)\n- Transcription From an URL - [examples/prerecorded/url](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/speech-to-text/rest/url/main.py)\n- Intent Recognition - [examples/speech-to-text/rest/intent](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/speech-to-text/rest/intent/main.py)\n- Sentiment Analysis - [examples/speech-to-text/rest/sentiment](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/speech-to-text/rest/sentiment/main.py)\n- Summarization - [examples/speech-to-text/rest/summary](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/speech-to-text/rest/summary/main.py)\n- Topic Detection - [examples/speech-to-text/rest/topic](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/speech-to-text/rest/topic/main.py)\n\nLive Audio Transcription:\n\n- From a Microphone - [examples/streaming/microphone](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/speech-to-text/rest/stream_file/main.py)\n- From an HTTP Endpoint - [examples/streaming/http](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/speech-to-text/rest/async_url/main.py)\n\nManagement API exercise the full [CRUD](https://en.wikipedia.org/wiki/Create,_read,_update_and_delete) operations for:\n\n- Balances - [examples/manage/balances](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/manage/balances/main.py)\n- Invitations - [examples/manage/invitations](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/manage/invitations/main.py)\n- Keys - [examples/manage/keys](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/manage/keys/main.py)\n- Members - [examples/manage/members](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/manage/members/main.py)\n- Projects - [examples/manage/projects](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/manage/projects/main.py)\n- Scopes - [examples/manage/scopes](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/manage/scopes/main.py)\n- Usage - [examples/manage/usage](https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/manage/usage/main.py)\n\nTo run each example set the `DEEPGRAM_API_KEY` as an environment variable, then `cd` into each example folder and execute the example: `go run main.py`.\n\n## Logging\n\nThis SDK provides logging as a means to troubleshoot and debug issues encountered. By default, this SDK will enable `Information` level messages and higher (ie `Warning`, `Error`, etc) when you initialize the library as follows:\n\n```python\ndeepgram: DeepgramClient = DeepgramClient()\n```\n\nTo increase the logging output/verbosity for debug or troubleshooting purposes, you can set the `DEBUG` level but using this code:\n\n```python\nconfig: DeepgramClientOptions = DeepgramClientOptions(\n    verbose=logging.DEBUG,\n)\ndeepgram: DeepgramClient = DeepgramClient(\"\", config)\n```\n\n## Backwards Compatibility\n\nOlder SDK versions will receive Priority 1 (P1) bug support only. Security issues, both in our code and dependencies, are promptly addressed. Significant bugs without clear workarounds are also given priority attention.\n\n## Development and Contributing\n\nInterested in contributing? We \u2764\ufe0f pull requests!\n\nTo make sure our community is safe for all, be sure to review and agree to our\n[Code of Conduct](https://github.com/deepgram/deepgram-python-sdk/blob/main/.github/CODE_OF_CONDUCT.md). Then see the\n[Contribution](https://github.com/deepgram/deepgram-python-sdk/blob/main/.github/CONTRIBUTING.md) guidelines for more information.\n\n### Prerequisites\n\nIn order to develop new features for the SDK itself, you first need to uninstall any previous installation of the `deepgram-sdk` and then install/pip the dependencies contained in the `requirements.txt` then instruct python (via pip) to use the SDK by installing it locally.\n\nFrom the root of the repo, that would entail:\n\n```bash\npip uninstall deepgram-sdk\npip install -r requirements.txt\npip install -e .\n```\n\n### Daily and Unit Tests\n\nIf you are looking to use, run, contribute or modify to the daily/unit tests, then you need to install the following dependencies:\n\n```bash\npip install -r requirements-dev.txt\n```\n\n#### Daily Tests\n\nThe daily tests invoke a series of checks against the actual/real API endpoint and save the results in the `tests/response_data` folder. This response data is updated nightly to reflect the latest response from the server. Running the daily tests does require a `DEEPGRAM_API_KEY` set in your environment variables.\n\nTo run the Daily Tests:\n\n```bash\nmake daily-test\n```\n\n#### Unit Tests\n\nThe unit tests invoke a series of checks against mock endpoints using the responses saved in `tests/response_data` from the daily tests. These tests are meant to simulate running against the endpoint without actually reaching out to the endpoint; running the unit tests does require a `DEEPGRAM_API_KEY` set in your environment variables, but you will not actually reach out to the server.\n\n```bash\nmake unit-test\n```\n\n## Getting Help\n\nWe love to hear from you so if you have questions, comments or find a bug in the\nproject, let us know! You can either:\n\n- [Open an issue in this repository](https://github.com/deepgram/deepgram-python-sdk/issues/new)\n- [Join the Deepgram Github Discussions Community](https://github.com/orgs/deepgram/discussions)\n- [Join the Deepgram Discord Community](https://discord.gg/xWRaCDBtW4)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "The official Python SDK for the Deepgram automated speech recognition platform.",
    "version": "3.8.0.dev3",
    "project_urls": {
        "Homepage": "https://github.com/deepgram/deepgram-python-sdk"
    },
    "split_keywords": [
        "deepgram",
        " deepgram speech-to-text"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "688c44554c08bf81f118b1df96dacf9a685875b43db95c722b2dd96a7967d31d",
                "md5": "7f25a31da68938ba86a6a8e1ffe4060b",
                "sha256": "9d966df357247e9e12d23f56c7829ad5e8bd4eb710878caa5a0d6f3e77292e28"
            },
            "downloads": -1,
            "filename": "deepgram_unstable_sdk-3.8.0.dev3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7f25a31da68938ba86a6a8e1ffe4060b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 147737,
            "upload_time": "2024-11-04T18:31:29",
            "upload_time_iso_8601": "2024-11-04T18:31:29.454067Z",
            "url": "https://files.pythonhosted.org/packages/68/8c/44554c08bf81f118b1df96dacf9a685875b43db95c722b2dd96a7967d31d/deepgram_unstable_sdk-3.8.0.dev3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ebfa6aceaad3a94eb475a889ec3511e253b523b69cc7e6a785251edc297e1a3f",
                "md5": "9817241247052d2d7fb80cb05fe89d86",
                "sha256": "f1bc697b096119c15a0d7b4095d07cbe2664a5835b96ea83bb9dbbf43c1db368"
            },
            "downloads": -1,
            "filename": "deepgram_unstable_sdk-3.8.0.dev3.tar.gz",
            "has_sig": false,
            "md5_digest": "9817241247052d2d7fb80cb05fe89d86",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 90572,
            "upload_time": "2024-11-04T18:31:31",
            "upload_time_iso_8601": "2024-11-04T18:31:31.850061Z",
            "url": "https://files.pythonhosted.org/packages/eb/fa/6aceaad3a94eb475a889ec3511e253b523b69cc7e6a785251edc297e1a3f/deepgram_unstable_sdk-3.8.0.dev3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-04 18:31:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "deepgram",
    "github_project": "deepgram-python-sdk",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "deepgram-unstable-sdk"
}
        
Elapsed time: 1.23984s