<s> from . platform import Platform <EOL> from . subscription import Subscription <EOL> from . mocks import Registry <EOL> from . mocks import Client as MockClient <EOL> from . http import Client as HttpClient <EOL> from . pubnub import PubnubFactory <EOL> class SDK : <EOL> def __init__ ( self , key , secret , server , name = '<STR_LIT>' , version = '<STR_LIT>' , use_http_mock = False , use_pubnub_mock = False ) : <EOL> self . _registry = Registry ( ) <EOL> self . _client = HttpClient ( ) if not use_http_mock else MockClient ( self . _registry ) <EOL> self . _pubnub_factory = PubnubFactory ( use_pubnub_mock ) <EOL> self . _platform = Platform ( self . _client , key , secret , server , name , version ) <EOL> def mock_registry ( self ) : <EOL> return self . _registry <EOL> def platform ( self ) : <EOL> return self . _platform <EOL> def create_subscription ( self ) : <EOL> return Subscription ( self . _platform , self . _pubnub_factory ) </s>
