From 2c1adc6af36ec06f0d3d0550485e6a5ecbde4d99 Mon Sep 17 00:00:00 2001 From: Ivan Maslov Date: Fri, 17 Dec 2021 18:25:29 +0300 Subject: [PATCH] v1.2.6 release def WebRequestParseBodyBytes(inRequest) def WebRequestParseBodyStr(inRequest) def WebRequestParseBodyJSON(inRequest) def WebRequestParseFile(inRequest) --- .../INSTALLER | 0 .../pyOpenRPA-1.2.6.dist-info}/METADATA | 2 +- .../pyOpenRPA-1.2.6.dist-info}/RECORD | 16 ++-- .../REQUESTED | 0 .../WHEEL | 0 .../top_level.txt | 0 .../Orchestrator/__Orchestrator__.py | 58 ++++++++++++ .../Lib/site-packages/pyOpenRPA/__init__.py | 2 +- .../INSTALLER | 0 .../pyOpenRPA-1.2.6.dist-info}/METADATA | 2 +- .../pyOpenRPA-1.2.6.dist-info}/RECORD | 16 ++-- .../REQUESTED | 0 .../WHEEL | 0 .../top_level.txt | 0 .../Orchestrator/__Orchestrator__.py | 58 ++++++++++++ .../Lib/site-packages/pyOpenRPA/__init__.py | 2 +- .../Orchestrator/__Orchestrator__.py | 58 ++++++++++++ Sources/pyOpenRPA/__init__.py | 2 +- Wiki/ENG_Guide/html/Orchestrator/02_Defs.html | 68 ++++++++++++++ .../Orchestrator/__Orchestrator__.html | 58 ++++++++++++ Wiki/ENG_Guide/html/genindex.html | 10 ++- Wiki/ENG_Guide/html/objects.inv | Bin 1476 -> 1507 bytes Wiki/ENG_Guide/html/searchindex.js | 2 +- .../markdown/Orchestrator/02_Defs.md | 84 ++++++++++++++++++ Wiki/ENG_Guide/pdf/pyOpenRPA_Guide_ENG.pdf | Bin 909296 -> 912289 bytes v1.2.5 => v1.2.6 | 0 26 files changed, 415 insertions(+), 23 deletions(-) rename Resources/WPy32-3720/python-3.7.2/Lib/site-packages/{pyOpenRPA-1.2.5.dist-info => pyOpenRPA-1.2.6.dist-info}/INSTALLER (100%) rename Resources/{WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.5.dist-info => WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.6.dist-info}/METADATA (99%) rename Resources/{WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.5.dist-info => WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.6.dist-info}/RECORD (98%) rename Resources/WPy32-3720/python-3.7.2/Lib/site-packages/{pyOpenRPA-1.2.5.dist-info => pyOpenRPA-1.2.6.dist-info}/REQUESTED (100%) rename Resources/WPy32-3720/python-3.7.2/Lib/site-packages/{pyOpenRPA-1.2.5.dist-info => pyOpenRPA-1.2.6.dist-info}/WHEEL (100%) rename Resources/WPy32-3720/python-3.7.2/Lib/site-packages/{pyOpenRPA-1.2.5.dist-info => pyOpenRPA-1.2.6.dist-info}/top_level.txt (100%) rename Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/{pyOpenRPA-1.2.5.dist-info => pyOpenRPA-1.2.6.dist-info}/INSTALLER (100%) rename Resources/{WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.5.dist-info => WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.6.dist-info}/METADATA (99%) rename Resources/{WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.5.dist-info => WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.6.dist-info}/RECORD (98%) rename Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/{pyOpenRPA-1.2.5.dist-info => pyOpenRPA-1.2.6.dist-info}/REQUESTED (100%) rename Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/{pyOpenRPA-1.2.5.dist-info => pyOpenRPA-1.2.6.dist-info}/WHEEL (100%) rename Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/{pyOpenRPA-1.2.5.dist-info => pyOpenRPA-1.2.6.dist-info}/top_level.txt (100%) rename v1.2.5 => v1.2.6 (100%) diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.5.dist-info/INSTALLER b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.6.dist-info/INSTALLER similarity index 100% rename from Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.5.dist-info/INSTALLER rename to Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.6.dist-info/INSTALLER diff --git a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.5.dist-info/METADATA b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.6.dist-info/METADATA similarity index 99% rename from Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.5.dist-info/METADATA rename to Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.6.dist-info/METADATA index 0ce18453..c6e28f2c 100644 --- a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.5.dist-info/METADATA +++ b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.6.dist-info/METADATA @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pyOpenRPA -Version: 1.2.5 +Version: 1.2.6 Summary: First open source RPA platform for business Home-page: https://gitlab.com/UnicodeLabs/OpenRPA Author: Ivan Maslov diff --git a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.5.dist-info/RECORD b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.6.dist-info/RECORD similarity index 98% rename from Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.5.dist-info/RECORD rename to Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.6.dist-info/RECORD index b9987d04..6f519764 100644 --- a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.5.dist-info/RECORD +++ b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.6.dist-info/RECORD @@ -1,9 +1,9 @@ -pyOpenRPA-1.2.5.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 -pyOpenRPA-1.2.5.dist-info/METADATA,sha256=IeBQ9YskhMg5mmzeY-DBQVnCbKUI4pgnl8E9XLlGrQs,3612 -pyOpenRPA-1.2.5.dist-info/RECORD,, -pyOpenRPA-1.2.5.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -pyOpenRPA-1.2.5.dist-info/WHEEL,sha256=qB97nP5e4MrOsXW5bIU5cUn_KSVr10EV0l-GCHG9qNs,97 -pyOpenRPA-1.2.5.dist-info/top_level.txt,sha256=RPzwQXgYBRo_m5L3ZLs6Voh8aEkMeT29Xsul1w1qE0g,10 +pyOpenRPA-1.2.6.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +pyOpenRPA-1.2.6.dist-info/METADATA,sha256=pU-EpQuvMPYjhD1o2BYjfpOfsruNrxm9s7mfWX9mF1M,3612 +pyOpenRPA-1.2.6.dist-info/RECORD,, +pyOpenRPA-1.2.6.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +pyOpenRPA-1.2.6.dist-info/WHEEL,sha256=qB97nP5e4MrOsXW5bIU5cUn_KSVr10EV0l-GCHG9qNs,97 +pyOpenRPA-1.2.6.dist-info/top_level.txt,sha256=RPzwQXgYBRo_m5L3ZLs6Voh8aEkMeT29Xsul1w1qE0g,10 pyOpenRPA/.idea/inspectionProfiles/profiles_settings.xml,sha256=YXLFmX7rPNGcnKK1uX1uKYPN0fpgskYNe7t0BV7cqkY,174 pyOpenRPA/.idea/misc.xml,sha256=V-fQnOz-bYEZULgfbFgm-8mURphZrKfXMSd0wKjeEyA,188 pyOpenRPA/.idea/modules.xml,sha256=Q__U1JIA2cjxbLRXAv-SfYY00fZA0TNlpkkbY4s3ncg,277 @@ -72,7 +72,7 @@ pyOpenRPA/Orchestrator/Web/Index.js,sha256=Blo3LHe_a3zrW7MqYo4BSIwoOx7nlO7Ko9LWx pyOpenRPA/Orchestrator/Web/Index.xhtml,sha256=a4N_reLA6_Zb2KXiL73a7cWtJwO0W0Dr5lZ-RpUwuI0,16428 pyOpenRPA/Orchestrator/Web/__pycache__/Basic.cpython-37.pyc,, pyOpenRPA/Orchestrator/Web/favicon.ico,sha256=6S8XwSQ_3FXPpaX6zYkf8uUewVXO9bHnrrDHEoWrEgw,112922 -pyOpenRPA/Orchestrator/__Orchestrator__.py,sha256=2WbaatF0yN1Sx3P1Zru3clMbUTq4N-ErjMmsi0V7TKE,117659 +pyOpenRPA/Orchestrator/__Orchestrator__.py,sha256=n-PrWqEDql1POF4bM-r9cTun9WZUqzIYRjxDEmV7xAM,119846 pyOpenRPA/Orchestrator/__init__.py,sha256=f1RFDzOkL3IVorCtqogjGdXYPtHH-P-y-5CqT7PGy7A,183 pyOpenRPA/Orchestrator/__main__.py,sha256=czJrc7_57WiO3EPIYfPeF_LG3pZsQVmuAYgbl_YXcVU,273 pyOpenRPA/Orchestrator/__pycache__/BackwardCompatibility.cpython-37.pyc,, @@ -341,6 +341,6 @@ pyOpenRPA/Tools/Terminator.py,sha256=VcjX3gFXiCGu3MMCidhrTNsmC9wsAqfjRJdTSU9fLnU pyOpenRPA/Tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 pyOpenRPA/Tools/__pycache__/Terminator.cpython-37.pyc,, pyOpenRPA/Tools/__pycache__/__init__.cpython-37.pyc,, -pyOpenRPA/__init__.py,sha256=7jBgAILYoa342lTEQGpNGus8Zpiei0bAZkw1sVLtsGI,174 +pyOpenRPA/__init__.py,sha256=fI-2Npv3ZqIEhm1omXoocfYZw7PY1Ccf_pHXi_bvI0w,174 pyOpenRPA/__pycache__/__init__.cpython-37.pyc,, pyOpenRPA/test.txt,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.5.dist-info/REQUESTED b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.6.dist-info/REQUESTED similarity index 100% rename from Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.5.dist-info/REQUESTED rename to Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.6.dist-info/REQUESTED diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.5.dist-info/WHEEL b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.6.dist-info/WHEEL similarity index 100% rename from Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.5.dist-info/WHEEL rename to Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.6.dist-info/WHEEL diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.5.dist-info/top_level.txt b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.6.dist-info/top_level.txt similarity index 100% rename from Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.5.dist-info/top_level.txt rename to Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.6.dist-info/top_level.txt diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Orchestrator/__Orchestrator__.py b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Orchestrator/__Orchestrator__.py index 805472d0..ac155ad3 100644 --- a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Orchestrator/__Orchestrator__.py +++ b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/Orchestrator/__Orchestrator__.py @@ -767,6 +767,64 @@ def WebAuditMessageCreate(inRequest, inOperationCodeStr="-", inMessageStr="-"): lResultStr = inMessageStr return lResultStr +def WebRequestParseBodyBytes(inRequest): + """ + Extract the body in bytes from the request + + :param inRequest: inRequest from the server + :return: Bytes or None + """ + lBodyBytes=None + if inRequest.headers.get('Content-Length') is not None: + lInputByteArrayLength = int(inRequest.headers.get('Content-Length')) + lBodyBytes = inRequest.rfile.read(lInputByteArrayLength) + return lBodyBytes + +def WebRequestParseBodyStr(inRequest): + """ + Extract the body in str from the request + + :param inRequest: inRequest from the server + :return: str or None + """ + + return WebRequestParseBodyBytes(inRequest=inRequest).decode('utf-8') + +def WebRequestParseBodyJSON(inRequest): + """ + Extract the body in dict/list from the request + + :param inRequest: + :return: dict or list + """ + return json.loads(WebRequestParseBodyStr(inRequest=inRequest)) + +def WebRequestParseFile(inRequest): + """ + Parse the request - extract the file (name, body in bytes) + + :param inRequest: + :return: (FileNameStr, FileBodyBytes) or (None, None) + """ + lResultTurple=(None,None) + if inRequest.headers.get('Content-Length') is not None: + lInputByteArray = WebRequestParseBodyBytes(inRequest=inRequest) + #print(f"BODY:ftInputByteArrayl") + # Extract bytes data + lBoundaryStr = str(inRequest.headers.get('Content-Type')) + lBoundaryStr = lBoundaryStr[lBoundaryStr.index("boundary=")+9:] # get the boundary key #print(LBoundoryStr) + lSplit = lInputByteArray.split('\r\n\r\n') + lDelimiterRNRNIndex = lInputByteArray.index(b'\r\n\r\n') #print(LSplit) # Get file name + lSplit0 = lInputByteArray[:lDelimiterRNRNIndex].split(b'\r\n')[1] + lFileNameBytes = lSplit0[lSplit0.index(b'filename="')+10:-1] + lFileNameStr = lFileNameBytes.decode("utf-8") + # File data bytes + lFileDataBytes = lInputByteArray[lDelimiterRNRNIndex+4:] + lFileDataBytes = lFileDataBytes[:lFileDataBytes.index(b"\r\n--"+lBoundaryStr.encode("utf-8"))] + lResultTurple = (lFileNameStr, lFileDataBytes) + + return lResultTurple + def WebUserInfoGet(inRequest): """ Return User info about request diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/__init__.py b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/__init__.py index a01645a7..8167039a 100644 --- a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/__init__.py +++ b/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA/__init__.py @@ -3,7 +3,7 @@ r""" The OpenRPA package (from UnicodeLabs) """ -__version__ = 'v1.2.5' +__version__ = 'v1.2.6' __all__ = [] __author__ = 'Ivan Maslov ' #from .Core import Robot \ No newline at end of file diff --git a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.5.dist-info/INSTALLER b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.6.dist-info/INSTALLER similarity index 100% rename from Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.5.dist-info/INSTALLER rename to Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.6.dist-info/INSTALLER diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.5.dist-info/METADATA b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.6.dist-info/METADATA similarity index 99% rename from Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.5.dist-info/METADATA rename to Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.6.dist-info/METADATA index 0ce18453..c6e28f2c 100644 --- a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.5.dist-info/METADATA +++ b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.6.dist-info/METADATA @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pyOpenRPA -Version: 1.2.5 +Version: 1.2.6 Summary: First open source RPA platform for business Home-page: https://gitlab.com/UnicodeLabs/OpenRPA Author: Ivan Maslov diff --git a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.5.dist-info/RECORD b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.6.dist-info/RECORD similarity index 98% rename from Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.5.dist-info/RECORD rename to Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.6.dist-info/RECORD index b9987d04..6f519764 100644 --- a/Resources/WPy32-3720/python-3.7.2/Lib/site-packages/pyOpenRPA-1.2.5.dist-info/RECORD +++ b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.6.dist-info/RECORD @@ -1,9 +1,9 @@ -pyOpenRPA-1.2.5.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 -pyOpenRPA-1.2.5.dist-info/METADATA,sha256=IeBQ9YskhMg5mmzeY-DBQVnCbKUI4pgnl8E9XLlGrQs,3612 -pyOpenRPA-1.2.5.dist-info/RECORD,, -pyOpenRPA-1.2.5.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -pyOpenRPA-1.2.5.dist-info/WHEEL,sha256=qB97nP5e4MrOsXW5bIU5cUn_KSVr10EV0l-GCHG9qNs,97 -pyOpenRPA-1.2.5.dist-info/top_level.txt,sha256=RPzwQXgYBRo_m5L3ZLs6Voh8aEkMeT29Xsul1w1qE0g,10 +pyOpenRPA-1.2.6.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +pyOpenRPA-1.2.6.dist-info/METADATA,sha256=pU-EpQuvMPYjhD1o2BYjfpOfsruNrxm9s7mfWX9mF1M,3612 +pyOpenRPA-1.2.6.dist-info/RECORD,, +pyOpenRPA-1.2.6.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +pyOpenRPA-1.2.6.dist-info/WHEEL,sha256=qB97nP5e4MrOsXW5bIU5cUn_KSVr10EV0l-GCHG9qNs,97 +pyOpenRPA-1.2.6.dist-info/top_level.txt,sha256=RPzwQXgYBRo_m5L3ZLs6Voh8aEkMeT29Xsul1w1qE0g,10 pyOpenRPA/.idea/inspectionProfiles/profiles_settings.xml,sha256=YXLFmX7rPNGcnKK1uX1uKYPN0fpgskYNe7t0BV7cqkY,174 pyOpenRPA/.idea/misc.xml,sha256=V-fQnOz-bYEZULgfbFgm-8mURphZrKfXMSd0wKjeEyA,188 pyOpenRPA/.idea/modules.xml,sha256=Q__U1JIA2cjxbLRXAv-SfYY00fZA0TNlpkkbY4s3ncg,277 @@ -72,7 +72,7 @@ pyOpenRPA/Orchestrator/Web/Index.js,sha256=Blo3LHe_a3zrW7MqYo4BSIwoOx7nlO7Ko9LWx pyOpenRPA/Orchestrator/Web/Index.xhtml,sha256=a4N_reLA6_Zb2KXiL73a7cWtJwO0W0Dr5lZ-RpUwuI0,16428 pyOpenRPA/Orchestrator/Web/__pycache__/Basic.cpython-37.pyc,, pyOpenRPA/Orchestrator/Web/favicon.ico,sha256=6S8XwSQ_3FXPpaX6zYkf8uUewVXO9bHnrrDHEoWrEgw,112922 -pyOpenRPA/Orchestrator/__Orchestrator__.py,sha256=2WbaatF0yN1Sx3P1Zru3clMbUTq4N-ErjMmsi0V7TKE,117659 +pyOpenRPA/Orchestrator/__Orchestrator__.py,sha256=n-PrWqEDql1POF4bM-r9cTun9WZUqzIYRjxDEmV7xAM,119846 pyOpenRPA/Orchestrator/__init__.py,sha256=f1RFDzOkL3IVorCtqogjGdXYPtHH-P-y-5CqT7PGy7A,183 pyOpenRPA/Orchestrator/__main__.py,sha256=czJrc7_57WiO3EPIYfPeF_LG3pZsQVmuAYgbl_YXcVU,273 pyOpenRPA/Orchestrator/__pycache__/BackwardCompatibility.cpython-37.pyc,, @@ -341,6 +341,6 @@ pyOpenRPA/Tools/Terminator.py,sha256=VcjX3gFXiCGu3MMCidhrTNsmC9wsAqfjRJdTSU9fLnU pyOpenRPA/Tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 pyOpenRPA/Tools/__pycache__/Terminator.cpython-37.pyc,, pyOpenRPA/Tools/__pycache__/__init__.cpython-37.pyc,, -pyOpenRPA/__init__.py,sha256=7jBgAILYoa342lTEQGpNGus8Zpiei0bAZkw1sVLtsGI,174 +pyOpenRPA/__init__.py,sha256=fI-2Npv3ZqIEhm1omXoocfYZw7PY1Ccf_pHXi_bvI0w,174 pyOpenRPA/__pycache__/__init__.cpython-37.pyc,, pyOpenRPA/test.txt,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 diff --git a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.5.dist-info/REQUESTED b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.6.dist-info/REQUESTED similarity index 100% rename from Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.5.dist-info/REQUESTED rename to Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.6.dist-info/REQUESTED diff --git a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.5.dist-info/WHEEL b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.6.dist-info/WHEEL similarity index 100% rename from Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.5.dist-info/WHEEL rename to Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.6.dist-info/WHEEL diff --git a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.5.dist-info/top_level.txt b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.6.dist-info/top_level.txt similarity index 100% rename from Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.5.dist-info/top_level.txt rename to Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA-1.2.6.dist-info/top_level.txt diff --git a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/Orchestrator/__Orchestrator__.py b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/Orchestrator/__Orchestrator__.py index 805472d0..ac155ad3 100644 --- a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/Orchestrator/__Orchestrator__.py +++ b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/Orchestrator/__Orchestrator__.py @@ -767,6 +767,64 @@ def WebAuditMessageCreate(inRequest, inOperationCodeStr="-", inMessageStr="-"): lResultStr = inMessageStr return lResultStr +def WebRequestParseBodyBytes(inRequest): + """ + Extract the body in bytes from the request + + :param inRequest: inRequest from the server + :return: Bytes or None + """ + lBodyBytes=None + if inRequest.headers.get('Content-Length') is not None: + lInputByteArrayLength = int(inRequest.headers.get('Content-Length')) + lBodyBytes = inRequest.rfile.read(lInputByteArrayLength) + return lBodyBytes + +def WebRequestParseBodyStr(inRequest): + """ + Extract the body in str from the request + + :param inRequest: inRequest from the server + :return: str or None + """ + + return WebRequestParseBodyBytes(inRequest=inRequest).decode('utf-8') + +def WebRequestParseBodyJSON(inRequest): + """ + Extract the body in dict/list from the request + + :param inRequest: + :return: dict or list + """ + return json.loads(WebRequestParseBodyStr(inRequest=inRequest)) + +def WebRequestParseFile(inRequest): + """ + Parse the request - extract the file (name, body in bytes) + + :param inRequest: + :return: (FileNameStr, FileBodyBytes) or (None, None) + """ + lResultTurple=(None,None) + if inRequest.headers.get('Content-Length') is not None: + lInputByteArray = WebRequestParseBodyBytes(inRequest=inRequest) + #print(f"BODY:ftInputByteArrayl") + # Extract bytes data + lBoundaryStr = str(inRequest.headers.get('Content-Type')) + lBoundaryStr = lBoundaryStr[lBoundaryStr.index("boundary=")+9:] # get the boundary key #print(LBoundoryStr) + lSplit = lInputByteArray.split('\r\n\r\n') + lDelimiterRNRNIndex = lInputByteArray.index(b'\r\n\r\n') #print(LSplit) # Get file name + lSplit0 = lInputByteArray[:lDelimiterRNRNIndex].split(b'\r\n')[1] + lFileNameBytes = lSplit0[lSplit0.index(b'filename="')+10:-1] + lFileNameStr = lFileNameBytes.decode("utf-8") + # File data bytes + lFileDataBytes = lInputByteArray[lDelimiterRNRNIndex+4:] + lFileDataBytes = lFileDataBytes[:lFileDataBytes.index(b"\r\n--"+lBoundaryStr.encode("utf-8"))] + lResultTurple = (lFileNameStr, lFileDataBytes) + + return lResultTurple + def WebUserInfoGet(inRequest): """ Return User info about request diff --git a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/__init__.py b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/__init__.py index a01645a7..8167039a 100644 --- a/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/__init__.py +++ b/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/__init__.py @@ -3,7 +3,7 @@ r""" The OpenRPA package (from UnicodeLabs) """ -__version__ = 'v1.2.5' +__version__ = 'v1.2.6' __all__ = [] __author__ = 'Ivan Maslov ' #from .Core import Robot \ No newline at end of file diff --git a/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py b/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py index 805472d0..ac155ad3 100644 --- a/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py +++ b/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py @@ -767,6 +767,64 @@ def WebAuditMessageCreate(inRequest, inOperationCodeStr="-", inMessageStr="-"): lResultStr = inMessageStr return lResultStr +def WebRequestParseBodyBytes(inRequest): + """ + Extract the body in bytes from the request + + :param inRequest: inRequest from the server + :return: Bytes or None + """ + lBodyBytes=None + if inRequest.headers.get('Content-Length') is not None: + lInputByteArrayLength = int(inRequest.headers.get('Content-Length')) + lBodyBytes = inRequest.rfile.read(lInputByteArrayLength) + return lBodyBytes + +def WebRequestParseBodyStr(inRequest): + """ + Extract the body in str from the request + + :param inRequest: inRequest from the server + :return: str or None + """ + + return WebRequestParseBodyBytes(inRequest=inRequest).decode('utf-8') + +def WebRequestParseBodyJSON(inRequest): + """ + Extract the body in dict/list from the request + + :param inRequest: + :return: dict or list + """ + return json.loads(WebRequestParseBodyStr(inRequest=inRequest)) + +def WebRequestParseFile(inRequest): + """ + Parse the request - extract the file (name, body in bytes) + + :param inRequest: + :return: (FileNameStr, FileBodyBytes) or (None, None) + """ + lResultTurple=(None,None) + if inRequest.headers.get('Content-Length') is not None: + lInputByteArray = WebRequestParseBodyBytes(inRequest=inRequest) + #print(f"BODY:ftInputByteArrayl") + # Extract bytes data + lBoundaryStr = str(inRequest.headers.get('Content-Type')) + lBoundaryStr = lBoundaryStr[lBoundaryStr.index("boundary=")+9:] # get the boundary key #print(LBoundoryStr) + lSplit = lInputByteArray.split('\r\n\r\n') + lDelimiterRNRNIndex = lInputByteArray.index(b'\r\n\r\n') #print(LSplit) # Get file name + lSplit0 = lInputByteArray[:lDelimiterRNRNIndex].split(b'\r\n')[1] + lFileNameBytes = lSplit0[lSplit0.index(b'filename="')+10:-1] + lFileNameStr = lFileNameBytes.decode("utf-8") + # File data bytes + lFileDataBytes = lInputByteArray[lDelimiterRNRNIndex+4:] + lFileDataBytes = lFileDataBytes[:lFileDataBytes.index(b"\r\n--"+lBoundaryStr.encode("utf-8"))] + lResultTurple = (lFileNameStr, lFileDataBytes) + + return lResultTurple + def WebUserInfoGet(inRequest): """ Return User info about request diff --git a/Sources/pyOpenRPA/__init__.py b/Sources/pyOpenRPA/__init__.py index a01645a7..8167039a 100644 --- a/Sources/pyOpenRPA/__init__.py +++ b/Sources/pyOpenRPA/__init__.py @@ -3,7 +3,7 @@ r""" The OpenRPA package (from UnicodeLabs) """ -__version__ = 'v1.2.5' +__version__ = 'v1.2.6' __all__ = [] __author__ = 'Ivan Maslov ' #from .Core import Robot \ No newline at end of file diff --git a/Wiki/ENG_Guide/html/Orchestrator/02_Defs.html b/Wiki/ENG_Guide/html/Orchestrator/02_Defs.html index 993087d9..273fbc8e 100644 --- a/Wiki/ENG_Guide/html/Orchestrator/02_Defs.html +++ b/Wiki/ENG_Guide/html/Orchestrator/02_Defs.html @@ -429,6 +429,18 @@

