KL-Py 0.3.8__tar.gz → 0.4.0__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.
Files changed (270) hide show
  1. {kl_py-0.3.8 → kl_py-0.4.0}/PKG-INFO +1 -1
  2. {kl_py-0.3.8 → kl_py-0.4.0}/pyproject.toml +1 -1
  3. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/KL_Py.py +230 -74
  4. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/_custom_pandas.py +142 -9
  5. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/_custom_sqlite.py +196 -18
  6. kl_py-0.4.0/src/KL_Py/_filepaths.py +61 -0
  7. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/_translate.py +34 -26
  8. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py.egg-info/PKG-INFO +1 -1
  9. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py.egg-info/SOURCES.txt +1 -0
  10. {kl_py-0.3.8 → kl_py-0.4.0}/LICENSE +0 -0
  11. {kl_py-0.3.8 → kl_py-0.4.0}/README.md +0 -0
  12. {kl_py-0.3.8 → kl_py-0.4.0}/setup.cfg +0 -0
  13. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/__init__.py +0 -0
  14. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/_utils.py +0 -0
  15. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/__init__.py +0 -0
  16. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/base.py +0 -0
  17. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/button.py +0 -0
  18. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/calendar.py +0 -0
  19. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/canvas.py +0 -0
  20. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/checkbox.py +0 -0
  21. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/column.py +0 -0
  22. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/combo.py +0 -0
  23. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/error.py +0 -0
  24. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/frame.py +0 -0
  25. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/graph.py +0 -0
  26. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/helpers.py +0 -0
  27. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/image.py +0 -0
  28. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/input.py +0 -0
  29. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/list_box.py +0 -0
  30. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/menu.py +0 -0
  31. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/multiline.py +0 -0
  32. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/option_menu.py +0 -0
  33. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/pane.py +0 -0
  34. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/progress_bar.py +0 -0
  35. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/radio.py +0 -0
  36. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/separator.py +0 -0
  37. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/sizegrip.py +0 -0
  38. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/slider.py +0 -0
  39. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/spin.py +0 -0
  40. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/status_bar.py +0 -0
  41. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/stretch.py +0 -0
  42. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/tab.py +0 -0
  43. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/table.py +0 -0
  44. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/text.py +0 -0
  45. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/tree.py +0 -0
  46. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/themes.py +0 -0
  47. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/tray.py +0 -0
  48. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/window.py +0 -0
  49. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/__init__.py +0 -0
  50. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/_custom_turtle.py +0 -0
  51. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/_error_classes.py +0 -0
  52. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/_klang_builtins.py +0 -0
  53. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/_web_translate.py +0 -0
  54. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/automl.py +0 -0
  55. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/dnd/__init__.py +0 -0
  56. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/drag_and_drop/__init__.py +0 -0
  57. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/export/__init__.py +0 -0
  58. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/export/__main__.py +0 -0
  59. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/export/config.py +0 -0
  60. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/export/dialogs.py +0 -0
  61. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/export/packaging.py +0 -0
  62. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/export/shims.py +0 -0
  63. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/export/ui.py +0 -0
  64. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/export/utils.py +0 -0
  65. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/export/validation.py +0 -0
  66. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/fsgdnd/__init__.py +0 -0
  67. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/fsgui/__init__.py +0 -0
  68. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/__init__.py +0 -0
  69. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/_utils.py +0 -0
  70. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/base.py +0 -0
  71. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/button.py +0 -0
  72. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/calendar.py +0 -0
  73. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/canvas.py +0 -0
  74. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/center.py +0 -0
  75. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/checkbox.py +0 -0
  76. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/column.py +0 -0
  77. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/combo.py +0 -0
  78. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/error.py +0 -0
  79. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/frame.py +0 -0
  80. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/graph.py +0 -0
  81. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/helpers.py +0 -0
  82. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/image.py +0 -0
  83. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/input.py +0 -0
  84. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/list_box.py +0 -0
  85. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/menu.py +0 -0
  86. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/multiline.py +0 -0
  87. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/option_menu.py +0 -0
  88. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/pane.py +0 -0
  89. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/progress_bar.py +0 -0
  90. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/radio.py +0 -0
  91. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/separator.py +0 -0
  92. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/sizegrip.py +0 -0
  93. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/slider.py +0 -0
  94. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/spin.py +0 -0
  95. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/status_bar.py +0 -0
  96. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/stretch.py +0 -0
  97. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/tab.py +0 -0
  98. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/table.py +0 -0
  99. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/text.py +0 -0
  100. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/tree.py +0 -0
  101. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/replace.py +0 -0
  102. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/tray.py +0 -0
  103. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/hindGui/window.py +0 -0
  104. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/k2exe/__init__.py +0 -0
  105. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/k2exe/__main__.py +0 -0
  106. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/k2exe/config.py +0 -0
  107. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/k2exe/dialogs.py +0 -0
  108. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/k2exe/packaging.py +0 -0
  109. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/k2exe/shims.py +0 -0
  110. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/k2exe/ui.py +0 -0
  111. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/k2exe/utils.py +0 -0
  112. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/k2exe/validation.py +0 -0
  113. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/kexe/__init__.py +0 -0
  114. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/kexe/__main__.py +0 -0
  115. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/kexe/config.py +0 -0
  116. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/kexe/dialogs.py +0 -0
  117. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/kexe/packaging.py +0 -0
  118. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/kexe/shims.py +0 -0
  119. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/kexe/ui.py +0 -0
  120. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/kexe/utils.py +0 -0
  121. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/kexe/validation.py +0 -0
  122. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/kl2exe/__init__.py +0 -0
  123. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/kl2exe/__main__.py +0 -0
  124. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/kl2exe/config.py +0 -0
  125. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/kl2exe/dialogs.py +0 -0
  126. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/kl2exe/packaging.py +0 -0
  127. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/kl2exe/shims.py +0 -0
  128. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/kl2exe/ui.py +0 -0
  129. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/kl2exe/utils.py +0 -0
  130. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/kl2exe/validation.py +0 -0
  131. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/klang2exe/__init__.py +0 -0
  132. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/klang2exe/__main__.py +0 -0
  133. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/klang2exe/config.py +0 -0
  134. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/klang2exe/dialogs.py +0 -0
  135. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/klang2exe/packaging.py +0 -0
  136. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/klang2exe/shims.py +0 -0
  137. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/klang2exe/ui.py +0 -0
  138. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/klang2exe/utils.py +0 -0
  139. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/klang2exe/validation.py +0 -0
  140. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/klangexe/__init__.py +0 -0
  141. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/klangexe/__main__.py +0 -0
  142. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/klangexe/config.py +0 -0
  143. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/klangexe/dialogs.py +0 -0
  144. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/klangexe/packaging.py +0 -0
  145. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/klangexe/shims.py +0 -0
  146. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/klangexe/ui.py +0 -0
  147. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/klangexe/utils.py +0 -0
  148. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/klangexe/validation.py +0 -0
  149. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/klexe/__init__.py +0 -0
  150. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/klexe/__main__.py +0 -0
  151. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/klexe/config.py +0 -0
  152. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/klexe/dialogs.py +0 -0
  153. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/klexe/packaging.py +0 -0
  154. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/klexe/shims.py +0 -0
  155. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/klexe/ui.py +0 -0
  156. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/klexe/utils.py +0 -0
  157. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/klexe/validation.py +0 -0
  158. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/ml.py +0 -0
  159. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/np/__init__.py +0 -0
  160. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/pd/__init__.py +0 -0
  161. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/plt/__init__.py +0 -0
  162. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/psgui/__init__.py +0 -0
  163. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/px/__init__.py +0 -0
  164. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/pyexe/__init__.py +0 -0
  165. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/pyexe/__main__.py +0 -0
  166. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/pyexe/config.py +0 -0
  167. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/pyexe/dialogs.py +0 -0
  168. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/pyexe/packaging.py +0 -0
  169. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/pyexe/shims.py +0 -0
  170. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/pyexe/ui.py +0 -0
  171. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/pyexe/utils.py +0 -0
  172. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/pyexe/validation.py +0 -0
  173. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/pysgdnd/__init__.py +0 -0
  174. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/__init__.py +0 -0
  175. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/__version__.py +0 -0
  176. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/_internal_utils.py +0 -0
  177. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/adapters.py +0 -0
  178. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/api.py +0 -0
  179. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/auth.py +0 -0
  180. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/certifi/__init__.py +0 -0
  181. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/certifi/__main__.py +0 -0
  182. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/certifi/core.py +0 -0
  183. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/certifi/py.typed +0 -0
  184. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/certs.py +0 -0
  185. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/charset_normalizer/__init__.py +0 -0
  186. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/charset_normalizer/__main__.py +0 -0
  187. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/charset_normalizer/api.py +0 -0
  188. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/charset_normalizer/cd.py +0 -0
  189. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/charset_normalizer/cli/__init__.py +0 -0
  190. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/charset_normalizer/cli/__main__.py +0 -0
  191. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/charset_normalizer/constant.py +0 -0
  192. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/charset_normalizer/legacy.py +0 -0
  193. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/charset_normalizer/md.py +0 -0
  194. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/charset_normalizer/models.py +0 -0
  195. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/charset_normalizer/py.typed +0 -0
  196. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/charset_normalizer/utils.py +0 -0
  197. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/charset_normalizer/version.py +0 -0
  198. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/compat.py +0 -0
  199. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/cookies.py +0 -0
  200. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/exceptions.py +0 -0
  201. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/help.py +0 -0
  202. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/hooks.py +0 -0
  203. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/idna/__init__.py +0 -0
  204. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/idna/codec.py +0 -0
  205. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/idna/compat.py +0 -0
  206. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/idna/core.py +0 -0
  207. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/idna/idnadata.py +0 -0
  208. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/idna/intranges.py +0 -0
  209. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/idna/package_data.py +0 -0
  210. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/idna/py.typed +0 -0
  211. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/idna/uts46data.py +0 -0
  212. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/models.py +0 -0
  213. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/packages.py +0 -0
  214. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/sessions.py +0 -0
  215. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/status_codes.py +0 -0
  216. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/structures.py +0 -0
  217. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/__init__.py +0 -0
  218. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/_base_connection.py +0 -0
  219. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/_collections.py +0 -0
  220. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/_request_methods.py +0 -0
  221. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/_version.py +0 -0
  222. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/connection.py +0 -0
  223. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/connectionpool.py +0 -0
  224. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/contrib/__init__.py +0 -0
  225. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/contrib/emscripten/__init__.py +0 -0
  226. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/contrib/emscripten/connection.py +0 -0
  227. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/contrib/emscripten/fetch.py +0 -0
  228. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/contrib/emscripten/request.py +0 -0
  229. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/contrib/emscripten/response.py +0 -0
  230. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/contrib/pyopenssl.py +0 -0
  231. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/contrib/socks.py +0 -0
  232. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/exceptions.py +0 -0
  233. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/fields.py +0 -0
  234. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/filepost.py +0 -0
  235. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/http2/__init__.py +0 -0
  236. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/http2/connection.py +0 -0
  237. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/http2/probe.py +0 -0
  238. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/poolmanager.py +0 -0
  239. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/py.typed +0 -0
  240. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/response.py +0 -0
  241. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/util/__init__.py +0 -0
  242. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/util/connection.py +0 -0
  243. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/util/proxy.py +0 -0
  244. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/util/request.py +0 -0
  245. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/util/response.py +0 -0
  246. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/util/retry.py +0 -0
  247. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/util/ssl_.py +0 -0
  248. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/util/ssl_match_hostname.py +0 -0
  249. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/util/ssltransport.py +0 -0
  250. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/util/timeout.py +0 -0
  251. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/util/url.py +0 -0
  252. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/util/util.py +0 -0
  253. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/util/wait.py +0 -0
  254. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/requests/utils.py +0 -0
  255. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/sb/__init__.py +0 -0
  256. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/sk/__init__.py +0 -0
  257. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/sns/__init__.py +0 -0
  258. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/toexe/__init__.py +0 -0
  259. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/toexe/__main__.py +0 -0
  260. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/toexe/config.py +0 -0
  261. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/toexe/dialogs.py +0 -0
  262. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/toexe/packaging.py +0 -0
  263. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/toexe/shims.py +0 -0
  264. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/toexe/ui.py +0 -0
  265. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/toexe/utils.py +0 -0
  266. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/toexe/validation.py +0 -0
  267. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py/when.py +0 -0
  268. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py.egg-info/dependency_links.txt +0 -0
  269. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py.egg-info/requires.txt +0 -0
  270. {kl_py-0.3.8 → kl_py-0.4.0}/src/KL_Py.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: KL_Py
