Attumm / redis-dict

Python dictionary with Redis as backend, built for large datasets. Simplifies Redis operations for large-scale and distributed systems. Supports various data types, namespacing, pipelining, and expiration.
MIT License
51 stars 14 forks source link

Added support for timedelta expiration like redis-py #36

Closed Pydes-boop closed 9 months ago

Pydes-boop commented 9 months ago

redis-py already supports EX in int as seconds since epoch or as timedelta, this PR exposes the timedelta possibility for expiration from redis-py to redis-dict.

Additionally i added some tests to make sure it is all covered but those could potentially be left out because their functionality might be tested by redis-py already.

Pydes-boop commented 9 months ago

Thanks for the feedback! I changed the structure of your suggested codesnippet a bit as i found it more readable but otherwise all should be fixed and added as requested in the latest commit.

Let me know if there is anything else.