WebListenCreate(inGSettings[, …])

Create listen interface for the web server

+

WebRequestParseBodyBytes(inRequest)

+

Extract the body in bytes from the request

+ +

WebRequestParseBodyJSON(inRequest)

+

Extract the body in dict/list from the request

+ +

WebRequestParseBodyStr(inRequest)

+

Extract the body in str from the request

+ +

WebRequestParseFile(inRequest)

+

Parse the request - extract the file (name, body in bytes)

+

WebURLConnectDef(inGSettings, inMethodStr, …)

Connect URL to DEF

@@ -1900,6 +1912,62 @@ Var 2 (Backward compatibility): inGSettings, inRDPSessionKeyStr, inHostStr, inPo +
+
+pyOpenRPA.Orchestrator.__Orchestrator__.WebRequestParseBodyBytes(inRequest)[source]
+

Extract the body in bytes from the request

+
+
Parameters
+

inRequest – inRequest from the server

+
+
Returns
+

Bytes or None

+
+
+
+ +
+
+pyOpenRPA.Orchestrator.__Orchestrator__.WebRequestParseBodyJSON(inRequest)[source]
+

Extract the body in dict/list from the request

+
+
Parameters
+

inRequest

+
+
Returns
+

dict or list

+
+
+
+ +
+
+pyOpenRPA.Orchestrator.__Orchestrator__.WebRequestParseBodyStr(inRequest)[source]
+

