Home:ALL Converter>Can I use Redis installed on Windows Subsystem for Linux with a python app in Windows?

Can I use Redis installed on Windows Subsystem for Linux with a python app in Windows?

Ask Time:2019-05-19T00:05:04         Author:Extranomical

Json Formatter

I would like to develop a python application on Windows that will use Redis as a broker for Celery. Is it correct to assume that my application can interact with an instance of Redis that I have installed on the Windows Subsystem for Linux?

I have enabled the Windows Subsystem for Linux on Windows 10, and installed Ubuntu and Redis onto it, and started the server. On the Windows side, I'm using VSCode to write the python code. As shown below, in my python code, I am trying to connect to Redis on localhost:6379

from celery import Celery

BROKER_URL = 'redis://localhost:6379/0'

app = Celery('tasks', broker=BROKER_URL)

I am trying to confirm whether my Python code, written in Windows, can interact with the Redis server being run on Ubuntu. Is this possible, and if so how can I confirm the connection?

Author:Extranomical,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/56200672/can-i-use-redis-installed-on-windows-subsystem-for-linux-with-a-python-app-in-wi
yy