Skip to content

Commit

Permalink
Merge pull request #417 from dvonthenen/fix-imports-verboselogs
Browse files Browse the repository at this point in the history
Fix Import of Verboselogs Package Dependency
  • Loading branch information
davidvonthenen authored Jun 12, 2024
2 parents 195ed28 + a131919 commit 344cb46
Show file tree
Hide file tree
Showing 22 changed files with 56 additions and 22 deletions.
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
from .utils import VerboseLogger
from .utils import (
NOTICE,
SPAM,
SUCCESS,
VERBOSE,
WARNING,
ERROR,
FATAL,
CRITICAL,
INFO,
DEBUG,
NOTSET,
)

from .client import Deepgram, DeepgramClient
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
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
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,
)

0 comments on commit 344cb46

Please sign in to comment.