gohumanloop 0.0.4__py3-none-any.whl → 0.0.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
gohumanloop/__init__.py CHANGED
@@ -12,24 +12,32 @@ from gohumanloop.manager.ghl_manager import GoHumanLoopManager
12
12
 
13
13
  from gohumanloop.providers.ghl_provider import GoHumanLoopProvider
14
14
  from gohumanloop.providers.api_provider import APIProvider
15
- from gohumanloop.providers.email_provider import EmailProvider
16
15
  from gohumanloop.providers.base import BaseProvider
17
16
  from gohumanloop.providers.terminal_provider import TerminalProvider
18
17
 
19
18
  from gohumanloop.utils import run_async_safely, get_secret_from_env
20
19
 
20
+ # Conditionally import EmailProvider
21
+ try:
22
+ from gohumanloop.providers.email_provider import EmailProvider # noqa: F401
23
+
24
+ _has_email = True
25
+ except ImportError:
26
+ _has_email = False
27
+
21
28
  # Dynamically get version number
22
29
  try:
23
30
  from importlib.metadata import version, PackageNotFoundError
31
+
24
32
  try:
25
33
  __version__ = version("gohumanloop")
26
34
  except PackageNotFoundError:
27
35
  import os
28
36
  import tomli
29
-
37
+
30
38
  root_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
31
39
  pyproject_path = os.path.join(root_dir, "pyproject.toml")
32
-
40
+
33
41
  with open(pyproject_path, "rb") as f:
34
42
  pyproject_data = tomli.load(f)
35
43
  __version__ = pyproject_data["project"]["version"]
@@ -44,22 +52,20 @@ __all__ = [
44
52
  "HumanLoopResult",
45
53
  "HumanLoopStatus",
46
54
  "HumanLoopType",
47
-
48
55
  # Manager Implementations
49
56
  "DefaultHumanLoopManager",
50
57
  "GoHumanLoopManager",
51
-
52
58
  # Provider Implementations
53
59
  "BaseProvider",
54
60
  "APIProvider",
55
61
  "GoHumanLoopProvider",
56
- "EmailProvider",
57
62
  "TerminalProvider",
58
-
59
63
  # Utility Functions
60
64
  "run_async_safely",
61
65
  "get_secret_from_env",
62
-
63
66
  # Version Information
64
67
  "__version__",
65
- ]
68
+ ]
69
+
70
+ if _has_email:
71
+ __all__.append("EmailProvider")
@@ -4,8 +4,8 @@ from .langgraph_adapter import (
4
4
  default_langgraph_callback_factory,
5
5
  interrupt,
6
6
  create_resume_command,
7
- acreate_resume_command
8
- )
7
+ acreate_resume_command,
8
+ )
9
9
 
10
10
  __all__ = [
11
11
  "LangGraphAdapter",
@@ -13,5 +13,5 @@ __all__ = [
13
13
  "default_langgraph_callback_factory",
14
14
  "interrupt",
15
15
  "create_resume_command",
16
- "acreate_resume_command"
17
- ]
16
+ "acreate_resume_command",
17
+ ]