Extract the body in str from the request

+
+
Parameters
+

inRequest – inRequest from the server

+
+
Returns
+

str or None

+
+
+
+ +
+
+pyOpenRPA.Orchestrator.__Orchestrator__.WebRequestParseFile(inRequest)[source]
+

Parse the request - extract the file (name, body in bytes)

+
+
Parameters
+

inRequest

+
+
Returns
+

(FileNameStr, FileBodyBytes) or (None, None)

+
+
+
+
pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectDef(inGSettings, inMethodStr, inURLStr, inMatchTypeStr, inDef, inContentTypeStr='application/octet-stream')[source]
diff --git a/Wiki/ENG_Guide/html/_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html b/Wiki/ENG_Guide/html/_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html index f12fe695..b9d70f73 100644 --- a/Wiki/ENG_Guide/html/_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html +++ b/Wiki/ENG_Guide/html/_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html @@ -948,6 +948,64 @@ lResultStr = inMessageStr return lResultStr +
[docs]def WebRequestParseBodyBytes(inRequest): + """ + Extract the body in bytes from the request + + :param inRequest: inRequest from the server + :return: Bytes or None + """ + lBodyBytes=None + if inRequest.headers.get('Content-Length') is not None: + lInputByteArrayLength = int(inRequest.headers.get('Content-Length')) + lBodyBytes = inRequest.rfile.read(lInputByteArrayLength) + return lBodyBytes
+ +
[docs]def WebRequestParseBodyStr(inRequest): + """ + Extract the body in str from the request + + :param inRequest: inRequest from the server + :return: str or None + """ + + return WebRequestParseBodyBytes(inRequest=inRequest).decode('utf-8')
+ +
[docs]def WebRequestParseBodyJSON(inRequest): + """ + Extract the body in dict/list from the request + + :param inRequest: + :return: dict or list + """ + return json.loads(WebRequestParseBodyStr(inRequest=inRequest))
+ +
[docs]def WebRequestParseFile(inRequest): + """ + Parse the request - extract the file (name, body in bytes) + + :param inRequest: + :return: (FileNameStr, FileBodyBytes) or (None, None) + """ + lResultTurple=(None,None) + if inRequest.headers.get('Content-Length') is not None: + lInputByteArray = WebRequestParseBodyBytes(inRequest=inRequest) + #print(f"BODY:ftInputByteArrayl") + # Extract bytes data + lBoundaryStr = str(inRequest.headers.get('Content-Type')) + lBoundaryStr = lBoundaryStr[lBoundaryStr.index("boundary=")+9:] # get the boundary key #print(LBoundoryStr) + lSplit = lInputByteArray.split('\r\n\r\n') + lDelimiterRNRNIndex = lInputByteArray.index(b'\r\n\r\n') #print(LSplit) # Get file name + lSplit0 = lInputByteArray[:lDelimiterRNRNIndex].split(b'\r\n')[1] + lFileNameBytes = lSplit0[lSplit0.index(b'filename="')+10:-1] + lFileNameStr = lFileNameBytes.decode("utf-8") + # File data bytes + lFileDataBytes = lInputByteArray[lDelimiterRNRNIndex+4:] + lFileDataBytes = lFileDataBytes[:lFileDataBytes.index(b"\r\n--"+lBoundaryStr.encode("utf-8"))] + lResultTurple = (lFileNameStr, lFileDataBytes) + + return lResultTurple
+
[docs]def WebUserInfoGet(inRequest): """ Return User info about request diff --git a/Wiki/ENG_Guide/html/genindex.html b/Wiki/ENG_Guide/html/genindex.html index 3be0eab4..2d0040b9 100644 --- a/Wiki/ENG_Guide/html/genindex.html +++ b/Wiki/ENG_Guide/html/genindex.html @@ -484,10 +484,18 @@
  • WebListenCreate() (in module pyOpenRPA.Orchestrator.__Orchestrator__)
  • -
  • WebURLConnectDef() (in module pyOpenRPA.Orchestrator.__Orchestrator__) +
  • WebRequestParseBodyBytes() (in module pyOpenRPA.Orchestrator.__Orchestrator__) +
  • +
  • WebRequestParseBodyJSON() (in module pyOpenRPA.Orchestrator.__Orchestrator__) +
  • +
  • WebRequestParseBodyStr() (in module pyOpenRPA.Orchestrator.__Orchestrator__)