Skip to content

Commit 8be0ed6

Browse files
Fixed README.md
1 parent b1f4112 commit 8be0ed6

File tree

2 files changed

+27
-7
lines changed

2 files changed

+27
-7
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,18 @@ Under the hood `pyya` uses [PyYAML](https://pypi.org/project/PyYAML/) to parse Y
7373
### Flags
7474

7575
```python
76-
convert_keys_to_snake_case=True # `pyya` converts `camelCase` or `PascalCase` keys to `snake_case`
76+
convert_keys_to_snake_case=True
77+
# `pyya` converts `camelCase` or `PascalCase` keys to `snake_case`
7778
```
7879

7980
```python
80-
add_underscore_prefix_to_keywords=True # `pyya` adds underscore prefix to keys that are Python keywords
81+
add_underscore_prefix_to_keywords=True
82+
# `pyya` adds underscore prefix to keys that are Python keywords
8183
```
8284

8385
```python
84-
raise_error_non_identifiers=True # `pyya` raises error if key name is not valid Python identifier
86+
raise_error_non_identifiers=True
87+
# `pyya` raises error if key name is not valid Python identifier
8588
```
8689

8790
## Contributing

pyya.egg-info/PKG-INFO

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Metadata-Version: 2.1
22
Name: pyya
3-
Version: 0.1.2
3+
Version: 0.1.3
44
Summary: Convert YAML configuration files to Python objects
55
Author-email: shadowy-pycoder <[email protected]>
66
Project-URL: Homepage, https://github.com/shadowy-pycoder/pyya
@@ -51,8 +51,9 @@ pip install pyya
5151

5252
## Usage
5353

54-
Create YAML configuration files for your project:
54+
### Example
5555

56+
Create YAML configuration files for your project:
5657

5758
```yaml
5859
# default.config.yaml - this file usually goes to version control system
@@ -80,6 +81,7 @@ from pyya import init_config
8081
config = init_config(
8182
'config.yaml', 'default.config.yaml',
8283
convert_keys_to_snake_case = False,
84+
add_underscore_prefix_to_keywords = False
8385
raise_error_non_identifiers = False)
8486
print(json.dumps(config.database))
8587

@@ -92,9 +94,24 @@ As you can see, `pyya` automatically merges default config file with production
9294

9395
Under the hood `pyya` uses [PyYAML](https://pypi.org/project/PyYAML/) to parse YAML files and [munch](https://pypi.org/project/munch/) library to create attribute-stylish dictionaries.
9496

95-
`pyya` automatically adds underscore prefix to Python keywords and can be configured to convert `camelCase` or `PascalCase` keys to `snake_case`.
97+
and can be configured to .
98+
99+
### Flags
96100

97-
If `raise_error_non_identifiers=True`, `pyya` will raise error if section name is not valid Python identifier.
101+
```python
102+
convert_keys_to_snake_case=True
103+
# `pyya` converts `camelCase` or `PascalCase` keys to `snake_case`
104+
```
105+
106+
```python
107+
add_underscore_prefix_to_keywords=True
108+
# `pyya` adds underscore prefix to keys that are Python keywords
109+
```
110+
111+
```python
112+
raise_error_non_identifiers=True
113+
# `pyya` raises error if key name is not valid Python identifier
114+
```
98115

99116
## Contributing
100117

0 commit comments

Comments
 (0)