From fe1a168420440e79d1dc2a6dfc6116fbdd2c5302 Mon Sep 17 00:00:00 2001 From: Kaali Date: Thu, 22 Aug 2019 14:34:27 +0530 Subject: [PATCH] Add new requiremnts.txt for smooth packaging on OSX --- Application/Backup.Datapod.mac.spec | 41 ++++++++ Application/Datapod_OSX.spec | 39 ++++++++ .../__pycache__/__init__.cpython-37.pyc | Bin 172 -> 171 bytes .../__pycache__/gen_mnemonic.cpython-37.pyc | Bin 1119 -> 1118 bytes .../__pycache__/key_derivation.cpython-37.pyc | Bin 1181 -> 1180 bytes .../__pycache__/symmetric.cpython-37.pyc | Bin 968 -> 967 bytes Application/Executables/Datapodmac.spec | 39 ++++++++ Application/Executables/build.py | 42 ++++++++ .../__pycache__/application.cpython-37.pyc | Bin 2937 -> 3010 bytes Application/__pycache__/config.cpython-37.pyc | Bin 4894 -> 4893 bytes Application/application.py | 4 +- .../__pycache__/__init__.cpython-37.pyc | Bin 206 -> 205 bytes .../backup/__pycache__/back.cpython-37.pyc | Bin 8493 -> 8492 bytes .../__pycache__/backup_api.cpython-37.pyc | Bin 4756 -> 4755 bytes .../__pycache__/__init__.cpython-37.pyc | Bin 600 -> 599 bytes .../__pycache__/api.cpython-37.pyc | Bin 1803 -> 1802 bytes .../__pycache__/__init__.cpython-37.pyc | Bin 235 -> 234 bytes .../browser_history.cpython-37.pyc | Bin 4029 -> 4028 bytes .../__pycache__/__init__.cpython-37.pyc | Bin 325 -> 324 bytes .../crypto_history_api.cpython-37.pyc | Bin 3102 -> 3101 bytes .../__pycache__/__init__.cpython-37.pyc | Bin 186 -> 185 bytes .../__pycache__/binance.cpython-37.pyc | Bin 1845 -> 1844 bytes .../__pycache__/__init__.cpython-37.pyc | Bin 228 -> 227 bytes .../__pycache__/facebook_ds.cpython-37.pyc | Bin 2364 -> 2363 bytes .../__pycache__/facebool_api.cpython-37.pyc | Bin 1507 -> 1506 bytes .../__pycache__/__init__.cpython-37.pyc | Bin 222 -> 221 bytes .../github_ds/__pycache__/auth.cpython-37.pyc | Bin 1300 -> 1299 bytes .../backup_functions.cpython-37.pyc | Bin 5874 -> 5873 bytes .../__pycache__/backup_new.cpython-37.pyc | Bin 7527 -> 7526 bytes .../__pycache__/errors.cpython-37.pyc | Bin 1228 -> 1227 bytes .../__pycache__/github_api.cpython-37.pyc | Bin 7532 -> 7531 bytes .../__pycache__/utils.cpython-37.pyc | Bin 12906 -> 12905 bytes .../__pycache__/__init__.cpython-37.pyc | Bin 231 -> 230 bytes .../__pycache__/instagram_api.cpython-37.pyc | Bin 2504 -> 2503 bytes .../__pycache__/instagram_data.cpython-37.pyc | Bin 5207 -> 5206 bytes .../__pycache__/__init__.cpython-37.pyc | Bin 258 -> 257 bytes .../takeout/__pycache__/api.cpython-37.pyc | Bin 8871 -> 8870 bytes .../takeout/__pycache__/images.cpython-37.pyc | Bin 3150 -> 3149 bytes .../__pycache__/location.cpython-37.pyc | Bin 5886 -> 5885 bytes .../__pycache__/parse_emails.cpython-37.pyc | Bin 11554 -> 11504 bytes .../purchases_n_reservations.cpython-37.pyc | Bin 3909 -> 3908 bytes .../data_sources/takeout/parse_emails.py | 1 - .../__pycache__/__init__.cpython-37.pyc | Bin 170 -> 169 bytes .../__pycache__/credentials.cpython-37.pyc | Bin 4141 -> 4140 bytes .../__pycache__/db_emails.cpython-37.pyc | Bin 2820 -> 2819 bytes .../__pycache__/db_images.cpython-37.pyc | Bin 1736 -> 1735 bytes .../__pycache__/db_profile.cpython-37.pyc | Bin 1383 -> 1382 bytes .../__pycache__/db_purchases.cpython-37.pyc | Bin 2780 -> 2779 bytes .../db_reservations.cpython-37.pyc | Bin 1462 -> 1461 bytes .../initialize_tables.cpython-37.pyc | Bin 6749 -> 6748 bytes .../__pycache__/__init__.cpython-37.pyc | Bin 180 -> 179 bytes .../__pycache__/__init__.cpython-37.pyc | Bin 187 -> 186 bytes .../github/__pycache__/calls.cpython-37.pyc | Bin 4951 -> 4950 bytes .../__pycache__/initialize.cpython-37.pyc | Bin 2457 -> 2456 bytes .../__pycache__/db_binance.cpython-37.pyc | Bin 2692 -> 2691 bytes .../__pycache__/__init__.cpython-37.pyc | Bin 209 -> 208 bytes .../__pycache__/errors.cpython-37.pyc | Bin 4550 -> 4549 bytes .../hook-dateparser.cpython-37.pyc | Bin 0 -> 430 bytes Application/requirements.txt | 36 ++++--- Application/socketclient_random.py | 93 ------------------ Application/socketclient_takeout.py | 93 ------------------ Application/sockets/__init__.py | 0 .../__pycache__/__init__.cpython-36.pyc | Bin 159 -> 0 bytes .../__pycache__/__init__.cpython-37.pyc | Bin 163 -> 0 bytes .../__pycache__/sockets.cpython-36.pyc | Bin 1788 -> 0 bytes .../__pycache__/sockets.cpython-37.pyc | Bin 2328 -> 0 bytes Application/sockets/sockets.py | 89 ----------------- .../__pycache__/__init__.cpython-37.pyc | Bin 204 -> 203 bytes .../__pycache__/api.cpython-37.pyc | Bin 14851 -> 14850 bytes .../__pycache__/users_helpers.cpython-37.pyc | Bin 1179 -> 1178 bytes .../utils/__pycache__/utils.cpython-37.pyc | Bin 6776 -> 6775 bytes 71 files changed, 183 insertions(+), 294 deletions(-) create mode 100644 Application/Backup.Datapod.mac.spec create mode 100644 Application/Datapod_OSX.spec create mode 100644 Application/Executables/Datapodmac.spec create mode 100644 Application/Executables/build.py create mode 100644 Application/pyinstaller_hooks/__pycache__/hook-dateparser.cpython-37.pyc delete mode 100644 Application/socketclient_random.py delete mode 100644 Application/socketclient_takeout.py delete mode 100644 Application/sockets/__init__.py delete mode 100644 Application/sockets/__pycache__/__init__.cpython-36.pyc delete mode 100644 Application/sockets/__pycache__/__init__.cpython-37.pyc delete mode 100644 Application/sockets/__pycache__/sockets.cpython-36.pyc delete mode 100644 Application/sockets/__pycache__/sockets.cpython-37.pyc delete mode 100644 Application/sockets/sockets.py diff --git a/Application/Backup.Datapod.mac.spec b/Application/Backup.Datapod.mac.spec new file mode 100644 index 0000000..dc96a7d --- /dev/null +++ b/Application/Backup.Datapod.mac.spec @@ -0,0 +1,41 @@ +# -*- mode: python ; coding: utf-8 -*- + +block_cipher = None + +import distutils +if distutils.distutils_path.endswith('__init__.py'): + distutils.distutils_path = os.path.dirname(distutils.distutils_path) + + +a = Analysis(['application.py'], + pathex=['/Users/kaali/Programs/datapod-backend-layer/Application'], + binaries=[], + datas=[], + hiddenimports=['_striptime'], + hookspath=['pyinstaller_hooks'], + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False) +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='Datapod', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=False ) +app = BUNDLE(exe, + name='Datapod.app', + icon=None, + bundle_identifier=None) diff --git a/Application/Datapod_OSX.spec b/Application/Datapod_OSX.spec new file mode 100644 index 0000000..b817ca0 --- /dev/null +++ b/Application/Datapod_OSX.spec @@ -0,0 +1,39 @@ +# -*- mode: python ; coding: utf-8 -*- + +block_cipher = None + +import distutils +if distutils.distutils_path.endswith('__init__.py'): + distutils.distutils_path = os.path.dirname(distutils.distutils_path) +a = Analysis(['application.py'], + pathex=['/Users/kaali/Programs/datapod-backend-layer/Application'], + binaries=[], + datas=[], + hiddenimports=['engineio.async_eventlet', '_striptime', 'engineio.async_gevent'], + hookspath=['pyinstaller_hooks'], + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False) +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='Datapod_OSX', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=False , icon='datapod.ico') +app = BUNDLE(exe, + name='Datapod_OSX.app', + icon='datapod.ico', + bundle_identifier=None) diff --git a/Application/EncryptionModule/__pycache__/__init__.cpython-37.pyc b/Application/EncryptionModule/__pycache__/__init__.cpython-37.pyc index bd7e2b4311927939d1f41d4fdecc0d31ee82613a..6f77e1d55b3c3f5baf23e1c5705860fa2cafba3f 100644 GIT binary patch delta 37 rcmZ3(xSEm2iIB?!W#o;}4=qkDD%Q_VOw7sLEXU}`3;@Tz3TglV delta 40 ucmcb|ai4?RiI}#iIe*3V8%%*ot%;Rh1{sLcy7 delta 38 scmX@keuACbiIV_y0K1$E`2YX_ diff --git a/Application/Executables/Datapodmac.spec b/Application/Executables/Datapodmac.spec new file mode 100644 index 0000000..41e9799 --- /dev/null +++ b/Application/Executables/Datapodmac.spec @@ -0,0 +1,39 @@ +# -*- mode: python ; coding: utf-8 -*- + +block_cipher = None +import distutils +if distutils.distutils_path.endswith('__init__.py'): + distutils.distutils_path = os.path.dirname(distutils.distutils_path) + +a = Analysis(['../application.py'], + pathex=['/Users/kaali/Programs/datapod-backend-layer/Application/Executables'], + binaries=[], + datas=[], + hiddenimports=['_striptime'], + hookspath=['../pyinstaller_hooks'], + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False) +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='Datapodmac', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=False , icon='datapod.ico') +app = BUNDLE(exe, + name='Datapodmac.app', + icon='datapod.ico', + bundle_identifier=None) diff --git a/Application/Executables/build.py b/Application/Executables/build.py new file mode 100644 index 0000000..ef96b11 --- /dev/null +++ b/Application/Executables/build.py @@ -0,0 +1,42 @@ + +import os +import platform +import subprocess +from loguru import logger +import shutil +def os_command_output(command:str, final_message:str) -> str: + + process = subprocess.Popen(command, stdout=subprocess.PIPE, shell=True) + while True: + line = process.stdout.readline() + if not line: + logger.success(final_message) + break + yield line.decode().split("\r")[0] + + + +def build_app(): + + if platform.system() == "Linux": + logger.info("Removing build directory") + shutil.rmtree("build") + backup_command = f"pyi-makespec --hidden-import _strptime --additional-hooks-dir pyinstaller_hooks --onefile --console --name Datapod --icon datapod.ico application.py" + + for out in os_command_output(backup_command, "Making Spec file completed"): + logger.info(out) + #backup_command = f"tar --create --lzma --no-check-device --verbose --listed-incremental={self.user_index} -f {temp.name} {self.raw_data_path}" + command = "pyinstaller Datapod.spec" + for out in os_command_output(command, "Build Complete"): + logger.info(out) + + elif platform.system() == "Darwin": + pass + #backup_command = f"gtar --create --lzma --no-check-device --verbose --listed-incremental={self.user_index} -f {temp.name} {self.raw_data_path}" + else: + raise Exception("The platform is not available for this os distribution") + + +if __name__ == "__main__": + build_app() + \ No newline at end of file diff --git a/Application/__pycache__/application.cpython-37.pyc b/Application/__pycache__/application.cpython-37.pyc index 2a9e638369c73ac9800bd2a618be019bb8cc8ff5..1f252d170e00d420ef92640300f0456bed54d34a 100644 GIT binary patch delta 605 zcmZ9H&ubGw6vy}Nrs<|JP=qE;O`6&ti7{z*w`m)j1O-7aRYAmp>yKs4d*a$nHqLB3 zh~S|;2?b^FY`uAvo;(QRU*JvX*@O5Gh=Stmdho{#eCNIIeBPUR-?Hy>nX{S9gd*4V zYqxH)XPG>FeqA{Ok5R!XztJ~r0~AV;xdXO^S+ed;Vy>%Dnk<~gJkEIF0cP>oo+i0D zEMO65_f&fY!ERy+=XMo)m8z0HPOCT{Q!D#xxbPBi5tnuq*>|0+{T7y`Q^6ClbBc_} zs!Ho5)?#Y|>$ohNwaLWBw)zyXq?PC>B>hxySE-H;q9E)PbmN8I6| z8;-arYA;|`yw#SEF3EYnpEs^@V%*qvUEdQwv>Q+ncH#@v#JRC2upmB+nT5Ipt14TR z2dhOARsNQ;C?qXtic87+)24I}lcNWI5Dfo8J|;`h5?_;>W{f2M2jaRr-oWE`pUaph zq$rvWtRvX?o7BT`vk`Bxu9v_RTl!^K6R-5m^xyyZskfnXu#tKM^_ghw+b$=k=lVWx z^cW!xLeKR%%SDgrjx%ukjDKow$=F?qGJ)#OHod@+74cMEN delta 566 zcmX>k{!@(CiISPx-Lq?;? zWo(5K`ascJY^7y6`S}GXO8&FSGn!47XZIEZD`CM<(7-OqXf=5j`%dm#oH_Z)i8&eh z#U+ztIOG}iC)aQUGMY?2$KlP5Y^w^V6{F?mc+MKedXD(`yu{qp`1m4_=|zqpS8x}X zBo>v#mt^Lq78R+1L|6)dMiv=?m>fBo#U-hEKp8WT1}hNZ3nCB}fLW?w#WuP5DWy57 zb^<_NaR`v$U<5${Fv-KjGr5{uOPYm)gNsRwgNK=glY^6qk%vu4Qb<^cox_WZ5da27 BhL->U diff --git a/Application/__pycache__/config.cpython-37.pyc b/Application/__pycache__/config.cpython-37.pyc index f8a84e2dcf8f3a153a1341acf0e3a0fd42bb2b3d..49d16084edb81954c92ac3d417a46bb19900e245 100644 GIT binary patch delta 489 zcmZwDIZpyX6bJAf4k4_F5RXdM#AFd7Au;jBL=hy$h{_>~3NA3ha_o{>40QIkQ)_Q& z_8VAO8_OyE2DZc)=V4)?Q~dJs{%>aU_Cdav#hBae68QPtFFuKB3u0!`A|m9a4QnVo z#slKvFh_^z6>J#H)>1Y6D3BT69c)K(1|~+NsVFU#K3lJlMCWW@B80;U;-?Gt5R%Qj z{mzOc^W8Z>lfUV(^22a|ez-6Sn0e7+^Uw2+x+MuhHWie}66DLk3b14LJQ9k=p-uq1 zoWf`}k;(3*lBI*gc!J2#PXhmat3=<%6H_G~2N%f(+;()7ZoQ?J$pj61Ujk9yV=mn9 zC|dP~FUV|ly^YBxJh%$10qa!qP2Z9j43FTxYIF_e=qW@~wHkA_l_svL#2`m7dkmz3 z43Gm(fIM&p6o4#n4qO12z$u4WjV>Ylj|e}z1)zcrW|_O9Yu9S6q?a4G(*3hAef6cj E0hh{gE&u=k delta 508 zcmZwDJx{_=6b9g4iejkv8J!do6KX`GiShdrk!l=7g^G#>t$2l^6mnY?CwJG*x;vWw z0vA`~dN==pvxD)zEDqY?$?18|ZF~BlKB`J06bee>Dqb8tD`_9ed3m2gNQYaNW1}Gv zur>h?)L6AZZJYZqO^ZHBtWR{m5@V%mg^r!mTdQJN?u&dv!tQ|oTS3|wVg2rKQ;bBt zY}36=!rn*A7wP#;8&yAsRrfPUiRxt)pFcb(I%Yf~NqTB1!X}VUf+>*juG=GIVHI@} zXo6g;u4VL%)cWz}R#Ib8^w+?D@5;OH9a?W*#6#n34yOY(!zo>wr>xr@>3qGL7d;-N z^_pRwUD=dzKlWq`c;Gac0kdEcEP-VZ2P*>JOzWoY*gSA!Fw3-xyrp7X&@+?SYzsr% zU7&?8FFy| diff --git a/Application/application.py b/Application/application.py index a9bbb51..94584f6 100644 --- a/Application/application.py +++ b/Application/application.py @@ -25,6 +25,7 @@ from sanic_cors import CORS from zmq.asyncio import ZMQEventLoop +import pprint from spf import SanicPluginsFramework @@ -177,11 +178,10 @@ def main(): # app.config.archive_path = config.archive_path app.config.from_object(config.config_object) #app.config["SIO"] = sio - import pprint pprint.pprint(app.config) #app.error_handler.add(Exception, server_error_handler) - app.run(host="localhost", port=app.config.PORT, workers=1) + app.run(host="0.0.0.0", port=app.config.PORT, workers=1) """ server = app.create_server( diff --git a/Application/backup/__pycache__/__init__.cpython-37.pyc b/Application/backup/__pycache__/__init__.cpython-37.pyc index 7fdab5ad1548724f4587a2f72d435c3677cd12d0..61260106b196b8e18a636c967c889ef5241e339c 100644 GIT binary patch delta 36 qcmX@dc$SgdiIe*3V8%%*mWs8wdcfISS+e delta 37 rcmX@hc#e_ViI*C{f;^pOH00M3khmG8_%)H+Ep~b01#roNai8+~@&6uw;0|1%&35);$ delta 40 ucmeC;>*nKj;^pOH00QPHrH$OO%zQrj8Tq-X`e~_^dAW&sn@yRoG6MjmWeN}g diff --git a/Application/data_sources/browsers/__pycache__/__init__.cpython-37.pyc b/Application/data_sources/browsers/__pycache__/__init__.cpython-37.pyc index d3f8f99ac9e8405fe1bcfd7bb1f2d2ca1d55dbcb..5042eaef85b4b53d74b0676ed0223bcebeb54afb 100644 GIT binary patch delta 37 rcmaFO_==IoiI`njxss;*( delta 38 scmaFG_?nT&iIe#o9$oe*3V8%%*mYiFa-dc_X>^x delta 37 rcmX@Ybd-tPiIt`n>=44I`%me_ACJAN$ delta 37 rcmdnVxQmh7iI diff --git a/Application/data_sources/facebook_ds/__pycache__/facebool_api.cpython-37.pyc b/Application/data_sources/facebook_ds/__pycache__/facebool_api.cpython-37.pyc index 17b1911e2e1d3467cbd24c88afcafc6c4eafec83..9b7c6a0cbd08b207b1538b55857ebab685047fb2 100644 GIT binary patch delta 39 tcmaFN{fL{}iIB@HWaJIg4=qkDD%Q_VOw7sLT*SDD834NA3f}+# delta 40 ucmbQtHHC}YiIGKWaJCi&&bbB)lW;U%*##8+g!-Fh#3ID>I)|T diff --git a/Application/data_sources/github_ds/__pycache__/backup_functions.cpython-37.pyc b/Application/data_sources/github_ds/__pycache__/backup_functions.cpython-37.pyc index c358996fc89e4ba8d79880da89e7270a87671dfd..412226e7641f6de0f04175bb87f41a19cd9e9057 100644 GIT binary patch delta 38 scmeyQ`%#z6iIt`n>=45WRW!)+W0LAYLe*3V8%%*ovRjI~i50M6(Oy8r+H delta 39 tcmaE6_1ucfiIB@%!o(Y)A6lGRRIHz!n3$8f`7P6ZMgZ6B41xdv delta 40 ucmX@jd4`kQiIG)!o(M;pOK%Ns-KoxnU|ZGxA_gzeMSJ`PYmGz diff --git a/Application/data_sources/github_ds/__pycache__/github_api.cpython-37.pyc b/Application/data_sources/github_ds/__pycache__/github_api.cpython-37.pyc index a16f4100e956f0fda62af0006aaa9bd599e4b929..99a3d5c95f537dd91ba1957699e3dcaf339083d2 100644 GIT binary patch delta 45 zcmaE3_1cQdiIt`n>=45V;WxFHFcx$tjj1eOM9hnU_ delta 46 zcmaED^~Q?JiI7UqiIhd|a5@iIud_tJpiIgkMY*#3c>qK E09UjQy#N3J delta 38 scmcbnab1JkiIAL1`MjXzW-DeJKE|lc<%0K_0L~~24*&oF diff --git a/Application/data_sources/takeout/__pycache__/__init__.cpython-37.pyc b/Application/data_sources/takeout/__pycache__/__init__.cpython-37.pyc index b7aeada68c7a5c3447691317375765b5bc2edaf2..c43b8e817bad1fa0db0f3979997546c59f7c0d79 100644 GIT binary patch delta 36 qcmZo-YGmSe;^pOH00M3khl$)Byb=1L#i>Qb`q_zzIhhj|CISG2vI&L& delta 37 rcmZojvNga_u#>c2fu^y&D%%`xQE}HotZcDe{bHw?EY+QM%S-J#P>@p z9mS?qy*~cbbI==a*>>CY7u3X62>cDb22k`r^|utWD3VbTC}=?+Id;i-P*EqD!2>Y@nkLa*9$=F~#VDLSK$G#{En;c?A zAu^E&ouo_P`tcim5NmKiW7sroO(idA>6dqaYt*q!sM0&@=7h}X^^0D*1b54BI$og3 z72EW~sz8TEGru!u#S1zPa?dqSrdqxRE3}uNfEInrkB#!< b3)Id_@#L1cjU2`*Tbm4*(P1Fn8ruB}y_lP@ delta 729 zcmZva&rcIk5XT*Nw*+gOxNWwr+fv#nWR-+sjo?vY!9oLtKuEwqi#*zb+qKgYOG ze+2u0^ebbGi+)8;X3 z&?obA=m94z&~dDssIYnSZvifGm4@r|BenwDeldOmBl8?R&2uhdk{!1=6J+KU>)}}c zKz5heeHl~o6=)673$#|dhdPHUMArQ=rJ&dlB44tY2kl$ahF4n7=2x~)QEd*6&ZqYm%;z3Klb^iaG$2~ zG5V64gQjm@9fGjx*WiL0U9)c|&dEpB*tkocZ9#=z*y9D2F^~xTGk43aH$*ou)Ef_# z;xBs!JaW=M)29MX1V>pn$H+4(RLG=YnHDm(sWvoFk%Q3F%ocR$TjqQGOw(M~k_hNz zWYZiR-rtvOd?I^YHolrInrcnP*>>qw)`eBy7%c<1w4AHL7QN0D;DEm7CT{SZ3-l+R XylEROqjs>(R)f)Gc#IB>=b!%prf{2* diff --git a/Application/data_sources/takeout/__pycache__/images.cpython-37.pyc b/Application/data_sources/takeout/__pycache__/images.cpython-37.pyc index 247f30622e2fe27f49e2076ff0d0df0b61c02f72..452b599be5d0e21ff7a0f5a71499f35798b84e7c 100644 GIT binary patch delta 129 zcmX>naaMxciI=oc1 zwb`1rotaGosJ=*Z@(B(ZMy<(DIW!nmH}i3}F>)J$#En6O$>jN5e;FMo&*he2RGqwy U+f~3CB+LXNm_dZyWNsd302f~#C;$Ke delta 153 zcmX>raZZBUiIZhev=H({lZT4Z>C;|Y`I14QR diff --git a/Application/data_sources/takeout/__pycache__/parse_emails.cpython-37.pyc b/Application/data_sources/takeout/__pycache__/parse_emails.cpython-37.pyc index 1e5c4c723c6e77bd86de4e6be1f9e3392a63c8bc..b313f2da7f4a6650fc34d8acfc9cac1109c65aa2 100644 GIT binary patch delta 2300 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 diff --git a/Application/data_sources/takeout/__pycache__/purchases_n_reservations.cpython-37.pyc b/Application/data_sources/takeout/__pycache__/purchases_n_reservations.cpython-37.pyc index 9d57d99fe7fc9cd83babdd63beab32db4a4eddcc..5d9c7fdfeb68b81256f3c6c341ef6a02cc24f668 100644 GIT binary patch delta 39 tcmX>qcSMfciI3N-)# delta 40 ucmX>icT|qsiIZhev=H({lZ8l}*=K%o0ZwfU4 diff --git a/Application/data_sources/takeout/parse_emails.py b/Application/data_sources/takeout/parse_emails.py index e54feeb..98c9350 100644 --- a/Application/data_sources/takeout/parse_emails.py +++ b/Application/data_sources/takeout/parse_emails.py @@ -27,7 +27,6 @@ import asyncio import functools import aiohttp -from sockets.sockets import broadcast import concurrent.futures from tenacity import * from database_calls.db_emails import store_email, store_email_attachment, store_email_content diff --git a/Application/database_calls/__pycache__/__init__.cpython-37.pyc b/Application/database_calls/__pycache__/__init__.cpython-37.pyc index 06127f2f9a687e721a37cbc20f7b1320788c365c..8362bea575d93d5e26165d58dee17bbec4d1b0f1 100644 GIT binary patch delta 36 qcmZ3*xRR0EiIt`n>=44I`j06CPwh1Nx delta 37 rcmZ3YZl{n;^pOH0D|YN9viu3nR$ctLyJ?3iuJP-6LT^*n=zkb2LP=-3P=C| delta 40 ucmZn`YZ2pi;^pOH0D|lft{b^!nfXHWGxBp&_0v)-^KujOHk&e^V+R1k& delta 40 ucmX@kdxDqSiI`!F3k(1N delta 40 ucmaFH^_+{_iIZhev=H({lZC=cDm*^!^9V*pOK%Ns-KoxnU|ZGxA_UvMJ52)h75}U diff --git a/Application/database_calls/__pycache__/initialize_tables.cpython-37.pyc b/Application/database_calls/__pycache__/initialize_tables.cpython-37.pyc index 9c61494aa6d235b45769ccc22edd9ef569692f61..c3626262702e5ac14a64f54df624b5963d5e6fc6 100644 GIT binary patch delta 113 zcmca>a>s<*iI_7}a+bt(HV>fYBA?0bk_|#ZK&B>dkqAgc3`F=&zA5R;7&Q3+ KkHlnqDLDXvcptI= delta 114 zcmca(a@U00iIY z_$4e*3V8%%*mV>m<#}-c?wGa delta 37 rcmdnYxP_71iIt`n>=44I`%mM(M2MPrM delta 37 rcmdnRxSNsNiIt`n>=45V8;QY=B0J~5M@&Et; delta 39 tcmcbnc3q9jiI5jn3K8r1EU`cZ5HKr;^pOH00M3khmG7EOuW(hp~b01#roNai8+~@6`7Jb0GJ600{{R3 delta 40 ucmZn`Z4u>m;^pOH0D}MTv^H{cF!9CcXXNLm>Zhev=H({lZB}4P<^TZA(hDB| diff --git a/Application/errors_module/__pycache__/__init__.cpython-37.pyc b/Application/errors_module/__pycache__/__init__.cpython-37.pyc index 20de3447fd336d04894b5d79ed09a8dd423b2499..54ad1b1f5f45e7bc3f7033083d99d78d239dc82d 100644 GIT binary patch delta 37 rcmcb}c!80}iIc#)CEiIB@X&cy4lA6lGRRIHz!n3$8fc>|LeKLFK@3v2)Y delta 40 ucmX@Ad`y|!iIpOK%Ns-KoxnU|ZGw|PC27(W2r>*ZUN$hF7%N*p{cXrM;MY>Y^sgby0?ornpo-zvfxXWL<@vI^Yf%~XY`*tW zxqPej&e=GaO%TfQQK3RAui~YlA5$07trP;@cz-d_5J9DB+47=Smh!t2dT6 zu82IN#cajv9kgPmcn7w)Hb%*sd#T&PbU4AmQ1xS_h&cPVotrKUFAwi>h5tcZ6g*>$ I4w4c31~jUK9smFU literal 0 HcmV?d00001 diff --git a/Application/requirements.txt b/Application/requirements.txt index badb354..86c07ab 100644 --- a/Application/requirements.txt +++ b/Application/requirements.txt @@ -1,7 +1,7 @@ aiofiles==0.4.0 aiohttp==3.5.4 -aioify==0.3.1 altgraph==0.16.1 +appnope==0.1.0 asn1crypto==0.24.0 async-timeout==3.0.1 asyncinit==0.2.4 @@ -31,9 +31,12 @@ cryptography==2.6.1 Cython==0.29.10 dateparser==0.7.1 decorator==4.0.11 +dnspython==1.16.0 docutils==0.14 +e==1.4.5 ecdsa==0.13.2 Elixir==0.7.1 +eventlet==0.25.1 ExifRead==2.1.2 extruct==0.7.2 Faker==1.0.5 @@ -41,12 +44,19 @@ future==0.17.1 geocoder==1.38.1 geographiclib==1.49 geopy==1.19.0 +gevent==1.4.0 gpsphoto==2.2.3 +greenlet==0.4.15 +h11==0.8.1 +h2==3.1.1 +hpack==3.0.0 html2text==2018.1.9 html5lib==1.0.1 +httpcore==0.3.0 httptools==0.0.13 humanfriendly==4.18 humanize==0.5.1 +hyperframe==5.2.0 hyperlink==19.0.0 idna==2.8 idna-ssl==1.1.0 @@ -59,30 +69,25 @@ isodate==0.6.0 jedi==0.13.3 Jinja2==2.10.1 jmespath==0.9.4 -loguru==0.3.1 +loguru==0.3.2 lxml==4.3.3 macholib==1.11 MarkupSafe==1.1.1 mf2py==1.1.2 mnemonic==0.18 -module-wrapper==0.2.4 +monotonic==1.5 moviepy==0.2.3.2 multidict==4.5.2 -netifaces==0.10.6 -Nuitka==0.6.4 numpy==1.16.3 paramiko==2.6.0 parso==0.4.0 pbkdf2==1.3 pbr==5.2.0 peewee==3.9.6 -pefile==2019.4.18 pexpect==4.7.0 pickleshare==0.7.5 piexif==1.1.2 Pillow==6.0.0 -plyvel==1.0.5 -poetry-version==0.1.3 prompt-toolkit==2.0.9 protobuf==3.7.1 ptyprocess==0.6.0 @@ -92,7 +97,7 @@ pycparser==2.19 pycryptodome==3.8.1 Pygments==2.3.1 PyHamcrest==1.9.0 -PyInstaller==3.4 +PyInstaller==3.5 PyNaCl==1.3.0 pyOpenSSL==19.0.0 pyotp==2.2.7 @@ -104,11 +109,9 @@ python-axolotl==0.1.42 python-axolotl-curve25519==0.4.1.post2 python-binance==0.7.1 python-dateutil==2.8.0 -python-dotenv==0.10.3 --e git+https://github.com/GraphicalDot/datapod-backend-layer.git@1e554e6e1671008b7eb07038541ec917b3170144#egg=python_engineio +python-engineio==3.9.2.dev0 python-jose==3.0.1 python-magic==0.4.15 -python-socketio==4.3.0 pytz==2019.1 PyYAML==3.13 pyzmq==18.0.1 @@ -117,14 +120,16 @@ rdflib==4.2.2 rdflib-jsonld==0.4.0 regex==2019.6.8 requests==2.22.0 +requests-async==0.5.0 requests-file==1.4.3 requests-toolbelt==0.7.0 reverse-geocoder==1.5.1 +rfc3986==1.3.2 rsa==3.4.2 s3transfer==0.2.0 -sanic==19.3.1 -Sanic-Cors==0.9.8.post2 -Sanic-Plugins-Framework==0.8.1 +sanic==19.6.2 +Sanic-Cors==0.9.8 +Sanic-Plugins-Framework==0.7.0 sanic-sse==0.2.1 scipy==1.2.1 selenium==4.0.0a1 @@ -138,7 +143,6 @@ Tempita==0.5.2 tenacity==5.0.4 text-unidecode==1.2 tldextract==2.2.1 -tomlkit==0.5.5 tqdm==4.11.2 traitlets==4.3.2 Twisted==19.2.1 diff --git a/Application/socketclient_random.py b/Application/socketclient_random.py deleted file mode 100644 index eebab3c..0000000 --- a/Application/socketclient_random.py +++ /dev/null @@ -1,93 +0,0 @@ -import socketio -import asyncio -import time -loop = asyncio.get_event_loop() - -sio = socketio.AsyncClient() -start_timer = None - -#sio = socketio.Client() - -@sio.event -def connect(): - print('client connection established') - print('my sid is', sio.sid) - - -@sio.event -def datapod_message(data): - print('message received with ', data) - sio.emit('my response', {'response': 'my response'}) - -@sio.event -def my_event(data): - print('My Event from server') - - - -@sio.on("message") -def message(data): - print(f'Data from the server is {data}') - - - -@sio.event -async def takeout(data): - print(f'Data from Takeout {data}') - - - - - -@sio.event -def ping(data): - print('pING RECEIVED FROM THE SERVER from server') - -@sio.event -def disconnect(): - print('disconnected from server') - - - -@sio.on("takeout_response", namespace='/random') -async def handle_takeout_response(data): - print(f"Response received form the server is {data}") - #await send_ping() - - -async def send_ping(): - global start_timer - start_timer = time.time() - await sio.emit('ping_from_client') - - -@sio.event -async def connect(): - print('connected to server') - #await send_ping() - - -@sio.on('connect', namespace='/random') -async def on_connect(): - print("I'm connected to the /random namespace!") - #await sio.emit('initiate_takeout', {'data': "Initiate takeout"}, namespace='/takeout') - - await send_ping() - -@sio.event -async def pong(data): - global start_timer - latency = time.time() - start_timer - print('latency is {0:.2f} ms'.format(latency * 1000)) - await sio.sleep(1) - await send_ping() - - -async def start_client(): - await sio.connect('http://localhost:8000', namespaces=['/random']) - await sio.wait() - - - -if __name__ == '__main__': - loop.run_until_complete(start_client()) diff --git a/Application/socketclient_takeout.py b/Application/socketclient_takeout.py deleted file mode 100644 index c06dbdd..0000000 --- a/Application/socketclient_takeout.py +++ /dev/null @@ -1,93 +0,0 @@ -import socketio -import asyncio -import time -loop = asyncio.get_event_loop() - -sio = socketio.AsyncClient() -start_timer = None - -#sio = socketio.Client() - -@sio.event -def connect(): - print('client connection established') - print('my sid is', sio.sid) - - -@sio.event -def datapod_message(data): - print('message received with ', data) - sio.emit('my response', {'response': 'my response'}) - -@sio.event -def my_event(data): - print('My Event from server') - - - -@sio.on("message") -def message(data): - print(f'Data from the server is {data}') - - - -@sio.event -async def takeout(data): - print(f'Data from Takeout {data}') - - - - - -@sio.event -def ping(data): - print('pING RECEIVED FROM THE SERVER from server') - -@sio.event -def disconnect(): - print('disconnected from server') - - - -@sio.on("takeout_response", namespace='/takeout') -async def handle_takeout_response(data): - print(f"Response received form the server is {data}") - #await send_ping() - - -async def send_ping(): - global start_timer - start_timer = time.time() - await sio.emit('ping_from_client') - - -@sio.event -async def connect(): - print('connected to server') - #await send_ping() - - -@sio.on('connect', namespace='/takeout') -async def on_connect(): - print("I'm connected to the /takeout namespace!") - #await sio.emit('initiate_takeout', {'data': "Initiate takeout"}, namespace='/takeout') - - await send_ping() - -@sio.event -async def pong(data): - global start_timer - latency = time.time() - start_timer - print('latency is {0:.2f} ms'.format(latency * 1000)) - await sio.sleep(1) - await send_ping() - - -async def start_client(): - await sio.connect('http://localhost:8000', namespaces=['/takeout']) - await sio.wait() - - - -if __name__ == '__main__': - loop.run_until_complete(start_client()) diff --git a/Application/sockets/__init__.py b/Application/sockets/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/Application/sockets/__pycache__/__init__.cpython-36.pyc b/Application/sockets/__pycache__/__init__.cpython-36.pyc deleted file mode 100644 index 1ef01ea081ca18d8d0f0f79a33985bf2b6fca6ca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 159 zcmXr!<>h+M?-a`b1dl-k3@`#24nSPY0whuxf*CX!{Z=v*frJsnFCYDk{M=OiwA9MH z+{8TnfTH~LqQu-{{glL##De@3-K50i?9{vz-JHbA)FOSyf`XjPIDO&&l diff --git a/Application/sockets/__pycache__/__init__.cpython-37.pyc b/Application/sockets/__pycache__/__init__.cpython-37.pyc deleted file mode 100644 index 34128bc6d9911300fab00c5b5fb0171e7a123126..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 163 zcmZ?b<>g`kg7^GRu^{>}h=2h`Aj1KOi&=m~3PUi1CZpd diff --git a/Application/sockets/__pycache__/sockets.cpython-36.pyc b/Application/sockets/__pycache__/sockets.cpython-36.pyc deleted file mode 100644 index 4ddb6f44db32862ccbcce6916d01659bf11bc9ce..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1788 zcmcIk-EJF26rR~1d;OEtNt{wp0ZWvNm1s8#T%ZV5R8$oRDIgUIX{Bm4-5J~K?(Qrz zlYmVkA-Q)bPk?v;o`bj8+uq<;;EHp`cH$Uu$w+f{{`WiIch32EXQ%z^H($JX(;(yx z*=R5)pF`KbfZ>GGoW%Hba#}dCLzioA>u~ydC{B2_lZN*(vIGBX)7A~Eb09-al!Y6JjUB`bukSSnI{1DgxI3H?v#dIH9f z3FY*H{ziUx=9H43zB3MYxI1^Ak{8b|9lP&cINa}(^%>&=j}6}B8|xWG7O&i|fbA~{ zB?ftIb?YY#Iw^el+FqYYEW=CRrUc!R=@5K7(B5IG56{s^Yp14EpEDh!8f=`ohE zTRit*V4&EcK!(oA7LwUPD$7!&2GY#PffnjqsL-kXN@b<7?}m=$r*4Y!JX5mVqNi@I zUO0w7-5|OTvlNpS8=^t17SUrEEEzKN9=QaTIGwl`lskPWsurg=@u9TPHCEHu!tI^T z4s$4HWje)N|M}?T(edzdQ0VM05MqJ91?jEA=)ZagOx+ktRWP$;7=>SZhv5}BSMP0m z*MqV#N`^`n$&#E;;k3rEByN}PL++{fVH|ejV41#9F0i7XsWV$mEQ+}E1grLQ%dQ1b zJ3u4`mIYD!;#>gTNSb|a1I3N_!DmqQ&vNk?d?Xq@2xylEUcYy@z26ENyN!PUEx4T5 diff --git a/Application/sockets/__pycache__/sockets.cpython-37.pyc b/Application/sockets/__pycache__/sockets.cpython-37.pyc deleted file mode 100644 index c8dcf762f0d0fd3456ed1416267af29c5ab9a4e2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2328 zcmc&$TWcgm6t1f7o_i*f$s}3VTMJPbBs-$`pvdAbK@=f~D=aiDO{J@5(%HUQRf%Ry zp0cm`1tMg?7ax50-G9-qzL>w@ljqc2GCRw@C}KmMsZ(8-Q{VTU)AMj`twG@V?brP$ zA42aBbmor>oll|ZpTP(sXhH(~WeH7L!02?$2^>j|UEz#~aIaY4N$+YnvrwXC-(de&RB-j>+5 zUR%&dq`z|mk&=TxEh|Yr8c9`pnrCs;XF-GOvn&eJT*#mo1eT7=M!Hf5+3V%vB&W3sEDV~jF>F78wU75zFbWNN}fIX42=sWmElvO}Z zbC^ftUx?a-<$rxSILcEw7|OFO<=MbS%TqnTgNt139rEa@%*0;8&!ieWD2gPGxQX*@ zpmTU*^!)c;aaQge@k}H#TqW=>oTRP3S%-FLkM2^n1!MmagSA^`fx)_HtT5Poj=|PT z8B`v`INn`laFpbSJb9i#Re`ArMW|}H==Ie_g9Y(G_X~`wIxLzost_oJ;!!O$YiQbN z*1_~0)xrJ-nl2ioacX+lLtJ;Et>7KO(BeT6*<^VGI*<%xLO3<-+7VQc37gB^3Y;C3 zZV_jrzH5Uho7!+?LR6Pp3h*`x+rv=Gx(4NhxOfj-ji(Y;qv{U)E~rNlW3%z#8v_OI z5>m|2OR^Hlcr(hgOhyLM%;dh7>Qt&eE4@O+nX&u!nZ>89%Iq{&dA0&iS)J|h0i1Lj z(W~G^n6&s{G|0S-=st9&2pM{ZTmVXfUOVShupXIA<8-e*;Y{c}R#RDt+dUX>B~Z?? z=nQlHhxb0d_x|w0Pj&pK1IdiX0`->R9q6l9z?79?u2OEM2qW?H+o8OI>TJK&+jXF9 zjKZPH({KvTM=)FC65_OI7jjP_<%_H0*^8@A#c&LjQ?PRand88BWKsL97`%fejW1PY zTb2O&g<$)1s?b|mSVg=uuW&NuaS|3>X&Dx?3K<@%oQsHS^AN()NCRQ&O|bu4y!Ay$ zUoVB^|GSWayK@wv&Px>*C(vdXOsmH~K=$1i_KaQ%@8hMryaoOKdQh8IbNG7T2m3^w z*pG`9Wzc+pU+hOV*(}2)gS^5zV>MZN@>D|hVGdb!S;~};F7Cdh(c98c`vm>~oFwu- cWB}3IU~05QYfihn-RRb9m3F0FZ+F_>--R*+<^TWy diff --git a/Application/sockets/sockets.py b/Application/sockets/sockets.py deleted file mode 100644 index 0832fbc..0000000 --- a/Application/sockets/sockets.py +++ /dev/null @@ -1,89 +0,0 @@ - - -import socketio -from loguru import logger -import time - - -sio = socketio.AsyncServer(async_mode='sanic', cors_allowed_origins=[]) - -#sio = socketio.AsyncServer(async_mode='sanic', ping_timeout=30, logger=False, cors_allowed_origins=[]) - -# async def background_task(): -# """Example of how to send server generated events to clients.""" -# count = 0 -# while True: -# await sio.sleep(10) -# count += 10 -# await sio.emit('takeout_response', {'data': f'Progress of the app is {count}'}, namespace='/takeout') - - - - - -##this will only be activate if you emit a message with namespoace takeout -##from the client side -@sio.on("initiate_takeout", namespace='/takeout') -async def handle_initiate_takeout(sid, message): - logger.info(f"Data received is {message}") - for i in range(0, 11): - logger.info(f"Progress of the takeout namespace is {i*10}") - await sio.emit('takeout_response', {'data': f"Progress of the takeout namespace is {i*10}"}, namespace="/takeout") - time.sleep(2) - - - -@sio.on("initiate_takeout") -async def handle_initiate_takeout(sid, message): - logger.info(f"Data received is {message}") - for i in range(0, 11): - logger.info(f"Progress of the global namespace is {i*10}") - await sio.emit('takeout_response', {'data': f"Progress of the / takeout is {i*10}"}, namespace="/takeout") - time.sleep(2) - - -async def send_ping(): - global start_timer - start_timer = time.time() - await sio.emit('ping', None) - - -@sio.event -async def connect(sid, environ): - print('connected to server') - await send_ping() - - -@sio.event -async def pong_from_server(data): - global start_timer - latency = time.time() - start_timer - print('latency is {0:.2f} ms'.format(latency * 1000)) - await sio.sleep(1) - await send_ping() - - -@sio.event -async def takeout_email_parse_progress_broadcast(message): - await sio.emit("takeout_response", {'data': message }, namespace="/takeout") - - # #broadcasts = [ws.send(message) for ws in app.ws_clients] - # #for result in asyncio.as_completed(broadcasts): - # try: - # await asyncio.wait(broadcast) - # logger.info(f"completed {message}") - - # except Exception as ex: - # template = f"An exception of type {ex} occurred" - # logger.error(template) - # return - - -@sio.event -async def broadcast(message): - await sio.emit("takeout_response", {'data': message }, namespace="/takeout") - - -@sio.event -async def takeout_reser_purc_parse_progress_broadcast(message): - await sio.emit("takeout_reser_pur_progress", {'data': message }, namespace="/takeout") \ No newline at end of file diff --git a/Application/users_module/__pycache__/__init__.cpython-37.pyc b/Application/users_module/__pycache__/__init__.cpython-37.pyc index 7cbf1c9d123331100aff623d442b5b941f3393fe..cee3f5171a450964bbbedbe8de767d07af684a60 100644 GIT binary patch delta 36 qcmX@Zc$$&hiIt`n>=44JR4F>>}unDdJ delta 37 rcmX@jc!rVNiIaT~eAS$VznLyJ?3iuJP-6LT^*7qAK%Gv3Zhev=H({lZFXRaVgdlOJqjcM diff --git a/Application/utils/__pycache__/utils.cpython-37.pyc b/Application/utils/__pycache__/utils.cpython-37.pyc index 559d6e39d6df3bf1c7cf5c29aea5ccba55bd7060..da859850eccc8997f9791b3f6689f8b853463138 100644 GIT binary patch delta 39 tcmexi^4)~niI