platypush/plugins/bluetooth/__init__.py
def find_service(self, name: str = None, addr: str = None, uuid: str = None) -> BluetoothLookupServiceResponse:
        """
        Look up for a service published by a nearby bluetooth device. If all the parameters are null then all the
        published services on the nearby devices will be returned. See
        `:class:platypush.message.response.bluetoothBluetoothLookupServiceResponse` for response structure reference.

        :param name: Service name
        :param addr: Service/device address
        :param uuid: Service UUID
        """

        import bluetooth
        from bluetooth import find_service
        services = find_service(name=name, address=addr, uuid=uuid)

        self._port_and_protocol_by_addr_and_srv_uuid.update({
            (srv['host'], srv['service-id']): (srv['port'], getattr(bluetooth, srv['protocol']))
            for srv in services if srv.get('service-id')
        })

        self._port_and_protocol_by_addr_and_srv_name.update({
            (srv['host'], srv['name']): (srv['port'], getattr(bluetooth, srv['protocol']))
            for srv in services if srv.get('name')
        })

        return BluetoothLookupServiceResponse(services)

        Look up for a service published by a nearby bluetooth device. If all the parameters are null then all the
        published services on the nearby devices will be returned. See
        `:class:platypush.message.response.bluetoothBluetoothLookupServiceResponse` for response structure reference.

        :param name: Service name
        :param addr: Service/device address
        :param uuid: Service UUID
        
Look up for a service published by a nearby bluetooth device. If all the parameters are null then all the
published services on the nearby devices will be returned. See
`:class:platypush.message.response.bluetoothBluetoothLookupServiceResponse` for response structure reference.
Look up for a service published by a nearby bluetooth device . If all the parameters are null then all the published services on the nearby devices will be returned . See ` : class : platypush . message . response . bluetoothBluetoothLookupServiceResponse ` for response structure reference .
def find_service(self, name: str = None, addr: str = None, uuid: str = None) -> BluetoothLookupServiceResponse:
        import bluetooth
        from bluetooth import find_service
        services = find_service(name=name, address=addr, uuid=uuid)
        self._port_and_protocol_by_addr_and_srv_uuid.update({
            (srv['host'], srv['service-id']): (srv['port'], getattr(bluetooth, srv['protocol']))
            for srv in services if srv.get('service-id')
        })
        self._port_and_protocol_by_addr_and_srv_name.update({
            (srv['host'], srv['name']): (srv['port'], getattr(bluetooth, srv['protocol']))
            for srv in services if srv.get('name')
        })
        return BluetoothLookupServiceResponse(services)
def find_service ( self , name : str = None , addr : str = None , uuid : str = None ) -> BluetoothLookupServiceResponse : import bluetooth from bluetooth import find_service services = find_service ( name = name , address = addr , uuid = uuid ) self . _port_and_protocol_by_addr_and_srv_uuid . update ( { ( srv [ 'host' ] , srv [ 'service-id' ] ) : ( srv [ 'port' ] , getattr ( bluetooth , srv [ 'protocol' ] ) ) for srv in services if srv . get ( 'service-id' ) } ) self . _port_and_protocol_by_addr_and_srv_name . update ( { ( srv [ 'host' ] , srv [ 'name' ] ) : ( srv [ 'port' ] , getattr ( bluetooth , srv [ 'protocol' ] ) ) for srv in services if srv . get ( 'name' ) } ) return BluetoothLookupServiceResponse ( services )
Look up for a service published by a nearby bluetooth device.
Look up for a service published by a nearby bluetooth device .
"""
        Look up for a service published by a nearby bluetooth device. If all the parameters are null then all the
        published services on the nearby devices will be returned. See
        `:class:platypush.message.response.bluetoothBluetoothLookupServiceResponse` for response structure reference.

        :param name: Service name
        :param addr: Service/device address
        :param uuid: Service UUID
        """
self
name
str
None
addr
str
None
uuid
str
None