pallets-eco / flask-session

Server side session extension for Flask
https://flask-session.readthedocs.io
BSD 3-Clause "New" or "Revised" License
490 stars 236 forks source link

Assert that passed redis is of Type Redis Instance #192

Closed fmssn closed 3 months ago

fmssn commented 9 months ago

We got stuck with the error that we set the redis connection string so SESSION_REDIS, with results in setting self.redis correctly, but then getting the error that str does not have method get. This asserts type safety and is more verbose.

Another way would be that you could check if it is of type string and then create a Redis Instance from there.

Lxstr commented 3 months ago

Added in 0.7.0rc1 onwards