New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RedisDSN with out username #1275
Comments
I guess this code should be changed to require either a username or password: PR welcome to change this. The work around until that is fixed is to define your own class RedisDsn(AnyUrl):
allowed_schemes = {'redis'} E.g. without |
Why this code should be changed? |
maybe, but it seems extremely rare that someone wants to login to a redis instance without either a username or password. Maybe we shouldn't change the code but simply update the docs to explain you might want to use your own custom Given how easy it is to create your own, I'm concerned with catering to the 99% here. I think 99% of cases a redis server will require either a username or password. |
As far as I know, there is no username in Redis - only password can be set with |
That is true I too didn't see any way that redis has user name. It only has password. If RedisDSN has parameter user_required=False then we can use the RedisDSN directly with aioredis. redis = await aioredis.create_redis_pool(
'redis://:sEcRet@localhost/') |
Okay, let's remove |
Question
Output of
python -c "import pydantic.utils; print(pydantic.utils.version_info())"
:My redis server has no user name only password it has. If I use above setting I get the following error:
How to use RedisDsn without user name?
The text was updated successfully, but these errors were encountered: