iniUts 1.2.0__tar.gz → 1.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {iniuts-1.2.0/iniUts.egg-info → iniuts-1.2.1}/PKG-INFO +1 -1
- {iniuts-1.2.0 → iniuts-1.2.1}/iniUts/__init__.py +7 -2
- {iniuts-1.2.0 → iniuts-1.2.1/iniUts.egg-info}/PKG-INFO +1 -1
- {iniuts-1.2.0 → iniuts-1.2.1}/run.py +2 -2
- {iniuts-1.2.0 → iniuts-1.2.1}/setup.py +1 -1
- {iniuts-1.2.0 → iniuts-1.2.1}/CHANGELOG.txt +0 -0
- {iniuts-1.2.0 → iniuts-1.2.1}/LICENCE.txt +0 -0
- {iniuts-1.2.0 → iniuts-1.2.1}/MANIFEST.in +0 -0
- {iniuts-1.2.0 → iniuts-1.2.1}/README.md +0 -0
- {iniuts-1.2.0 → iniuts-1.2.1}/commands.txt +0 -0
- {iniuts-1.2.0 → iniuts-1.2.1}/iniUts.egg-info/SOURCES.txt +0 -0
- {iniuts-1.2.0 → iniuts-1.2.1}/iniUts.egg-info/dependency_links.txt +0 -0
- {iniuts-1.2.0 → iniuts-1.2.1}/iniUts.egg-info/top_level.txt +0 -0
- {iniuts-1.2.0 → iniuts-1.2.1}/setup.cfg +0 -0
|
@@ -169,8 +169,13 @@ class IniUts():
|
|
|
169
169
|
v = self.format_data(dtClass,k,dt2[k])
|
|
170
170
|
setattr(dtClass, k, v)
|
|
171
171
|
else:
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
for k in MissingKeysFromClass(dt):
|
|
173
|
+
if isinstance(getattr(dtClass,k),envar):
|
|
174
|
+
v = getattr(dtClass,k).get_value()
|
|
175
|
+
setattr(dtClass, k, v)
|
|
176
|
+
continue
|
|
177
|
+
if not skip_missing and MissingKeysFromClass(dt):
|
|
178
|
+
raise Exception(f"Cound not find '{k}' keys at section '{section}' in ini file")
|
|
174
179
|
|
|
175
180
|
def link(self,section,skip_missing=False,empty_as_null=False):
|
|
176
181
|
def wrap(function):
|
|
@@ -7,14 +7,14 @@ from iniUts import *
|
|
|
7
7
|
load_dotenv()
|
|
8
8
|
|
|
9
9
|
ini = IniUts('prd_config.ini')
|
|
10
|
-
ini = IniUts('prd_config.ini','dev_config.ini',in_prd=
|
|
10
|
+
ini = IniUts('prd_config.ini','dev_config.ini',in_prd=True)
|
|
11
11
|
|
|
12
12
|
#TODAS AS CHAVES DE DEV DEVE CONTER EM PRD
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
@ini.link('PERSON')
|
|
16
16
|
class Person():
|
|
17
|
-
USERNAME: str = envar("USERNAME")
|
|
17
|
+
USERNAME: str = envar("USERNAME","NO_NAME")
|
|
18
18
|
NAME : str
|
|
19
19
|
age : int
|
|
20
20
|
amount : float
|
|
@@ -10,7 +10,7 @@ classifiers = [
|
|
|
10
10
|
|
|
11
11
|
setup(
|
|
12
12
|
name='iniUts',
|
|
13
|
-
version='1.2.
|
|
13
|
+
version='1.2.1',
|
|
14
14
|
description='Ini file manipulator',
|
|
15
15
|
long_description=open('README.md').read() + '\n\n' + open('CHANGELOG.txt').read(),
|
|
16
16
|
long_description_content_type='text/markdown',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|