Updated README, CHANGELOG and version.

This commit is contained in:
Fabio Caccamo 2020-10-15 14:19:12 +02:00
parent ca0defcb38
commit 42518b6386
3 changed files with 22 additions and 1 deletions

View File

@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.22.0](https://github.com/fabiocaccamo/python-benedict/releases/tag/0.22.0) - 2020-10-15
- Added `get_uuid` and `get_uuid_list` methods.
## [0.21.1](https://github.com/fabiocaccamo/python-benedict/releases/tag/0.21.1) - 2020-09-30
- Fixed performance issue. #39
- Fixed `to_json` returns empty dict from generator. #38

View File

@ -223,6 +223,8 @@ lng = loc.get_decimal('longitude')
- [`get_slug_list`](#get_slug_list)
- [`get_str`](#get_str)
- [`get_str_list`](#get_str_list)
- [`get_uuid`](#get_uuid)
- [`get_uuid_list`](#get_uuid_list)
### Utility methods
@ -799,6 +801,22 @@ d.get_str(key, default='', choices=[])
d.get_str_list(key, default=[], separator=',')
```
- #### get_uuid
```python
# Get value by key or keypath trying to return it as valid uuid.
# If choices and value is in choices return value otherwise default.
d.get_uuid(key, default='', choices=[])
```
- #### get_uuid_list
```python
# Get value by key or keypath trying to return it as list of valid uuid values.
# If separator is specified and value is a string it will be splitted.
d.get_uuid_list(key, default=[], separator=',')
```
## Testing
```bash
# create python virtual environment

View File

@ -6,4 +6,4 @@ __description__ = 'python-benedict is a dict subclass with keylist/keypath suppo
__email__ = 'fabio.caccamo@gmail.com'
__license__ = 'MIT'
__title__ = 'benedict'
__version__ = '0.21.1'
__version__ = '0.22.0'