KL-Py 0.3.9__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.
- {kl_py-0.3.9 → kl_py-0.4.0}/PKG-INFO +1 -1
- {kl_py-0.3.9 → kl_py-0.4.0}/pyproject.toml +1 -1
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/KL_Py.py +145 -31
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/_custom_pandas.py +142 -9
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/_custom_sqlite.py +196 -18
- kl_py-0.4.0/src/KL_Py/_filepaths.py +61 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/_translate.py +34 -26
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py.egg-info/PKG-INFO +1 -1
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py.egg-info/SOURCES.txt +1 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/LICENSE +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/README.md +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/setup.cfg +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/_utils.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/base.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/button.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/calendar.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/canvas.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/checkbox.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/column.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/combo.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/error.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/frame.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/graph.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/helpers.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/image.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/input.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/list_box.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/menu.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/multiline.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/option_menu.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/pane.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/progress_bar.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/radio.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/separator.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/sizegrip.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/slider.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/spin.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/status_bar.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/stretch.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/tab.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/table.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/text.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/elements/tree.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/themes.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/tray.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/FreeSimpleGUI/window.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/_custom_turtle.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/_error_classes.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/_klang_builtins.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/_web_translate.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/automl.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/dnd/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/drag_and_drop/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/export/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/export/__main__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/export/config.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/export/dialogs.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/export/packaging.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/export/shims.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/export/ui.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/export/utils.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/export/validation.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/fsgdnd/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/fsgui/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/_utils.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/base.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/button.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/calendar.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/canvas.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/center.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/checkbox.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/column.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/combo.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/error.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/frame.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/graph.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/helpers.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/image.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/input.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/list_box.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/menu.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/multiline.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/option_menu.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/pane.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/progress_bar.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/radio.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/separator.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/sizegrip.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/slider.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/spin.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/status_bar.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/stretch.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/tab.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/table.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/text.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/elements/tree.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/replace.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/tray.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/hindGui/window.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/k2exe/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/k2exe/__main__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/k2exe/config.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/k2exe/dialogs.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/k2exe/packaging.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/k2exe/shims.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/k2exe/ui.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/k2exe/utils.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/k2exe/validation.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/kexe/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/kexe/__main__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/kexe/config.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/kexe/dialogs.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/kexe/packaging.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/kexe/shims.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/kexe/ui.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/kexe/utils.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/kexe/validation.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/kl2exe/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/kl2exe/__main__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/kl2exe/config.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/kl2exe/dialogs.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/kl2exe/packaging.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/kl2exe/shims.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/kl2exe/ui.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/kl2exe/utils.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/kl2exe/validation.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/klang2exe/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/klang2exe/__main__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/klang2exe/config.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/klang2exe/dialogs.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/klang2exe/packaging.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/klang2exe/shims.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/klang2exe/ui.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/klang2exe/utils.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/klang2exe/validation.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/klangexe/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/klangexe/__main__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/klangexe/config.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/klangexe/dialogs.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/klangexe/packaging.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/klangexe/shims.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/klangexe/ui.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/klangexe/utils.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/klangexe/validation.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/klexe/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/klexe/__main__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/klexe/config.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/klexe/dialogs.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/klexe/packaging.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/klexe/shims.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/klexe/ui.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/klexe/utils.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/klexe/validation.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/ml.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/np/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/pd/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/plt/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/psgui/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/px/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/pyexe/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/pyexe/__main__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/pyexe/config.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/pyexe/dialogs.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/pyexe/packaging.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/pyexe/shims.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/pyexe/ui.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/pyexe/utils.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/pyexe/validation.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/pysgdnd/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/__version__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/_internal_utils.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/adapters.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/api.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/auth.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/certifi/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/certifi/__main__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/certifi/core.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/certifi/py.typed +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/certs.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/charset_normalizer/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/charset_normalizer/__main__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/charset_normalizer/api.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/charset_normalizer/cd.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/charset_normalizer/cli/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/charset_normalizer/cli/__main__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/charset_normalizer/constant.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/charset_normalizer/legacy.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/charset_normalizer/md.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/charset_normalizer/models.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/charset_normalizer/py.typed +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/charset_normalizer/utils.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/charset_normalizer/version.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/compat.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/cookies.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/exceptions.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/help.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/hooks.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/idna/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/idna/codec.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/idna/compat.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/idna/core.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/idna/idnadata.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/idna/intranges.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/idna/package_data.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/idna/py.typed +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/idna/uts46data.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/models.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/packages.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/sessions.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/status_codes.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/structures.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/_base_connection.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/_collections.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/_request_methods.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/_version.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/connection.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/connectionpool.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/contrib/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/contrib/emscripten/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/contrib/emscripten/connection.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/contrib/emscripten/fetch.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/contrib/emscripten/request.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/contrib/emscripten/response.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/contrib/pyopenssl.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/contrib/socks.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/exceptions.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/fields.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/filepost.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/http2/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/http2/connection.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/http2/probe.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/poolmanager.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/py.typed +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/response.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/util/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/util/connection.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/util/proxy.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/util/request.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/util/response.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/util/retry.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/util/ssl_.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/util/ssl_match_hostname.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/util/ssltransport.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/util/timeout.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/util/url.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/util/util.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/urllib3/util/wait.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/requests/utils.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/sb/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/sk/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/sns/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/toexe/__init__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/toexe/__main__.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/toexe/config.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/toexe/dialogs.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/toexe/packaging.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/toexe/shims.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/toexe/ui.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/toexe/utils.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/toexe/validation.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py/when.py +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py.egg-info/dependency_links.txt +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py.egg-info/requires.txt +0 -0
- {kl_py-0.3.9 → kl_py-0.4.0}/src/KL_Py.egg-info/top_level.txt +0 -0
|
@@ -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"[
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
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(
|
|
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))
|
|
3139
|
-
|
|
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
|
-
|
|
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
|
|
@@ -4038,7 +4121,7 @@ def Int(
|
|
|
4038
4121
|
.strip()
|
|
4039
4122
|
x = replace(
|
|
4040
4123
|
x,
|
|
4041
|
-
r"[^Ee\+\-\.\d]|(?<=[A-Za-z_])[Ee]|[Ee](
|
|
4124
|
+
r"[^Ee\+\-\.\d]|(?<=[A-Za-z_])[Ee]|[Ee\.](?![\d\+\-])|(?<![^\de\+\-\.])[\.\+\-](?=[^\de\+\-\.])",
|
|
4042
4125
|
""
|
|
4043
4126
|
)
|
|
4044
4127
|
if "e" in x:
|
|
@@ -4063,7 +4146,7 @@ def Int(
|
|
|
4063
4146
|
except (
|
|
4064
4147
|
ValueError,
|
|
4065
4148
|
TypeError
|
|
4066
|
-
):
|
|
4149
|
+
) as e:
|
|
4067
4150
|
return 0
|
|
4068
4151
|
def Flt(
|
|
4069
4152
|
x: Union[
|
|
@@ -4087,7 +4170,7 @@ def Flt(
|
|
|
4087
4170
|
if isinstance(x, str):
|
|
4088
4171
|
x = replacei(
|
|
4089
4172
|
x.strip(),
|
|
4090
|
-
r"[^Ee\+\-\.\d]|(?<=[A-Za-z_])[Ee]|[Ee](
|
|
4173
|
+
r"[^Ee\+\-\.\d]|(?<=[A-Za-z_])[Ee]|[Ee\.](?![\d\+\-])|(?<![^\de\+\-\.])[\.\+\-](?=[^\de\+\-\.])",
|
|
4091
4174
|
""
|
|
4092
4175
|
)
|
|
4093
4176
|
return float(
|
|
@@ -4096,7 +4179,7 @@ def Flt(
|
|
|
4096
4179
|
except (
|
|
4097
4180
|
ValueError,
|
|
4098
4181
|
TypeError
|
|
4099
|
-
):
|
|
4182
|
+
) as e:
|
|
4100
4183
|
return 0.0
|
|
4101
4184
|
def is_pos(n: int|float) -> bool:
|
|
4102
4185
|
"""agar number ek positive number he to kehta he `Han`,
|
|
@@ -4368,7 +4451,10 @@ def numbered(x: str|list|tuple|dict, *args, **kwargs) -> list[list[Any], list[in
|
|
|
4368
4451
|
# allowing the following syntax:
|
|
4369
4452
|
# for item, i in numbered(arr):
|
|
4370
4453
|
# print("{i}. {item}")
|
|
4371
|
-
enumer =
|
|
4454
|
+
enumer = with_index =\
|
|
4455
|
+
sath_index = with_numbers =\
|
|
4456
|
+
sath_numbers =\
|
|
4457
|
+
numbered
|
|
4372
4458
|
__old_list__ = builtins.list
|
|
4373
4459
|
class Arr(__old_list__):
|
|
4374
4460
|
current_type = Any
|
|
@@ -5862,24 +5948,33 @@ def split_into_words(s: str) -> list[str]:
|
|
|
5862
5948
|
if not isinstance(s, str) or not s.strip(): return ""
|
|
5863
5949
|
return re.findall(WORD_RE, s)
|
|
5864
5950
|
find_words = findwords = to_words = towords = to_word_list = towordlist = pakro_words = pakrowords = pakro_alfaaz = pakroalfaaz = split_into_words
|
|
5865
|
-
def json_load(filename: str) ->
|
|
5866
|
-
if not isinstance(filename, str)
|
|
5867
|
-
|
|
5868
|
-
|
|
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
|
+
)
|
|
5869
5958
|
if "." not in filename:
|
|
5870
5959
|
filename += ".json"
|
|
5871
5960
|
if not os.path.exists(filename):
|
|
5872
|
-
return
|
|
5873
|
-
contents: Any =
|
|
5961
|
+
return Obj()
|
|
5962
|
+
contents: Any = Obj()
|
|
5874
5963
|
try:
|
|
5875
|
-
with open(
|
|
5876
|
-
|
|
5964
|
+
with open(
|
|
5965
|
+
filename,
|
|
5966
|
+
mode="r"
|
|
5967
|
+
) as file:
|
|
5968
|
+
contents = json.load(
|
|
5969
|
+
file
|
|
5970
|
+
)
|
|
5877
5971
|
except Exception as e:
|
|
5878
5972
|
print(e)
|
|
5879
5973
|
# the loaded contents can be a list, too
|
|
5880
5974
|
# not always a dictionary
|
|
5881
|
-
if isinstance(contents, dict)
|
|
5882
|
-
|
|
5975
|
+
if isinstance(contents, dict)\
|
|
5976
|
+
and "Obj" in globals():
|
|
5977
|
+
contents = Obj(contents)
|
|
5883
5978
|
return contents
|
|
5884
5979
|
load_json = loadjson = jsonload = json_load
|
|
5885
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:
|
|
@@ -6506,7 +6601,7 @@ def asset(to_filename: str) -> str:
|
|
|
6506
6601
|
path: str = ""
|
|
6507
6602
|
try:
|
|
6508
6603
|
if either(hasattr(sys, '_MEIPASS'), getattr(sys, 'frozen', False)) and both("_filepaths" in globals(), "PROGRAMS_DIR" in dir(globals().get("_filepaths", {}))):
|
|
6509
|
-
from _filepaths import PROGRAMS_DIR
|
|
6604
|
+
from ._filepaths import PROGRAMS_DIR
|
|
6510
6605
|
path = os.path.join(PROGRAMS_DIR, to_filename)
|
|
6511
6606
|
else:
|
|
6512
6607
|
path = to_path(f"../{to_filename}")
|
|
@@ -6763,7 +6858,7 @@ if __name__ == "__main__":
|
|
|
6763
6858
|
print(belongs_to(IOError | OSError, Exception))
|
|
6764
6859
|
print(chuno(rng(1, 10), koi=2))
|
|
6765
6860
|
my_dict: dict[str, dict[str, str] | int] = {"name": {"first": "Mike", "last": "Dawson"}, "age": 22000}
|
|
6766
|
-
from _klang_builtins import cust_print
|
|
6861
|
+
from ._klang_builtins import cust_print
|
|
6767
6862
|
cust_print(my_dict)
|
|
6768
6863
|
print(deep_get(my_dict, "first"))
|
|
6769
6864
|
dt: Date = Date("2.44 am, Jan 24, 2002")
|
|
@@ -6792,7 +6887,7 @@ if __name__ == "__main__":
|
|
|
6792
6887
|
print(is_pin("1535"))
|
|
6793
6888
|
print(is_pin("153"))
|
|
6794
6889
|
print(ishex("#68fafe"))
|
|
6795
|
-
countries: dict = load_json(r"json/
|
|
6890
|
+
countries: dict = load_json(r"json/country_namES")
|
|
6796
6891
|
print(countries)
|
|
6797
6892
|
arr = (1, 3.8, 7)
|
|
6798
6893
|
arr = _map(arr, str, lambda x: type(x) != float)
|
|
@@ -6855,4 +6950,23 @@ if __name__ == "__main__":
|
|
|
6855
6950
|
print("11.52 aM, jan 24 n!!2002")
|
|
6856
6951
|
print(encodeurl(decode(encode("hello world"))))
|
|
6857
6952
|
print(Date("3pm, Jan 24, 2002").view())
|
|
6858
|
-
print(Date().
|
|
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(
|
|
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.
|
|
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
|
|
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.
|
|
494
|
-
|
|
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.
|
|
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"
|
|
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
|
"""
|