Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Import of Verboselogs Package Dependency #417

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion deepgram/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,22 @@
__version__ = "0.0.0"

# entry point for the deepgram python sdk
from .client import verboselogs
import logging
davidvonthenen marked this conversation as resolved.
Show resolved Hide resolved
from .utils import VerboseLogger
from .utils import (
NOTICE,
SPAM,
SUCCESS,
VERBOSE,
WARNING,
ERROR,
FATAL,
CRITICAL,
INFO,
DEBUG,
NOTSET,
)

from .client import Deepgram, DeepgramClient
davidvonthenen marked this conversation as resolved.
Show resolved Hide resolved
davidvonthenen marked this conversation as resolved.
Show resolved Hide resolved
from .client import DeepgramClientOptions, ClientOptionsFromEnv
from .client import DeepgramApiKeyError, DeepgramModuleError
Expand Down
2 changes: 1 addition & 1 deletion deepgram/audio/microphone/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Use of this source code is governed by a MIT license that can be found in the LICENSE file.
# SPDX-License-Identifier: MIT

from deepgram.utils import verboselogs
from ...utils import verboselogs

# Constants for microphone

Expand Down
2 changes: 1 addition & 1 deletion deepgram/audio/microphone/microphone.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from typing import Optional, Callable
import logging

from deepgram.utils import verboselogs
from ...utils import verboselogs
from .constants import LOGGING, CHANNELS, RATE, CHUNK


Expand Down
2 changes: 1 addition & 1 deletion deepgram/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import os

import logging
from deepgram.utils import verboselogs
from .utils import verboselogs

# common
# pylint: disable=unused-import
Expand Down
2 changes: 1 addition & 1 deletion deepgram/clients/analyze/v1/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import httpx

from deepgram.utils import verboselogs
from ....utils import verboselogs
from ....options import DeepgramClientOptions
from ...abstract_async_client import AbstractAsyncRestClient
from ..errors import DeepgramError, DeepgramTypeError
Expand Down
2 changes: 1 addition & 1 deletion deepgram/clients/analyze/v1/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import httpx

from deepgram.utils import verboselogs
from ....utils import verboselogs
from ....options import DeepgramClientOptions
from ...abstract_sync_client import AbstractSyncRestClient
from ..errors import DeepgramError, DeepgramTypeError
Expand Down
4 changes: 2 additions & 2 deletions deepgram/clients/analyze/v1/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
# Use of this source code is governed by a MIT license that can be found in the LICENSE file.
# SPDX-License-Identifier: MIT

from typing import List, Union, Optional
import logging
from typing import List, Union, Optional

from dataclasses import dataclass, field
from dataclasses_json import config as dataclass_config, DataClassJsonMixin

from deepgram.utils import verboselogs
from ....utils import verboselogs
davidvonthenen marked this conversation as resolved.
Show resolved Hide resolved
from ...common import FileSource, StreamSource, UrlSource


Expand Down
2 changes: 1 addition & 1 deletion deepgram/clients/listen.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from importlib import import_module
import logging

from deepgram.utils import verboselogs
from ..utils import verboselogs
from ..options import DeepgramClientOptions
from .errors import DeepgramModuleError

Expand Down
2 changes: 1 addition & 1 deletion deepgram/clients/live/v1/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import websockets
from websockets.client import WebSocketClientProtocol

from deepgram.utils import verboselogs
from ....utils import verboselogs
from ....options import DeepgramClientOptions
from ..enums import LiveTranscriptionEvents
from ..helpers import convert_to_websocket_url, append_query_params
Expand Down
2 changes: 1 addition & 1 deletion deepgram/clients/live/v1/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from websockets.sync.client import connect, ClientConnection
import websockets

