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.
- {python_plugins-0.2.0 → python_plugins-0.2.1}/CHANGES.rst +7 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/PKG-INFO +1 -1
- {python_plugins-0.2.0 → python_plugins-0.2.1}/docs/index.rst +0 -2
- {python_plugins-0.2.0 → python_plugins-0.2.1}/docs/usage.rst +23 -3
- python_plugins-0.2.1/src/python_plugins/__about__.py +1 -0
- python_plugins-0.2.1/src/python_plugins/utils/__init__.py +4 -0
- python_plugins-0.2.1/src/python_plugins/utils/walk_remove_dir.py +19 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/tests/test_utils.py +1 -0
- python_plugins-0.2.0/docs/api.rst +0 -4
- python_plugins-0.2.0/docs/examples.rst +0 -1
- python_plugins-0.2.0/examples/README.rst +0 -17
- python_plugins-0.2.0/src/python_plugins/__about__.py +0 -1
- python_plugins-0.2.0/src/python_plugins/utils/__init__.py +0 -1
- python_plugins-0.2.0/src/python_plugins/utils/remove_pycache.py +0 -13
- {python_plugins-0.2.0 → python_plugins-0.2.1}/.github/workflows/release.yml +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/.gitignore +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/.readthedocs.yaml +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/LICENSE.rst +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/README.rst +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/docs/Makefile +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/docs/changes.rst +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/docs/conf.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/docs/make.bat +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/docs/requirements.txt +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/pyproject.toml +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/requirements/build.in +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/requirements/test.in +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/__init__.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/convert/__init__.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/convert/datetime_str.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/convert/pretty.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/convert/xml.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/crypto/__init__.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/crypto/fernet.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/crypto/file_to_file.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/crypto/str_to_list.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/dumps/__init__.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/dumps/postgresql_dump.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/email/__init__.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/email/smtp.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/examples/higher_order_functions.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/forms/__init__.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/forms/fields/__init__.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/forms/fields/datetime.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/forms/fields/json.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/forms/fields/select.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/forms/fields/switch.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/forms/fields/taglist.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/forms/mixins/__init__.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/forms/mixins/user.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/forms/widgets/__init__.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/forms/widgets/datetime.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/forms/widgets/file.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/forms/widgets/select.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/hashes/__init__.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/hashes/hash.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/jwt/__init__.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/jwt/jwt.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/models/__init__.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/models/mixins/__init__.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/models/mixins/data_mixin.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/models/mixins/primary_key_mixin.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/models/mixins/timestamp_mixin.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/models/mixins/token_minxin.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/models/mixins/user_minxin.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/models/update.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/process/__init__.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/process/python_venv_process.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/process/sub_process.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/random/__init__.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/random/random_str.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/weixin/biz_data_crypt.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/weixin/error_code.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/weixin/format_response.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/weixin/wechat.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/weixin/wechat_crypt.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/weixin/weixin_api.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/tests/__init__.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/tests/conftest.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/tests/test_crypt_file.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/tests/test_crypto.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/tests/test_email.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/tests/test_forms.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/tests/test_jwt.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/tests/test_process.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/tests/test_random.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/tests/test_sqlalchemy.py +0 -0
- {python_plugins-0.2.0 → python_plugins-0.2.1}/tests/test_weixin.py +0 -0
|
@@ -57,16 +57,36 @@ mixins
|
|
|
57
57
|
class User(db.models,PrimaryKeyMixin, DataMixin, TimestampMixin, UserMixin):
|
|
58
58
|
__tablename__ = "users"
|
|
59
59
|
|
|
60
|
-
|
|
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,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 +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
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/examples/higher_order_functions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/models/mixins/data_mixin.py
RENAMED
|
File without changes
|
{python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/models/mixins/primary_key_mixin.py
RENAMED
|
File without changes
|
{python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/models/mixins/timestamp_mixin.py
RENAMED
|
File without changes
|
{python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/models/mixins/token_minxin.py
RENAMED
|
File without changes
|
{python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/models/mixins/user_minxin.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_plugins-0.2.0 → python_plugins-0.2.1}/src/python_plugins/process/python_venv_process.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|