Metadata-Version: 2.1
Name: pysynapps-barix
Version: 0.0.1
Summary: Synapps library
Home-page: UNKNOWN
Author: Ana Almeida
Author-email: ana@barix.com
License: UNKNOWN
Description: # Synapps
         
        Python3 synapps library developed by Barix.
        
        It can be integrated as an AudioSource or as a Standalone aplication.
         
         
        ## Initialize a synapps client
        
        ```
        from synapps import SynAppsClient, SynAppsConfiguration, player_iface
        
        synappsconfig = SynAppsConfiguration.SynAppsConfig()
        synapps = SynAppsClient.SynAppsDevice(synappsconfig)
        synapps.createHandler()
        synapps.connect(synappsconfig.CommandProtocol)
        ```
        
        ### Configure Synapps client
        
        *SynAppsConfiguration.SynAppsConfig(NameOfManufacturer="Barix", Model="IPAM400", firmwareVersion="1.3.1", 
                        apiVersion="1.1", Host="0.0.0.0", CommandPort=44444, CommandProtocol="UDP", 
                        ignoreStopFlag=False, useVlc=True, useSysLogFlag=True, debugLevel="debug", 
                        use_udp_controlled_player=False, player_udp_port=9999, synappsServerAddr="auto")*
        
        
        * NameOfManufacturer (string)- Manufacturer ID string (128 characters max). Default value: "Barix"
        * Model (string)- Device model string (64 characters max). Default value: "IPAM400"
        * firmwareVersion (string)- Firmware revision of the device (64 characters max). Default value: "1.3.1"
        * apiVersion (string)- API version. Default value: "1.1"
        * Host (string)- IP address which the device will be listening to the Synapps notification platform's commands. Default value: "0.0.0.0"
        * CommandPort (int)- Port which the device will be listening to. Default value: 44444
        * CommandProtocol (string)- Through which protocol (udp/tcp) the Synapps notification platform will send commands. Default value: "UDP"
        * ignoreStopFlag (bool)- If set to True, the application will ignore the STOP command and keep playing. Default value: False
        * useVlc (bool)- Indicates if VLC is the audio player of choice. If use_udp_controlled_player is set to True, then useVlc flag is ignored. Default value: True
        * useSysLogFlag (bool)- If useSysLogFlag is True, logs are sent to syslog. If useSysLogFlag is False, logs are sent to stdout. Default value: True
        * debugLevel (string)- Level of the logger. Default value: "debug"
        * use_udp_controlled_player (bool)- Indicates if the audio player is  managed via udp or direct shell execution
        * player_udp_port (int)- UDP Player socket port
        * synappsServerAddr (string)- Synapps notification platform IP address. If set to "auto", the application will discover the server IP address through 72 DHCP discovery process. Otherwise, the IP address should be provided. Defaul value: "auto"
        
        
        *SynAppsClient.SynAppsDevice(synappsconfig)*
        
        Create the Synapps Client Application with the synapps configuration defined earlier.
        
        *SynAppsClient.SynAppsDevice.createHandler(callback_functions=None)*
        
        Initialize the handler to handle the Synapps notification platform's commands. If callback_functions is set to None (default value), the library handler will be used. Otherwise, the client must implement the onPaStart(player_iface_obj), onPaStop(player_iface_obj), onBgmStart(player_iface_obj), onBgmStop(player_iface_obj) methods to handle the received commands.
        
        *player_iface* represents the stream source. It has the following variables that should be set when creating the object:
        * command_name
        * stream_ip
        * port
        * volume
        * priority
        
        *SynAppsClient.SynAppsDevice.connect(SynAppsConfiguration.SynAppsConfig.CommandProtocol)*
        
        Initialize the TCP or UDP server to listen to Synapps notification platform's commands.
        
        **Note**: when using as a Standalone application, prevent the main thread to finish execution with, for example,
        
        ```
        import time
        while True:
            time.sleep(10)
        ```
        
        Otherwise, the synapps client will terminate it's execution as well.
        
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
