python-plugins 0.2.0__tar.gz → 0.2.1__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 (88) hide show
  1. {python_plugins-0.2.0 → python_plugins-0.2.1}/CHANGES.rst +7 -0
  2. {python_plugins-0.2.0 → python_plugins-0.2.1}/PKG-INFO +1 -1
  3. {python_plugins-0.2.0 → python_plugins-0.2.1}/docs/index.rst +0 -2
  4. {python_plugins-0.2.0 → python_plugins-0.2.1}/docs/usage.rst +23 -3
  5. python_plugins-0.2.1/src/python_plugins/__about__.py +1 -0
  6. python_plugins-0.2.1/src/python_plugins/utils/__init__.py +4 -0
  7. python_plugins-0.2.1/src/python_plugins/utils/walk_remove_dir.py +19 -0
  8. {python_plugins-0.2.0 → python_plugins-0.2.1}/tests/test_utils.py +1 -0
  9. python_plugins-0.2.0/docs/api.rst +0 -4
  10. python_plugins-0.2.0/docs/examples.rst +0 -1
  11. python_plugins-0.2.0/examples/README.rst +0 -17
  12. python_plugins-0.2.0/src/python_plugins/__about__.py +0 -1
  13. python_plugins-0.2.0/src/python_plugins/utils/__init__.py +0 -1
  14. python_plugins-0.2.0/src/python_plugins/utils/remove_pycache.py +0 -13
  15. {python_plugins-0.2.0 → python_plugins-0.2.1}/.github/workflows/release.yml +0 -0
  16. {python_plugins-0.2.0 → python_plugins-0.2.1}/.gitignore +0 -0
  17. {python_plugins-0.2.0 → python_plugins-0.2.1}/.readthedocs.yaml +0 -0
  18. {python_plugins-0.2.0 → python_plugins-0.2.1}/LICENSE.rst +0 -0
  19. {python_plugins-0.2.0 → python_plugins-0.2.1}/README.rst +0 -0
  20. {python_plugins-0.2.0 → python_plugins-0.2.1}/docs/Makefile +0 -0
  21. {python_plugins-0.2.0 → python_plugins-0.2.1}/docs/changes.rst +0 -0
  22. {python_plugins-0.2.0 → python_plugins-0.2.1}/docs/conf.py +0 -0
  23. {python_plugins-0.2.0 → python_plugins-0.2.1}/docs/make.bat +0 -0
  24. {python_plugins-0.2.0 → python_plugins-0.2.1}/docs/requirements.txt +0 -0
  25. {python_plugins-0.2.0 → python_plugins-0.2.1}/pyproject.toml +0 -0
  26. {python_plugins-0.2.0 → python_plugins-0.2.1}/requirements/build.in +0 -0
  27. {python_plugins-0.2.0 → python_plugins-0.2.1}/requirements/test.in +0 -0
  28. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/__init__.py +0 -0
  29. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/convert/__init__.py +0 -0
  30. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/convert/datetime_str.py +0 -0
  31. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/convert/pretty.py +0 -0
  32. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/convert/xml.py +0 -0
  33. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/crypto/__init__.py +0 -0
  34. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/crypto/fernet.py +0 -0
  35. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/crypto/file_to_file.py +0 -0
  36. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/crypto/str_to_list.py +0 -0
  37. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/dumps/__init__.py +0 -0
  38. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/dumps/postgresql_dump.py +0 -0
  39. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/email/__init__.py +0 -0
  40. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/email/smtp.py +0 -0
  41. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/examples/higher_order_functions.py +0 -0
  42. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/forms/__init__.py +0 -0
  43. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/forms/fields/__init__.py +0 -0
  44. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/forms/fields/datetime.py +0 -0
  45. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/forms/fields/json.py +0 -0
  46. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/forms/fields/select.py +0 -0
  47. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/forms/fields/switch.py +0 -0
  48. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/forms/fields/taglist.py +0 -0
  49. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/forms/mixins/__init__.py +0 -0
  50. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/forms/mixins/user.py +0 -0
  51. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/forms/widgets/__init__.py +0 -0
  52. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/forms/widgets/datetime.py +0 -0
  53. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/forms/widgets/file.py +0 -0
  54. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/forms/widgets/select.py +0 -0
  55. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/hashes/__init__.py +0 -0
  56. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/hashes/hash.py +0 -0
  57. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/jwt/__init__.py +0 -0
  58. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/jwt/jwt.py +0 -0
  59. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/models/__init__.py +0 -0
  60. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/models/mixins/__init__.py +0 -0
  61. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/models/mixins/data_mixin.py +0 -0
  62. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/models/mixins/primary_key_mixin.py +0 -0
  63. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/models/mixins/timestamp_mixin.py +0 -0
  64. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/models/mixins/token_minxin.py +0 -0
  65. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/models/mixins/user_minxin.py +0 -0
  66. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/models/update.py +0 -0
  67. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/process/__init__.py +0 -0
  68. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/process/python_venv_process.py +0 -0
  69. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/process/sub_process.py +0 -0
  70. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/random/__init__.py +0 -0
  71. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/random/random_str.py +0 -0
  72. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/weixin/biz_data_crypt.py +0 -0
  73. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/weixin/error_code.py +0 -0
  74. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/weixin/format_response.py +0 -0
  75. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/weixin/wechat.py +0 -0
  76. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/weixin/wechat_crypt.py +0 -0
  77. {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/weixin/weixin_api.py +0 -0
  78. {python_plugins-0.2.0 → python_plugins-0.2.1}/tests/__init__.py +0 -0
  79. {python_plugins-0.2.0 → python_plugins-0.2.1}/tests/conftest.py +0 -0
  80. {python_plugins-0.2.0 → python_plugins-0.2.1}/tests/test_crypt_file.py +0 -0
  81. {python_plugins-0.2.0 → python_plugins-0.2.1}/tests/test_crypto.py +0 -0
  82. {python_plugins-0.2.0 → python_plugins-0.2.1}/tests/test_email.py +0 -0
  83. {python_plugins-0.2.0 → python_plugins-0.2.1}/tests/test_forms.py +0 -0
  84. {python_plugins-0.2.0 → python_plugins-0.2.1}/tests/test_jwt.py +0 -0
  85. {python_plugins-0.2.0 → python_plugins-0.2.1}/tests/test_process.py +0 -0
  86. {python_plugins-0.2.0 → python_plugins-0.2.1}/tests/test_random.py +0 -0
  87. {python_plugins-0.2.0 → python_plugins-0.2.1}/tests/test_sqlalchemy.py +0 -0
  88. {python_plugins-0.2.0 → python_plugins-0.2.1}/tests/test_weixin.py +0 -0
@@ -1,3 +1,10 @@
1
+ v0.2.1
2
+ ------
3
+
4
+ Released 2024-11-23
5
+
6
+ - utils.walk_remove_dir
7
+
1
8
  v0.2.0
2
9
  ------
3
10
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: python-plugins
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: A collection of Python functions and classes.
5
5
  Project-URL: Documentation, https://python-plugins.readthedocs.io
6
6
  Project-URL: Source, https://github.com/ojso/python-plugins
@@ -8,8 +8,6 @@ Welcome to python-plugins's documentation!
8
8
  :caption: Contents:
9
9
 
10
10
  usage
11
- api
12
- examples
13
11
  changes
14
12
 
15
13
  Indices and tables
@@ -57,16 +57,36 @@ mixins
57
57
  class User(db.models,PrimaryKeyMixin, DataMixin, TimestampMixin, UserMixin):
58
58
  __tablename__ = "users"
59
59
 
60
- remove_pycache
60
+ walk_remove_dir
61
61
  =======================
62
62
 
63
63
  .. code-block:: python
64
64
 
65
- from python_plugins.utils import remove_pycache
65
+ from python_plugins.utils import remove,remove_pycache,remove_ipynb_checkpoints
66
66
 
67
67
  remove_pycache() # default is "."
68
68
  remove_pycache("./tests")
69
69
 
70
+ remove(dir,rm_dir_name)
71
+
72
+
73
+ encrypt,decrypt
74
+ ================
75
+
76
+ .. code-block:: python
77
+
78
+ from python_plugins.crypto import encrypt_txtfile,decrypt_txtfile
79
+
80
+ # encrypt
81
+ encrypt_txtfile(txtfile)
82
+ encrypt_txtfile(txtfile,".")
83
+ encrypt_txtfile(txtfile, newfile, password=password)
84
+
85
+ # decrypt
86
+ decrypt_txtfile(encryptedfile)
87
+ decrypt_txtfile(encryptedfile,".")
88
+ decrypt_txtfile(encryptedfile, srcfile, password=password)
89
+
70
90
 
71
91
  weixin.wechat
72
92
  ==================
@@ -83,4 +103,4 @@ weixin.wechat
83
103
  mywechat = MyWechat("name")
84
104
  mywechat.verify(query)
85
105
  mywechat.chat(query,content)
86
-
106
+
@@ -0,0 +1 @@
1
+ __version__ = "0.2.1"
@@ -0,0 +1,4 @@
1
+ from .walk_remove_dir import remove
2
+ from .walk_remove_dir import remove_pycache
3
+ from .walk_remove_dir import remove_ipynb_checkpoints
4
+
@@ -0,0 +1,19 @@
1
+ import os
2
+ import shutil
3
+
4
+ def remove(dir_path,rm_dir_name):
5
+ for root, dirs, files in os.walk(dir_path):
6
+ if "venv" in root or "git" in root:
7
+ continue
8
+ for dir in dirs:
9
+ if dir == rm_dir_name:
10
+ rm_path = os.path.join(root, dir)
11
+ print(f"Removing {rm_path}")
12
+ shutil.rmtree(rm_path)
13
+
14
+ def remove_pycache(dir_path="."):
15
+ remove(dir_path,"__pycache__")
16
+
17
+ def remove_ipynb_checkpoints(dir_path="."):
18
+ remove(dir_path,".ipynb_checkpoints")
19
+
@@ -1,6 +1,7 @@
1
1
  import pytest
2
2
 
3
3
  from python_plugins.utils import remove_pycache
4
+ from python_plugins.utils import remove_ipynb_checkpoints
4
5
 
5
6
  @pytest.mark.skip
6
7
  def test_remove_pycache():
@@ -1,4 +0,0 @@
1
- API
2
- ===
3
-
4
-
@@ -1 +0,0 @@
1
- .. include:: ../examples/README.rst
@@ -1,17 +0,0 @@
1
- =============
2
- Examples
3
- =============
4
-
5
- Install
6
- =========
7
-
8
- Type these commands in the terminal:
9
-
10
- .. code-block:: bash
11
-
12
- $ git clone https://github.com/ojso/python-plugins.git
13
- $ cd python-plugins/examples
14
- $ python3 -m venv venv
15
- $ source venv/bin/activate
16
- $ pip install python-plugins
17
-
@@ -1 +0,0 @@
1
- __version__ = "0.2.0"
@@ -1 +0,0 @@
1
- from .remove_pycache import remove_pycache
@@ -1,13 +0,0 @@
1
- import os
2
- import shutil
3
-
4
- def remove_pycache(dir_path="."):
5
- for root, dirs, files in os.walk(dir_path):
6
- if "venv" in root or "git" in root:
7
- continue
8
- for dir in dirs:
9
- if dir == "__pycache__":
10
- pycache_path = os.path.join(root, dir)
11
- print(f"Removing {pycache_path}")
12
- shutil.rmtree(pycache_path)
13
-