Skip to content

Commit c446613

Browse files
committed
Updated version, CHANGELOG and README. [ci skip]
1 parent fd03278 commit c446613

3 files changed

Lines changed: 29 additions & 6 deletions

File tree

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.9.0](https://github.com/fabiocaccamo/python-benedict/releases/tag/0.9.0) - 2019-09-23
8+
- Added `xml` I/O support.
9+
710
## [0.8.0](https://github.com/fabiocaccamo/python-benedict/releases/tag/0.8.0) - 2019-09-20
811
- Added `toml` I/O support.
912

README.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ The Python dictionary for humans dealing with evil/complex data.
2525
- [I/O](#io)
2626
- [`from_json`](#from_json)
2727
- [`from_toml`](#from_toml)
28+
- [`from_xml`](#from_xml)
2829
- [`from_yaml`](#from_yaml)
2930
- [`to_json`](#to_json)
3031
- [`to_toml`](#to_toml)
32+
- [`to_xml`](#to_xml)
3133
- [`to_yaml`](#to_yaml)
3234
- [Parse](#parse)
3335
- [`get_bool`](#get_bool)
@@ -63,7 +65,7 @@ The Python dictionary for humans dealing with evil/complex data.
6365

6466
## Features
6567
- Full **keypath** support *(using the dot syntax by default)*
66-
- Easy **I/O operations** with most common formats: `json`, `toml`, `yaml`
68+
- Easy **I/O operations** with most common formats: `json`, `toml`, `xml`, `yaml`
6769
- Many **utility** and **parse methods** to retrieve data as needed *(all methods listed below)*
6870
- Give **benediction** :) to `dict` values before they are returned *(they receive benedict casting)*
6971
- 100% **backward-compatible** *(you can replace existing dicts without pain)*
@@ -142,12 +144,12 @@ d = benedict(existing_dict, keypath_separator=None)
142144
## API
143145

144146
### I/O
145-
These methods simplify I/O operations with most common formats: `json`, `toml`, `yaml`
147+
These methods simplify I/O operations with most common formats: `json`, `toml`, `xml`, `yaml`
146148

147149
- ##### from_json
148150

149151
```python
150-
# Try to load/decode a json encoded string and return it as dict instance.
152+
# Try to load/decode a json encoded data and return it as dict instance.
151153
# Accept as first argument: url, filepath or string.
152154
# A ValueError is raised in case of failure.
153155
benedict.from_json(s)
@@ -156,16 +158,25 @@ benedict.from_json(s)
156158
- ##### from_toml
157159

158160
```python
159-
# Try to load/decode a toml encoded string and return it as dict instance.
161+
# Try to load/decode a toml encoded data and return it as dict instance.
160162
# Accept as first argument: url, filepath or string.
161163
# A ValueError is raised in case of failure.
162164
benedict.from_toml(s)
163165
```
164166

167+
- ##### from_xml
168+
169+
```python
170+
# Try to load/decode a xml encoded data and return it as dict instance.
171+
# Accept as first argument: url, filepath or string.
172+
# A ValueError is raised in case of failure.
173+
benedict.from_xml(s)
174+
```
175+
165176
- ##### from_yaml
166177

167178
```python
168-
# Try to load/decode a yaml encoded string and return it as dict instance.
179+
# Try to load/decode a yaml encoded data and return it as dict instance.
169180
# Accept as first argument: url, filepath or string.
170181
# A ValueError is raised in case of failure.
171182
benedict.from_yaml(s)
@@ -189,6 +200,15 @@ s = d.to_json(filepath='', **kwargs)
189200
s = d.to_toml(filepath='', **kwargs)
190201
```
191202

203+
- ##### to_xml
204+
205+
```python
206+
# Return the dict instance encoded in xml format and optionally save it at the specified filepath.
207+
# It's possible to pass custom options to the encoder using kwargs.
208+
# A ValueError is raised in case of failure.
209+
s = d.to_xml(filepath='', **kwargs)
210+
```
211+
192212
- ##### to_yaml
193213

194214
```python

benedict/metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
__email__ = 'fabio.caccamo@gmail.com'
77
__license__ = 'MIT'
88
__title__ = 'benedict'
9-
__version__ = '0.8.0'
9+
__version__ = '0.9.0'

0 commit comments

Comments
 (0)