3
- Version: 0.3.8
3
+ Version: 0.4.0
4
4
  Summary: A Python simplification module
5
5
  Author-email: Abbaskhurram255 <abbaskhurram255@gmail.com>
6
6
  Classifier: Programming Language :: Python :: 3
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
 
6
6
  [project]
7
7
  name = "KL_Py"
8
- version = "0.3.8"
8
+ version = "0.4.0"
9
9
  authors = [
10
10
  { name = "Abbaskhurram255", email = "abbaskhurram255@gmail.com" }
11
11
  ]
@@ -30,6 +30,15 @@ from inspect import *
30
30
  from KL_Py import requests
31
31
  from .hindGui import *
32
32
  from .when import *
33
+ home_path_obj: Path = Path.home()
34
+ USER_HOME =\
35
+ USER_HOME_DIR =\
36
+ str(home_path_obj)
37
+ DESKTOP_DIR =\
38
+ USER_DESKTOP_DIR =\
39
+ USER_DESKTOP =\
40
+ DESKTOP =\
41
+ str(home_path_obj / "Desktop")
33
42
  TypeDict = typedict = typeddict = TypedDict
34
43
  copy = deepcopy
35
44
  # for ease of access
@@ -56,7 +65,7 @@ ALPHA_RE = ALPHA_REGEX = r"[A-Za-z]+"
56
65
  LETTERS_WITH_SYMBOLS_RE = LETTERS_WITH_SYMBOLS_REGEX = r"[a-zA-Z (\(\)\{\}\[\]\&\:\;\-\'\"\?\!\,\.)]+"
