Skip to content
Draft
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
10 changes: 10 additions & 0 deletions ldclient/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,14 @@ def _reset_client():
__BASE_TYPES__ = (str, float, int, bool)


def __getattr__(name):
if name == 'AsyncLDClient':
from ldclient.async_client import AsyncLDClient
return AsyncLDClient
raise AttributeError("module 'ldclient' has no attribute %r" % name)


# AsyncLDClient is intentionally omitted from __all__ so that
# `from ldclient import *` does not import aiohttp. It still resolves lazily
# via __getattr__ as `ldclient.AsyncLDClient`.
__all__ = ['Config', 'Context', 'ContextBuilder', 'ContextMultiBuilder', 'LDClient', 'Result', 'client', 'context', 'evaluation', 'integrations', 'interfaces', 'migrations']
Loading
Loading