Skip to content

Commit 42518b6

Browse files
committed
Updated README, CHANGELOG and version.
1 parent ca0defc commit 42518b6

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.22.0](https://github.com/fabiocaccamo/python-benedict/releases/tag/0.22.0) - 2020-10-15
8+
- Added `get_uuid` and `get_uuid_list` methods.
9+
710
## [0.21.1](https://github.com/fabiocaccamo/python-benedict/releases/tag/0.21.1) - 2020-09-30
811
- Fixed performance issue. #39
912
- Fixed `to_json` returns empty dict from generator. #38

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,8 @@ lng = loc.get_decimal('longitude')
223223
- [`get_slug_list`](#get_slug_list)
224224
- [`get_str`](#get_str)
225225
- [`get_str_list`](#get_str_list)
226+
- [`get_uuid`](#get_uuid)
227+
- [`get_uuid_list`](#get_uuid_list)
226228

227229
### Utility methods
228230

@@ -799,6 +801,22 @@ d.get_str(key, default='', choices=[])
799801
d.get_str_list(key, default=[], separator=',')
800802
```
801803

804+
- #### get_uuid
805+
806+
```python
807+
# Get value by key or keypath trying to return it as valid uuid.
808+
# If choices and value is in choices return value otherwise default.
809+
d.get_uuid(key, default='', choices=[])
810+
```
811+
812+
- #### get_uuid_list
813+
814+
```python
815+
# Get value by key or keypath trying to return it as list of valid uuid values.
816+
# If separator is specified and value is a string it will be splitted.
817+
d.get_uuid_list(key, default=[], separator=',')
818+
```
819+
802820
## Testing
803821
```bash
804822
# create python virtual environment

benedict/metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
__email__ = '[email protected]'
77
__license__ = 'MIT'
88
__title__ = 'benedict'
9-
__version__ = '0.21.1'
9+
__version__ = '0.22.0'

0 commit comments

Comments
 (0)