57
66
  TRAILING_SPACE_RE = TRAILING_SPACE_REGEX = r"(^\s+|\s+$)"
58
67
  NUM_RE = NUM_REGEX = r"(\-?\d*\.?\d+)"
59
- NON_NUM_RE: str = r"[^\-\.\d]+"
68
+ NON_NUM_RE: str = r"[^Ee\+\-\.\d]|(?<=[A-Za-z_])[Ee]|[Ee\.](?![\d\+\-])|(?<![^\de\+\-\.])[\.\+\-](?=[^\de\+\-\.])"
60
69
  INT_RE = INTEGEGER_RE = INT_REGEX = INTEGEGER_REGEX = r"\-?\d+"
61
70
  WORD_RE = WORD_REGEX = r"[A-Za-z_\'][\w\']*(?:\-[A-Za-z_\']\w*(?: [A-Za-z_\'][\w\']*){0})*"
62
71
  NON_WORD_RE = NON_WORD_REGEX = r"[^A-Za-z_\-]|\-(?![A-Za-z_])"
@@ -993,6 +1002,37 @@ class Date:
993
1002
  }
994
1003
  )
995
1004
  return self
1005
+ def __call__(
1006
+ self,
1007
+ item=None,
1008
+ default = 0
1009
+ ) ->\
1010
+ Union[
1011
+ Any,
1012
+ datetime.datetime
1013
+ ]:
1014
+ if isinstance(
1015
+ item,
1016
+ str
1017
+ ):
1018
+ try:
1019
+ retrieved = self[
1020
+ item
1021
+ ]
1022
+ if not bool(
1023
+ retrieved
1024
+ ):
1025
+ return default
1026
+ return retrieved
1027
+ except (
1028
+ KeyError,
1029
+ AttributeError,
1030
+ NotImplemented
1031
+ ):
1032
+ return default
1033
+ return self\
1034
+ .to_datetime()
1035
+ get = __call__
996
1036
  def set_(
997
1037
  self,
998
1038
  h: int = 0,
@@ -1661,7 +1701,15 @@ class Date:
1661
1701
  def to_datetime(self) -> datetime.datetime:
1662
1702
  return self\
1663
1703
  .date_object
1664
- get_object = to_datetime
1704
+ get_object =\
1705
+ todt =\
1706
+ to_dt =\
1707
+ todatetime =\
1708
+ to_datetime
1709
+ @property
1710
+ def dt(self) -> datetime.datetime:
1711
+ return self\
1712
+ .to_datetime()
1665
1713
  def format(
1666
1714
  self,
1667
1715
  short: bool = False,
@@ -1691,7 +1739,7 @@ class Date:
1691
1739
  return formatted_date\
1692
1740
  .lstrip("0")\
1693
1741
  .replace(" 0", " ")
1694
- get = get_long = long_get = get_full =\
1742
+ get_long = long_get = get_full =\
1695
1743
  full_get = read = parh =\
1696
1744
  parho = full_read =\
1697
1745
  read_full = long_read =\
@@ -1903,12 +1951,14 @@ class Date:
1903
1951
  .date_object\
1904
1952
  .day
1905
1953
  d_nr =\
1954
+ d_n =\
1906
1955
  d_num =\
1907
1956
  d_number =\
1908
1957
  d_only =\
1909
1958
  day_nr = day_num =\
1910
1959
  din_nr = din_num =\
1911
1960
  din_number =\
1961
+ din_n =\
1912
1962
  day_of_month =\
1913
1963
  dom = day_number
1914
1964
  get_d_nr =\
@@ -2558,6 +2608,13 @@ class Date:
2558
2608
  increment_hour =\
2559
2609
  dalo_h =\
2560
2610
  daalo_h =\
2611
+ dalo_ghanta =\
2612
+ dalo_ghante =\
2613
+ daalo_ghanta =\
2614
+ daalo_ghante =\
2615
+ dalo_hr = daalo_hr =\
2616
+ dalo_hour = daalo_hour =\
2617
+ dalo_hours = daalo_hours =\
2561
2618
  add_h =\
2562
2619
  add_hour
2563
2620
  def remove_hour(
@@ -2579,6 +2636,10 @@ class Date:
2579
2636
  decrement_hours = decrement_hour =\
2580
2637
  subtract_hours = subtract_hour =\
2581
2638
  nikalo_h = nikaalo_h =\
2639
+ nikalo_ghanta =\
2640
+ nikalo_ghante =\
2641
+ nikaalo_ghanta =\
2642
+ nikaalo_ghante =\
2582
2643
  nikalo_hr = nikaalo_hr =\
2583
2644
  nikalo_hour = nikaalo_hour =\
2584
2645
  nikalo_hours = nikaalo_hours =\
@@ -2992,13 +3053,13 @@ class Date:
2992
3053
  set_sec =\
2993
3054
  set_second =\
2994
3055
  set_seconds
2995
- Tarikh = Tareekh = Date
3056
+ Tarikh = Tareekh = Dt = Date
2996
3057
  class Char(str):
2997
3058
  def __new__(cls, value: Any):
2998
3059
  if value is None:
2999
3060
  return ""
3000
3061
  character: str = ""
3001
- if isinstance(value, int|float):
3062
+ if isinstance(value, (int, float)):
3002
3063
  character = chr(
3003
3064
  int(
3004
3065
  value
@@ -3018,8 +3079,8 @@ char = Char
3018
3079
  Str = lafz = jumla = lambda x: str(x).strip() # trim the string after parsing
3019
3080
  # no one needs additional whitespace
3020
3081
  nr = num = Num = Nr = Number
3021
- INFINITY = Infinity = infinity = Inf = inf
3022
- INT_INFINITY = INTEGER_INFINITY = INTINFINITY = INTEGERINFINITY = IntInfinity = Int_Infinity = int_infinity = intinfinity = int_inf = IntInf = intinf = sys.maxsize
3082
+ INFINITY = Infinity = infinity = Inf = FLOAT_INFINITY = float_infinity = FLOAT_INF = float_inf = FLT_INF = flt_inf = inf
3083
+ INT_INFINITY = INTEGER_INFINITY = INTINFINITY = INTEGERINFINITY = IntInfinity = Int_Infinity = int_infinity = intinfinity = int_inf = IntInf = INT_INF = INTINF = intinf = sys.maxsize
3023
3084
  goto = open_link = link_kholo = kholo_link = webbrowser.open
3024
3085
  link = webbrowser
3025
3086
  _dir = os.getcwd()
@@ -3058,7 +3119,7 @@ class AbstractBaseClassMeta(ABCMeta):
3058
3119
  if base_method_type == subclass_method_type:
3059
3120
  continue
3060
3121
  raise TypeError(
3061
- f"Concrete class '{name}' ke method '{method_name}' ka kism BASE CLASS '{base.__name__}' ke sath match nahi karta"
3122
+ f"Concrete class '{name}' ke method '{method_name}' ka kism BASE CLASS '{base.__name__}' ke sath match karna chahie"
3062
3123
  )
3063
3124
  return cls
3064
3125
  # preserve the sequence
@@ -3132,11 +3193,27 @@ def ltype(o: object, max_depth: int = 6, _current_depth: int = 0) -> str:
3132
3193
  return "..."
3133
3194
  parsed_type = __ltype_helper_fn__(o)
3134
3195
  if (not isinstance(o, Iterable) or
3135
- isinstance(o, (str, bytes, bytearray, memoryview, Generator, Iterator, zip, map, builtins.filter, enumerate))):
3196
+ isinstance(
3197
+ o,
3198
+ (
3199
+ str,
3200
+ bytes,
3201
+ bytearray,
3202
+ memoryview,
3203
+ Generator,
3204
+ Iterator,
3205
+ zip,
3206
+ map,
3207
+ builtins.filter,
3208
+ enumerate
3209
+ )
3210
+ )
3211
+ ):
3136
3212
  return parsed_type
3137
3213
  try:
3138
- if callable(getattr(o, "__len__", None)) and not len(o):
3139
- return parsed_type
3214
+ if callable(getattr(o, "__len__", None))\
3215
+ and not len(o):
3216
+ return parsed_type
3140
3217
  except Exception:
3141
3218
  pass
3142
3219
  if isinstance(o, Mapping):
@@ -3148,7 +3225,13 @@ def ltype(o: object, max_depth: int = 6, _current_depth: int = 0) -> str:
3148
3225
  return parsed_type
3149
3226
  filtered_items = [
3150
3227
  (k, v) for k, v in items_snapshot
3151
- if not (isinstance(k, str) and re.search(r"^\b(?:k[aeio]|mese)\b$", k))
3228
+ if not (
3229
+ isinstance(k, str)\
3230
+ and re.search(
3231
+ r"^\b(?:k[aeio]|mese)\b$",
3232
+ k
3233
+ )
3234
+ )
3152
3235
  ]
3153
3236
  if not filtered_items:
3154
3237
  return parsed_type
@@ -4005,57 +4088,99 @@ def kill_process(process_name: str) -> bool:
4005
4088
  killed = False
4006
4089
  return killed
4007
4090
  kill_application = kill_app = kill_process
4008
- def Int(x: str|int|float, base: int = 10) -> int:
4009
- try:
4010
- if x is None or\
4011
- not isinstance(
4012
- x,
4013
- (str, int, float, bool)
4091
+ def Int(
4092
+ x: Union[
4093
+ str,
4094
+ int,
4095
+ float,
4096
+ bool
4097
+ ],
4098
+ base: int = 10
4099
+ ) -> int:
4100
+ try:
4101
+ if type(x) not in (
4102
+ str,
4103
+ int,
4104
+ float,
4105
+ bool
4014
4106
  ):
4015
- return 0
4016
- if isinstance(x, bool):
4017
- return 1\
4018
- if x else 0
4019
- if not base or\
4020
- not isinstance(base, int)\
4021
- or base <= 0\
4022
- or base >= Infinity:
4023
- base = 10
4024
- x = str(x).strip()
4025
- x = replace(
4026
- x,
4027
- r"[^\-\.\d]",
4028
- ""
4029
- )
4030
- # NOTE: keep the dot(.), it's needed for now. keep. the. dot.
4031
- # ^ allow the dot(.) to pass through, for now, so that 23.5 does NOT become 253
4032
- if "." in x\
4033
- and len(x) >= 2:
4034
- # and later, remove it gracefully
4035
- x = x.split(".")[0]
4036
- return int(x, base)
4037
- except (ValueError, TypeError):
4038
- return 0
4039
- def Flt(x: str|int|float) -> float:
4040
- try:
4041
- if x is None or\
4042
- not isinstance(
4107
+ return 0
4108
+ if isinstance(x, bool):
4109
+ return 1\
4110
+ if x else 0
4111
+ if not base or\
4112
+ not isinstance(
4113
+ base,
4114
+ int
4115
+ )\
4116
+ or base <= 0\
4117
+ or base >= Infinity:
4118
+ base = 10
4119
+ x = str(x)\
4120
+ .lower()\
4121
+ .strip()
4122
+ x = replace(
4043
4123
  x,
4044
- (str, int, float, bool)
4045
- ):
4046
- return 0.0
4047
- if isinstance(x, bool):
4048
- return 1.0\
4049
- if x else 0.0
4050
- if isinstance(x, str):
4051
- x = replacei(
4052
- x.strip(),
4053
- r"[^Ee\+\-\.\d]|(?<=[A-Za-z_])[Ee]|[Ee](?=[A-Za-z_])",
4124
+ r"[^Ee\+\-\.\d]|(?<=[A-Za-z_])[Ee]|[Ee\.](?![\d\+\-])|(?<![^\de\+\-\.])[\.\+\-](?=[^\de\+\-\.])",
4054
4125
  ""
4055
4126
  )
4056
- return float(x)
4057
- except (ValueError, TypeError):
4058
- return 0.0
4127
+ if "e" in x:
4128
+ try:
4129
+ x = str(
4130
+ eval(
4131
+ x
4132
+ )
4133
+ )
4134
+ except Exception:
4135
+ pass
4136
+ # NOTE: keep the dot(.), it's needed for now. keep. the. dot.
4137
+ # ^ allow the dot(.) to pass through, for now, so that 23.5 does NOT become 253
4138
+ if "." in x\
4139
+ and len(x) >= 2:
4140
+ # and later, remove it gracefully
4141
+ x = x.split(".")[0]
4142
+ return int(
4143
+ x,
4144
+ base
4145
+ )
4146
+ except (
4147
+ ValueError,
4148
+ TypeError
4149
+ ) as e:
4150
+ return 0
4151
+ def Flt(
4152
+ x: Union[
4153
+ str,
4154
+ int,
4155
+ float,
4156
+ bool
4157
+ ]
4158
+ ) -> float:
4159
+ try:
4160
+ if type(x) not in (
4161
+ str,
4162
+ int,
4163
+ float,
4164
+ bool
4165
+ ):
4166
+ return 0.0
4167
+ if isinstance(x, bool):
4168
+ return 1.0\
4169
+ if x else 0.0
4170
+ if isinstance(x, str):
4171
+ x = replacei(
4172
+ x.strip(),
4173
+ r"[^Ee\+\-\.\d]|(?<=[A-Za-z_])[Ee]|[Ee\.](?![\d\+\-])|(?<![^\de\+\-\.])[\.\+\-](?=[^\de\+\-\.])",
4174
+ ""
4175
+ )
4176
+ return float(
4177
+ x
4178
+ )
4179
+ except (
4180
+ ValueError,
4181
+ TypeError
4182
+ ) as e:
4183
+ return 0.0
4059
4184
  def is_pos(n: int|float) -> bool:
4060
4185
  """agar number ek positive number he to kehta he `Han`,
4061
4186
  warna `Nahi`"""
@@ -4326,7 +4451,10 @@ def numbered(x: str|list|tuple|dict, *args, **kwargs) -> list[list[Any], list[in
4326
4451
  # allowing the following syntax:
4327
4452
  # for item, i in numbered(arr):
4328
4453
  # print("{i}. {item}")
4329
- enumer = numbered
4454
+ enumer = with_index =\
4455
+ sath_index = with_numbers =\
4456
+ sath_numbers =\
4457
+ numbered
4330
4458
  __old_list__ = builtins.list
4331
4459
  class Arr(__old_list__):
4332
4460
  current_type = Any
@@ -5820,24 +5948,33 @@ def split_into_words(s: str) -> list[str]:
5820
5948
  if not isinstance(s, str) or not s.strip(): return ""
5821
5949
  return re.findall(WORD_RE, s)
5822
5950
  find_words = findwords = to_words = towords = to_word_list = towordlist = pakro_words = pakrowords = pakro_alfaaz = pakroalfaaz = split_into_words
5823
- def json_load(filename: str) -> dict | list:
5824
- if not isinstance(filename, str) or not filename.strip():
5825
- return {}
5826
- filename = os.path.normpath(filename)
5951
+ def json_load(filename: str) -> Obj | list:
5952
+ if not isinstance(filename, str)\
5953
+ or not filename.strip():
5954
+ return Obj()
5955
+ filename = os.path.normpath(
5956
+ filename
5957
+ )
5827
5958
  if "." not in filename:
5828
5959
  filename += ".json"
5829
5960
  if not os.path.exists(filename):
5830
- return {}
5831
- contents: Any = {}
5961
+ return Obj()
5962
+ contents: Any = Obj()
5832
5963
  try:
5833
- with open(filename, mode="r") as file:
5834
- contents = json.load(file)
5964
+ with open(
5965
+ filename,
5966
+ mode="r"
5967
+ ) as file:
5968
+ contents = json.load(
5969
+ file
5970
+ )
5835
5971
  except Exception as e:
5836
5972
  print(e)
5837
5973
  # the loaded contents can be a list, too
5838
5974
  # not always a dictionary
5839
- if isinstance(contents, dict) and "Obj" in globals():
5840
- contents = Obj(contents)
5975
+ if isinstance(contents, dict)\
5976
+ and "Obj" in globals():
5977
+ contents = Obj(contents)
5841
5978
  return contents
5842
5979
  load_json = loadjson = jsonload = json_load
5843
5980
  def replace(src: str, to_replace: str|dict|None = None, replacement: str|Callable = "", ignore_case: bool = False, case_insensitive: bool = False, count: int = IntInfinity) -> str:
@@ -6464,7 +6601,7 @@ def asset(to_filename: str) -> str:
6464
6601
  path: str = ""
6465
6602
  try:
6466
6603
  if either(hasattr(sys, '_MEIPASS'), getattr(sys, 'frozen', False)) and both("_filepaths" in globals(), "PROGRAMS_DIR" in dir(globals().get("_filepaths", {}))):
6467
- from _filepaths import PROGRAMS_DIR
6604
+ from ._filepaths import PROGRAMS_DIR
6468
6605
  path = os.path.join(PROGRAMS_DIR, to_filename)
6469
6606
  else:
6470
6607
  path = to_path(f"../{to_filename}")
@@ -6721,7 +6858,7 @@ if __name__ == "__main__":
6721
6858
  print(belongs_to(IOError | OSError, Exception))
6722
6859
  print(chuno(rng(1, 10), koi=2))
6723
6860
  my_dict: dict[str, dict[str, str] | int] = {"name": {"first": "Mike", "last": "Dawson"}, "age": 22000}
6724
- from _klang_builtins import cust_print
6861
+ from ._klang_builtins import cust_print
6725
6862
  cust_print(my_dict)
6726
6863
  print(deep_get(my_dict, "first"))
6727
6864
  dt: Date = Date("2.44 am, Jan 24, 2002")
@@ -6750,7 +6887,7 @@ if __name__ == "__main__":
6750
6887
  print(is_pin("1535"))
6751
6888
  print(is_pin("153"))
6752
6889
  print(ishex("#68fafe"))
6753
- countries: dict = load_json(r"json/countries.json")
6890
+ countries: dict = load_json(r"json/country_namES")
6754
6891
  print(countries)
6755
6892
  arr = (1, 3.8, 7)
6756
6893
  arr = _map(arr, str, lambda x: type(x) != float)
@@ -6813,4 +6950,23 @@ if __name__ == "__main__":
6813
6950
  print("11.52 aM, jan 24 n!!2002")
6814
6951
  print(encodeurl(decode(encode("hello world"))))
6815
6952
  print(Date("3pm, Jan 24, 2002").view())
6816
- print(Date().set_time(" 7 :.. 11 .:. 9 pm ").set_mn(mn=2).set_d(d=14).set_yr(y=2003).change(month=6, year=2010)._str(s=True))
6953
+ print(Date().time(" 7 :.. 11 .:. 9 pm ").set_m(66).set_mn(mn=13).set_d(d=14).set_yr(y=2003).change(year=2010).y(2028).mn(3).d(21).mn("SEptember ").remove_h(12).remove_min(60).h(11).m(13).s(12).p("pm").t(8, "am").nikalo_mn(1).nikalo_min(1).nikalo_s(2).rakho_time("5.11 am").ghante(3).zamana("pm").mahina(6).d(11).set_y(2023).din(21).parho())
6954
+ print(Date("Jan 24, 2032") >= Date())
6955
+ print(Date().set_time("11 pm").add_h(1))
6956
+ print(Date().tomorrow())
6957
+ print(Date().after_tomorrow())
6958
+ print(Date.yesterday().yesterday())
6959
+ print(Date().add_h(48, "pm"))
6960
+ print(Date().remove_day().set_time("3pm"))
6961
+ print(Date().time(" 7 :.. 11 .:. 9 pm ").dalo_ghante(50).remove_h(1).dalo_din(3).am().pm().am().pm().he_am(not False).add_m(3).add_wk(2)._str())
6962
+ print(Date() + Date("1.30 pm, Jan 24 2002"))
6963
+ dt = Date("Jan 4, 2026") & {"mn": 2} & {"y": 2020} & 3.50
6964
+ dt &= (12, 11, 13, "pm")
6965
+ dt["mn_num"] -= 1
6966
+ print(dt["mn_num"])
6967
+ print(dt)
6968
+ print(Date(13)())
6969
+ print(Flt(True))
6970
+ print(Flt("hello worl200.4e-2d"))
6971
+ print(Flt(" 4.3e5 t hee e "))
6972
+ print(countries)
@@ -4,6 +4,126 @@ from ._translate import translate_for_jupyter
4
4
  from inspect import ismodule
5
5
  from collections import Counter
6
6
 
7
+ def deep_cleaned(
8
+ data_input,
9
+ missing_threshold=0.9,
10
+ rows: bool = True,
11
+ index: bool = True,
12
+ ):
13
+ if data_input is None:
14
+ raise ValueError("Input data cannot be None.")
15
+ chaos_nulls = {
16
+ '', 'na', 'n/a', 'naa', 'null', 'nul', 'nll', 'nl', 'nil', 'none', 'non',
17
+ '?', '-', 'nan', 'nat', 'undefined', 'inf', '-inf', 'tbd', 'tbh', 'tba',
18
+ 'unknown', 'unkown', 'missing', 'msng', 'n.a.', 'n / a', 'none.',
19
+ 'na/na', 'nullvalue', 'blank', 'empty', 'nil.', 'null value',
20
+ 'no value', '<empty>', '<blank>'
21
+ }
22
+ try:
23
+ if isinstance(data_input, (str, os.PathLike)) or hasattr(data_input, 'read'):
24
+ df = pd.read_csv(
25
+ data_input,
26
+ encoding='utf-8',
27
+ encoding_errors='ignore',
28
+ low_memory=False
29
+ )
30
+ else:
31
+ df = data_input.copy()
32
+ except Exception as e:
33
+ raise RuntimeError(
34
+ f"Failed to ingest dataset: {e}"
35
+ )
36
+ if df.empty:
37
+ return df
38
+ if df.columns.duplicated().any():
39
+ cols = pd.Series(df.columns)
40
+ for dup in cols[cols.duplicated()].unique():
41
+ cols[cols[cols == dup].index.values.tolist()] = [f"{dup}_{i}" if i != 0 else dup for i in range(sum(cols == dup))]
42
+ df.columns = cols
43
+ for col in df.select_dtypes(include=['str']).columns:
44
+ try:
45
+ df[col] = (
46
+ df[col].astype(str)
47
+ .str.replace(r'(\d+)\.(\.+)(\d+)', r'\1.\3', regex=True)
48
+ .str.replace(r'[\x00-\x1F\x7F-\x9F]', '', regex=True)
49
+ )
50
+ except Exception:
51
+ continue
52
+ df.columns = (
53
+ df.columns.astype(str)
54
+ .str.strip()
55
+ .str.lower()
56
+ .str.encode('ascii', 'ignore')
57
+ .str.decode('ascii')
58
+ .str.replace(r'[^a-z0-9_]', '_', regex=True)
59
+ .str.replace(r'_+', '_', regex=True)
60
+ .str.strip('_')
61
+ )
62
+ df = df.loc[:, ~df.columns.str.lower().str.startswith("unnamed")]
63
+ df = df.replace([np.inf, -np.inf], np.nan)
64
+ for col in df.select_dtypes(include=['str']).columns:
65
+ try:
66
+ cleaned_str = df[col].astype(str).str.strip().str.lower()
67
+ is_null = cleaned_str.isin(chaos_nulls) | cleaned_str.isin(['nan', 'none', 'nat', 'inf', '-inf'])
68
+ df.loc[is_null, col] = np.nan
69
+ df[col] = df[col].astype(str).str.strip().str.replace(r'\s+', ' ', regex=True)
70
+ df.loc[df[col].isin(['nan', 'None', 'NAT']), col] = np.nan
71
+ except Exception:
72
+ continue
73
+ binary_map = {'yes': 1, 'y': 1, 'true': 1, 't': 1, 'no': 0, 'n': 0, 'false': 0, 'f': 0}
74
+ for col in df.select_dtypes(include=['str']).columns:
75
+ try:
76
+ non_nulls = df[col].dropna()
77
+ if len(non_nulls) > 0:
78
+ unique_vals = non_nulls.astype(str).str.lower().unique()
79
+ if len(unique_vals) > 0 and set(unique_vals).issubset(binary_map.keys()):
80
+ df[col] = df[col].astype(str).str.lower().map(binary_map)
81
+ except Exception:
82
+ continue
83
+ for col in df.columns:
84
+ if df[col].dtype == 'str':
85
+ try:
86
+ cleaned_series = (
87
+ df[col].astype(str)
88
+ .str.replace(r'[\$,%\s]', '', regex=True)
89
+ .str.replace(r'^\((.*)\)$', r'-\1', regex=True)
90
+ .str.replace(r'--+', '-', regex=True)
91
+ )
92
+ numeric_converted = pd.to_numeric(cleaned_series, errors='coerce')
93
+ if numeric_converted.notnull().sum() / max(df[col].notnull().sum(), 1) > 0.5:
94
+ df[col] = numeric_converted
95
+ except Exception:
96
+ continue
97
+ for col in df.select_dtypes(include=['str']).columns:
98
+ try:
99
+ sample = df[col].dropna().head(30)
100
+ if len(sample) > 3:
101
+ parsed_dates = pd.to_datetime(sample, errors='coerce')
102
+ if parsed_dates.notnull().sum() / len(sample) > 0.6:
103
+ df[col] = pd.to_datetime(df[col], errors='coerce')
104
+ except Exception:
105
+ continue
106
+ df = df.dropna(how='all', axis=0).dropna(how='all', axis=1)
107
+ if not df.empty and len(df.columns) > 0:
108
+ col_thresh = int((1 - missing_threshold) * len(df))
109
+ df = df.dropna(axis=1, thresh=col_thresh)
110
+ if not df.empty and len(df) > 0:
111
+ row_thresh = int((1 - missing_threshold) * len(df.columns))
112
+ df = df.dropna(axis=0, thresh=row_thresh)
113
+ if not df.empty:
114
+ cols_to_drop = []
115
+ for col in df.columns:
116
+ if df[col].dtype == 'str':
117
+ norm_series = df[col].astype(str).str.strip().str.lower()
118
+ if norm_series.nunique(dropna=False) <= 1:
119
+ cols_to_drop.append(col)
120
+ else:
121
+ if df[col].nunique(dropna=False) <= 1:
122
+ cols_to_drop.append(col)
123
+ df = df.drop(columns=cols_to_drop)
124
+ df = df.drop_duplicates()
125
+ return df
126
+
7
127
  def _safe_casefold(key: Any) -> Any:
8
128
  if isinstance(key, str):
9
129
  return key.strip().casefold()
@@ -74,7 +194,9 @@ try:
74
194
  except AttributeError:
75
195
  if cf_name in self.__dict__:
76
196
  return self.__dict__[cf_name]
77
- raise AttributeError(f"CustomSeries object has no attribute '{name}'")
197
+ raise AttributeError(
198
+ f"CustomSeries object has no attribute '{name}'"
199
+ )
78
200
  def __setattr__(self, name: str, value: Any) -> None:
79
201
  if name.startswith('_') or name in ('index', 'name', 'values'):
80
202
  super().__setattr__(name, value)
@@ -413,7 +535,7 @@ try:
413
535
  return self[
414
536
  *items
415
537
  ]
416
- self.quick_clean(
538
+ self.clean(
417
539
  inplace=True,
418
540
  **kwargs
419
541
  )
@@ -442,13 +564,18 @@ try:
442
564
  return self if in_place else result
443
565
  drop = giraao = girao
444
566
  bharona = bharo_na = bharonull = bharo_null = pd.DataFrame.fillna
445
- def quick_clean(
567
+ def clean(
446
568
  self,
569
+ deep: bool = True,
447
570
  rows: bool = True,
448
571
  index: bool = True,
449
572
  inplace: bool = True
450
573
  ) -> pd.DataFrame:
451
574
  df_copy: pd.DataFrame = self.copy()
575
+ if deep:
576
+ df_copy = deep_cleaned(
577
+ df_copy
578
+ )
452
579
  minimal_column_cleaner = lambda c:\
453
580
  re.sub(
454
581
  r"\W",
@@ -490,10 +617,16 @@ try:
490
617
  df_copy
491
618
  )
492
619
  return df_copy
493
- pd.DataFrame.quick_clean =\
494
- pd.DataFrame.qc =\
620
+ pd.DataFrame.clean =\
621
+ clean
622
+ quick_clean =\
495
623
  qc =\
496
- quick_clean
624
+ pd.DataFrame.quick_clean =\
625
+ pd.DataFrame.qc =\
626
+ partialmethod(
627
+ clean,
628
+ deep=False
629
+ )
497
630
  @classmethod
498
631
  def rcsv(cls, filepath_or_buffer, *args, **kwargs):
499
632
  if isinstance(
@@ -551,7 +684,7 @@ try:
551
684
  pd.DataFrame(
552
685
  self
553
686
  ),
554
- dtype=kwargs.get(
687
+ dtype=kwargs.pop(
555
688
  "dtype",
556
689
  int
557
690
  ),
@@ -1026,10 +1159,10 @@ print(tips["tip.darmyan(1..3)"])
1026
1159
  print(tips["tip.darmyan(1..3)"] == tips["tip darmyan 1..3"])
1027
1160
  print(len(tips["tip.darmyan(1..3)"]) == len(tips["tip darmyan 1..3"]))
1028
1161
  print(tips["tip darmyan [1, 3, 5]"])
1029
- new_df = pd.DF({"####@$ . Tenant ID": [f"@D00{n}" for n in range(1, 3+1)]}, index=[f"$$$$ ....Apartment {n}" for n in range(1, 3+1)])
1162
+ new_df = pd.DF({"test92)___": ["-5000", "-5.5", "+20.52"], "####@$ . Tenant ID (USD)": [f"$@D00{n}" for n in range(1, 3+1)]}, index=[f"$$$$ ....Apartment {n}" for n in range(1, 3+1)])
1030
1163
  new_df_clean = new_df()
1031
1164
  tips.ohe(col="sex", inplace=True)
1032
1165
  print(tips.remove_ohe(cols="day|smoker|sex|time", inplace=True).columns.tolist())
1033
1166
  print(tips.head(3))
1034
-
1167
+ print(new_df.clean())
1035
1168
  """