Skip to content

Commit dbda244

Browse files
author
BrunoSilvaAndrade
committed
fix(api)!: Renaming classes and creating a default package object
A class which provides the ConfigValue Object was not a good deal Now there's a default package object called configparser which gives a Config(old ConfigValue) object
1 parent c8bd34f commit dbda244

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,12 @@ This config file as a json would be something like:
107107
The instance of Config Class:
108108

109109
```python
110-
from pyconfigparser import configparser, ConfigError
110+
from pyconfigparser import Configparser, ConfigError
111111
import logging
112112

113113
try:
114-
config = configparser.get_config(SCHEMA_CONFIG) # <- Here I'm using that SCHEMA_CONFIG we had declared, and the dir file default value is being used
114+
config = Configparser.get_config(
115+
SCHEMA_CONFIG) # <- Here I'm using that SCHEMA_CONFIG we had declared, and the dir file default value is being used
115116
except ConfigError as e:
116117
print(e)
117118
exit()
@@ -149,17 +150,17 @@ Since you've already created the first Config's instance this instance will be c
149150
so after this first creation you can just invoke Config.get_config()
150151

151152
```python
152-
from pyconfigparser import configparser
153+
from pyconfigparser import Configparser
153154

154-
config = configparser.get_config() # At this point you already have the configuration properties in your config object
155+
config = Configparser.get_config() # At this point you already have the configuration properties in your config object
155156
```
156157

157158
You can also disable the action to cache the instance config
158159

159160
```python
160-
from pyconfigparser import configparser
161+
from pyconfigparser import Configparser
161162

162-
configparser.hold_an_instance = False
163+
Configparser.hold_an_instance = False
163164
```
164165

165166

0 commit comments

Comments
 (0)