def create_connection_params(self):

        if not self.rabbitmq_parameters:
            creadentials = self.create_credentials()

            params = {
                'host': settings.GREENQUEUE_RABBITMQ_HOSTNAME,
                'port': settings.GREENQUEUE_RABBITMQ_PORT,
                'virtual_host': settings.GREENQUEUE_RABBITMQ_VHOST,
            }

            if creadentials:
                params['credentials'] = creadentials

            self.rabbitmq_parameters = pika.ConnectionParameters(**params)

        return self.rabbitmq_parameters
Create pika friendly connection parameters object.
dataset/ETHPy150Open niwinz/django-greenqueue/greenqueue/backends/rabbitmq.py/RabbitMQService.create_connection_params