iniUts 1.3.0__tar.gz → 1.3.2__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.3.0/iniUts.egg-info → iniuts-1.3.2}/PKG-INFO +2 -1
- {iniuts-1.3.0 → iniuts-1.3.2}/iniUts/__init__.py +7 -7
- {iniuts-1.3.0 → iniuts-1.3.2/iniUts.egg-info}/PKG-INFO +2 -1
- {iniuts-1.3.0 → iniuts-1.3.2}/iniUts.egg-info/SOURCES.txt +1 -0
- iniuts-1.3.2/iniUts.egg-info/requires.txt +1 -0
- {iniuts-1.3.0 → iniuts-1.3.2}/setup.py +4 -2
- {iniuts-1.3.0 → iniuts-1.3.2}/CHANGELOG.txt +0 -0
- {iniuts-1.3.0 → iniuts-1.3.2}/LICENCE.txt +0 -0
- {iniuts-1.3.0 → iniuts-1.3.2}/MANIFEST.in +0 -0
- {iniuts-1.3.0 → iniuts-1.3.2}/README.md +0 -0
- {iniuts-1.3.0 → iniuts-1.3.2}/commands.txt +0 -0
- {iniuts-1.3.0 → iniuts-1.3.2}/iniUts/secret.py +0 -0
- {iniuts-1.3.0 → iniuts-1.3.2}/iniUts.egg-info/dependency_links.txt +0 -0
- {iniuts-1.3.0 → iniuts-1.3.2}/iniUts.egg-info/top_level.txt +0 -0
- {iniuts-1.3.0 → iniuts-1.3.2}/run.py +0 -0
- {iniuts-1.3.0 → iniuts-1.3.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: iniUts
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.2
|
|
4
4
|
Summary: Ini file manipulator
|
|
5
5
|
Home-page:
|
|
6
6
|
Author: Melque Lima
|
|
@@ -14,6 +14,7 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
14
14
|
Classifier: Programming Language :: Python :: 3
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: LICENCE.txt
|
|
17
|
+
Requires-Dist: cryptography>=3.4.7
|
|
17
18
|
|
|
18
19
|
# Ini Uts
|
|
19
20
|
#
|
|
@@ -4,7 +4,7 @@ from datetime import datetime
|
|
|
4
4
|
import re
|
|
5
5
|
import os
|
|
6
6
|
import types
|
|
7
|
-
from secret import decrypt, encrypt
|
|
7
|
+
from iniUts.secret import decrypt, encrypt
|
|
8
8
|
|
|
9
9
|
class envar():
|
|
10
10
|
def __init__(self,key:str,default:str=None):
|
|
@@ -46,7 +46,7 @@ def save(self):
|
|
|
46
46
|
|
|
47
47
|
if k in self.__CRYPTED_KEYS__:
|
|
48
48
|
k = "&_" + k
|
|
49
|
-
value = encrypt(value,ini.
|
|
49
|
+
value = encrypt(value,ini.encryption_key)
|
|
50
50
|
|
|
51
51
|
if not ini.in_prd and k in iniDev.getKeys(self.__SECTION__):
|
|
52
52
|
iniDev.write(self.__SECTION__,k,value)
|
|
@@ -55,11 +55,11 @@ def save(self):
|
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
class IniUts():
|
|
58
|
-
def __init__(self,ini_prd,ini_dev=None,in_prd=True,
|
|
58
|
+
def __init__(self,ini_prd,ini_dev=None,in_prd=True,encryption_key=None):
|
|
59
59
|
self.prd_file = ini_prd
|
|
60
60
|
self.dev_file = ini_dev
|
|
61
61
|
self.in_prd = in_prd
|
|
62
|
-
self.
|
|
62
|
+
self.encryption_key = encryption_key
|
|
63
63
|
self.delimiters = {}
|
|
64
64
|
self.dateFormats = {}
|
|
65
65
|
self.dev_sections = []
|
|
@@ -144,7 +144,7 @@ class IniUts():
|
|
|
144
144
|
def format_data(self,dtClass,k,v):
|
|
145
145
|
cls = dtClass.__annotations__[k]
|
|
146
146
|
if k in dtClass.__CRYPTED_KEYS__:
|
|
147
|
-
v = decrypt(v,self.
|
|
147
|
+
v = decrypt(v,self.encryption_key)
|
|
148
148
|
|
|
149
149
|
if cls == tuple:
|
|
150
150
|
name = f"{str(dtClass)}_{k}"
|
|
@@ -197,12 +197,12 @@ class IniUts():
|
|
|
197
197
|
for k in dtClass.__CRYPTED_KEYS__:
|
|
198
198
|
# ENCRIPTA VARIAVEIS INICIAIS NO ARQUIVO DE DEV
|
|
199
199
|
if k in dt.keys() and dt[k].startswith('&_') and not self.in_prd:
|
|
200
|
-
dt[k] = encrypt(dt[k].replace('&_',''),self.
|
|
200
|
+
dt[k] = encrypt(dt[k].replace('&_',''),self.encryption_key)
|
|
201
201
|
IniUts(self.dev_file).write(section,"&_" + k,dt[k])
|
|
202
202
|
|
|
203
203
|
# ENCRIPTA VARIAVEIS INICIAIS NO ARQUIVO DE PRD
|
|
204
204
|
if k in dt2.keys() and dt2[k].startswith('&_'):
|
|
205
|
-
dt2[k] = encrypt(dt2[k].replace('&_',''),self.
|
|
205
|
+
dt2[k] = encrypt(dt2[k].replace('&_',''),self.encryption_key)
|
|
206
206
|
IniUts(self.prd_file).write(section,"&_" + k,dt2[k])
|
|
207
207
|
|
|
208
208
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: iniUts
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.2
|
|
4
4
|
Summary: Ini file manipulator
|
|
5
5
|
Home-page:
|
|
6
6
|
Author: Melque Lima
|
|
@@ -14,6 +14,7 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
14
14
|
Classifier: Programming Language :: Python :: 3
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: LICENCE.txt
|
|
17
|
+
Requires-Dist: cryptography>=3.4.7
|
|
17
18
|
|
|
18
19
|
# Ini Uts
|
|
19
20
|
#
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
cryptography>=3.4.7
|
|
@@ -10,7 +10,7 @@ classifiers = [
|
|
|
10
10
|
|
|
11
11
|
setup(
|
|
12
12
|
name='iniUts',
|
|
13
|
-
version='1.3.
|
|
13
|
+
version='1.3.2',
|
|
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',
|
|
@@ -21,5 +21,7 @@ setup(
|
|
|
21
21
|
classifiers=classifiers,
|
|
22
22
|
keywords='iniUts',
|
|
23
23
|
packages=find_packages(),
|
|
24
|
-
install_requires=[
|
|
24
|
+
install_requires=[
|
|
25
|
+
'cryptography>=3.4.7',
|
|
26
|
+
]
|
|
25
27
|
)
|
|
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
|
|
File without changes
|