Skip to content

Commit

Permalink
Merge pull request #21 from nrccua/ARCH-546-fix-pydoc-errors-in-redis…
Browse files Browse the repository at this point in the history
…-file

Update redis pydocs
  • Loading branch information
nrccua-timr authored Feb 18, 2021
2 parents 493815c + 7260275 commit 1645717
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
6 changes: 6 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ History
=======


v0.11.3 (2021-02-18)
-----------------------

* Fix pydoc errors in redis.py file.


v0.11.2 (2021-02-18)
-----------------------

Expand Down
18 changes: 13 additions & 5 deletions aioradio/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ async def get(self, key: str, use_json: bool=None, encoding: Union[str, None]='u
Args:
key (str): redis cache key
use_json (bool, optional): convert json value to object. Defaults to None.
encoding (Union[str, None], optional): encoding of values
Returns:
Any: any
Expand All @@ -96,6 +97,7 @@ async def mget(self, items: List[str], use_json: bool=None, encoding: Union[str,
Args:
items (List[str]): list of redis cache keys
use_json (bool, optional): convert json values to objects. Defaults to None.
encoding (Union[str, None], optional): encoding of values
Returns:
List[Any]: list of objects
Expand Down Expand Up @@ -154,6 +156,7 @@ async def hget(self, key: str, field: str, use_json: bool=None, encoding: Union[
key (str): cache key
field (str): hash field
use_json (bool, optional): convert json values to objects. Defaults to None.
encoding (Union[str, None], optional): encoding of values
Returns:
Any: any
Expand All @@ -176,6 +179,7 @@ async def hmget(self, key: str, fields: List[str], use_json: bool=None, encoding
key (str): cache key
fields (List[str]): hash fields
use_json (bool, optional): convert json values to objects. Defaults to None.
encoding (Union[str, None], optional): encoding of values
Returns:
Any: any
Expand All @@ -200,7 +204,7 @@ async def hmget_many(self, keys: List[str], fields: List[str], use_json: bool=No
keys (List[str]): cache keys
fields (List[str]): hash fields
use_json (bool, optional): convert json values to objects. Defaults to None.
encoding (Union[str, None]): encoding of values
encoding (Union[str, None], optional): encoding of values
Returns:
List[Any]: any
Expand Down Expand Up @@ -231,6 +235,7 @@ async def hgetall(self, key: str, use_json: bool=None, encoding: Union[str, None
Args:
key (str): cache key
use_json (bool, optional): convert json values to objects. Defaults to None.
encoding (Union[str, None], optional): encoding of values
Returns:
Any: any
Expand All @@ -254,7 +259,7 @@ async def hgetall_many(self, keys: List[str], use_json: bool=None, encoding: Uni
Args:
keys (str): cache keys
use_json (bool, optional): convert json values to objects. Defaults to None.
encoding (Union[str, None]): encoding of values
encoding (Union[str, None], optional): encoding of values
Returns:
List[Any]: any
Expand Down Expand Up @@ -287,6 +292,7 @@ async def hset(self, key: str, field: str, value: str, use_json: bool=None, expi
field (str): hash field
value (str): hash value
use_json (bool, optional): set object to json before writing to cache. Defaults to None.
expire (int, optional): cache expiration. Defaults to None.
Returns:
int: 1 if key is set successfully else 0
Expand All @@ -313,6 +319,7 @@ async def hmset(self, key: str, items: Dict[str, Any], use_json: bool=None, expi
key (str): cache key
items (List[str, Any]): list of redis hash key-value pairs
use_json (bool, optional): set object to json before writing to cache. Defaults to None.
expire (int, optional): cache expiration. Defaults to None.
Returns:
bool: True if hash is set successfully else False
Expand All @@ -337,7 +344,8 @@ async def hdel(self, key: str, fields: List[str]) -> int:
"""Delete one or more hash fields.
Args:
key (str): cache key
key (str): hash key
fields (List[str]): hash fields
Returns:
int: Number of hash fields deleted
Expand All @@ -349,8 +357,8 @@ async def hexists(self, key: str, field: str) -> bool:
"""Determine if hash field exists.
Args:
key (str): [description]
field (str): [description]
key (str): hash key
field (str): hash field
Returns:
int: True if hash field exists else False
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
long_description = fileobj.read()

setup(name='aioradio',
version='0.11.2',
version='0.11.3',
description='Generic asynchronous i/o python utilities for AWS services (SQS, S3, DynamoDB, Secrets Manager), Redis, MSSQL (pyodbc), JIRA and more',
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 1645717

Please sign in to comment.