from deepgram.utils import verboselogs
from ....utils import verboselogs
davidvonthenen marked this conversation as resolved.
Show resolved Hide resolved
from ....options import DeepgramClientOptions
from ..enums import LiveTranscriptionEvents
from ..helpers import convert_to_websocket_url, append_query_params
Expand Down
2 changes: 1 addition & 1 deletion deepgram/clients/manage/v1/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import httpx

from deepgram.utils import verboselogs
from ....utils import verboselogs
from ....options import DeepgramClientOptions
from ...abstract_async_client import AbstractAsyncRestClient

Expand Down
2 changes: 1 addition & 1 deletion deepgram/clients/manage/v1/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import httpx

from deepgram.utils import verboselogs
from ....utils import verboselogs
from ....options import DeepgramClientOptions
from ...abstract_sync_client import AbstractSyncRestClient

Expand Down
2 changes: 1 addition & 1 deletion deepgram/clients/prerecorded/v1/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import httpx

from deepgram.utils import verboselogs
from ....utils import verboselogs
from ....options import DeepgramClientOptions
from ...abstract_async_client import AbstractAsyncRestClient
from ..errors import DeepgramError, DeepgramTypeError
Expand Down
2 changes: 1 addition & 1 deletion deepgram/clients/prerecorded/v1/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import httpx

from deepgram.utils import verboselogs
from ....utils import verboselogs
from ....options import DeepgramClientOptions
from ...abstract_sync_client import AbstractSyncRestClient
from ..errors import DeepgramError, DeepgramTypeError
Expand Down
2 changes: 1 addition & 1 deletion deepgram/clients/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from importlib import import_module
import logging

from deepgram.utils import verboselogs
from ..utils import verboselogs
from ..options import DeepgramClientOptions
from .errors import DeepgramModuleError

Expand Down
2 changes: 1 addition & 1 deletion deepgram/clients/selfhosted/v1/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import httpx

from deepgram.utils import verboselogs
from ....utils import verboselogs
from ....options import DeepgramClientOptions
from ...abstract_async_client import AbstractAsyncRestClient

Expand Down
2 changes: 1 addition & 1 deletion deepgram/clients/selfhosted/v1/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import httpx

from deepgram.utils import verboselogs
from ....utils import verboselogs
from ....options import DeepgramClientOptions
from ...abstract_sync_client import AbstractSyncRestClient

Expand Down
2 changes: 1 addition & 1 deletion deepgram/clients/speak/v1/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import httpx

from deepgram.utils import verboselogs
from ....utils import verboselogs
from ....options import DeepgramClientOptions
from ...abstract_async_client import AbstractAsyncRestClient
from ..errors import DeepgramError, DeepgramTypeError
Expand Down
2 changes: 1 addition & 1 deletion deepgram/clients/speak/v1/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import httpx

from deepgram.utils import verboselogs
from ....utils import verboselogs
from ....options import DeepgramClientOptions
from ...abstract_sync_client import AbstractSyncRestClient
from ..errors import DeepgramError, DeepgramTypeError
Expand Down
2 changes: 1 addition & 1 deletion deepgram/clients/speak/v1/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from dataclasses import dataclass, field
from dataclasses_json import config as dataclass_config, DataClassJsonMixin

from deepgram.utils import verboselogs
from ....utils import verboselogs
from ...common import FileSource


Expand Down
2 changes: 1 addition & 1 deletion deepgram/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import numbers

from deepgram import __version__
from deepgram.utils import verboselogs
from .utils import verboselogs
from .errors import DeepgramApiKeyError


Expand Down
19 changes: 19 additions & 0 deletions deepgram/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2024 Deepgram SDK contributors. All Rights Reserved.
# Use of this source code is governed by a MIT license that can be found in the LICENSE file.
# SPDX-License-Identifier: MIT

import logging
from .verboselogs import VerboseLogger
from .verboselogs import (
NOTICE,
SPAM,
SUCCESS,
VERBOSE,
WARNING,
ERROR,
FATAL,
CRITICAL,
INFO,
DEBUG,
NOTSET,
)
Loading