eric-tools 1.3.3.1__py3-none-any.whl → 1.4.0__py3-none-any.whl
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.
- eric_tools/__init__.py +1 -1
- eric_tools/dynamic_settings.py +2 -28
- eric_tools/logMixin.py +0 -2
- eric_tools/pgsql.py +5 -12
- eric_tools-1.4.0.dist-info/METADATA +69 -0
- eric_tools-1.4.0.dist-info/RECORD +21 -0
- eric_tools/ip.py +0 -30
- eric_tools/nginx_log.py +0 -44
- eric_tools/readconfig.py +0 -30
- eric_tools/remove.py +0 -50
- eric_tools/send_email.py +0 -31
- eric_tools/sftp.py +0 -17
- eric_tools-1.3.3.1.dist-info/METADATA +0 -78
- eric_tools-1.3.3.1.dist-info/RECORD +0 -27
- {eric_tools-1.3.3.1.dist-info → eric_tools-1.4.0.dist-info}/LICENSE +0 -0
- {eric_tools-1.3.3.1.dist-info → eric_tools-1.4.0.dist-info}/WHEEL +0 -0
- {eric_tools-1.3.3.1.dist-info → eric_tools-1.4.0.dist-info}/top_level.txt +0 -0
eric_tools/__init__.py
CHANGED
@@ -11,7 +11,7 @@ from .dynamic_settings import DynamicConfig
|
|
11
11
|
name = 'Eric-Tools'
|
12
12
|
__title__ = 'tools'
|
13
13
|
__description__ = 'Python HTTP for Humans.'
|
14
|
-
__version__ = "1.
|
14
|
+
__version__ = "1.4.0"
|
15
15
|
__author__ = 'Eric'
|
16
16
|
__doc__ = ["Python Daily Development Tools"]
|
17
17
|
__url__ = "https://github.com/Eric-jxl/Tools"
|
eric_tools/dynamic_settings.py
CHANGED
@@ -7,15 +7,12 @@ import logging
|
|
7
7
|
from collections.abc import MutableMapping
|
8
8
|
from watchdog.observers import Observer
|
9
9
|
from watchdog.events import FileSystemEventHandler
|
10
|
-
from flask import Flask, jsonify, redirect
|
11
10
|
|
12
11
|
logging.basicConfig(level=logging.INFO)
|
13
12
|
logger = logging.getLogger(__file__.rsplit("/", 1)[1])
|
14
13
|
|
15
14
|
__all__ = ["DynamicConfig"]
|
16
15
|
|
17
|
-
# Flask Web Service for testing
|
18
|
-
app = Flask(__name__)
|
19
16
|
|
20
17
|
|
21
18
|
class ConfigFileHandler(FileSystemEventHandler):
|
@@ -144,29 +141,6 @@ class DynamicConfig(MutableMapping):
|
|
144
141
|
self._observer.stop()
|
145
142
|
self._observer.join()
|
146
143
|
|
147
|
-
|
148
|
-
@app.route("/", methods=["GET"])
|
149
|
-
def index():
|
150
|
-
return redirect("/config/")
|
151
|
-
|
152
|
-
|
153
|
-
@app.route("/config/", methods=["GET"])
|
154
|
-
def get_config():
|
155
|
-
config = DynamicConfig("config.yml", debug=True, mode="production")
|
156
|
-
config.force_reload()
|
157
|
-
return jsonify(config.config)
|
158
|
-
|
159
|
-
|
160
|
-
@app.route("/config/<path:key>", methods=["GET"]) # ✅ 允许 `/` 作为 key 的一部分
|
161
|
-
def get_config_key(key):
|
162
|
-
"""获取指定配置项的值,并支持自动重新加载"""
|
163
|
-
config = DynamicConfig("config.yml", debug=True, mode="production")
|
164
|
-
config.force_reload() # ✅ 先重新加载配置
|
165
|
-
value = Config.get(key) # ✅ 取值
|
166
|
-
if value is None:
|
167
|
-
return jsonify({"error": "Key not found"}), 404 # ✅ 404 + 友好错误信息
|
168
|
-
return jsonify(value)
|
169
|
-
|
170
|
-
|
171
144
|
if __name__ == "__main__":
|
172
|
-
|
145
|
+
config = DynamicConfig(watch_file="config.yml")
|
146
|
+
print(config.get("development.password"))
|
eric_tools/logMixin.py
CHANGED
eric_tools/pgsql.py
CHANGED
@@ -25,17 +25,14 @@ class PostgreSQL(object):
|
|
25
25
|
self.__dict__[key] = value
|
26
26
|
|
27
27
|
def __getattr__(self, item):
|
28
|
-
print self.__dict__[item]
|
29
28
|
return self.__dict__[item]
|
30
29
|
|
31
30
|
def __call__(self, *args, **kwargs):
|
32
|
-
print
|
31
|
+
print('%s' % PostgreSQL.__dict__)
|
33
32
|
|
34
33
|
@property
|
35
34
|
def info(self):
|
36
|
-
return psycopg2.__version__,psycopg2.__doc__
|
37
|
-
|
38
|
-
|
35
|
+
return psycopg2.__version__, psycopg2.__doc__
|
39
36
|
|
40
37
|
def operate(self, sql, params):
|
41
38
|
count = 0
|
@@ -45,7 +42,7 @@ class PostgreSQL(object):
|
|
45
42
|
self.conn.commit()
|
46
43
|
self.close()
|
47
44
|
except Exception, e:
|
48
|
-
print
|
45
|
+
print(e.message)
|
49
46
|
return count
|
50
47
|
|
51
48
|
def connect(self):
|
@@ -66,7 +63,7 @@ class PostgreSQL(object):
|
|
66
63
|
result = self.cursor.fetchone()
|
67
64
|
self.close()
|
68
65
|
except Exception, e:
|
69
|
-
print
|
66
|
+
print(e.message)
|
70
67
|
return result
|
71
68
|
|
72
69
|
def get_all(self, sql, params=()):
|
@@ -77,7 +74,7 @@ class PostgreSQL(object):
|
|
77
74
|
tup = self.cursor.fetchall()
|
78
75
|
self.close()
|
79
76
|
except Exception, e:
|
80
|
-
print
|
77
|
+
print(e.message)
|
81
78
|
return tup
|
82
79
|
|
83
80
|
def insert(self, sql, params=()):
|
@@ -88,7 +85,3 @@ class PostgreSQL(object):
|
|
88
85
|
|
89
86
|
def delete(self, sql, params=()):
|
90
87
|
return self.operate(sql, params)
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
@@ -0,0 +1,69 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: eric-tools
|
3
|
+
Version: 1.4.0
|
4
|
+
Summary: Python Daily Development Tools
|
5
|
+
Home-page: https://github.com/Eric-jxl/Tools
|
6
|
+
Author: Eric
|
7
|
+
Author-email: jxleric95@gmail.com
|
8
|
+
License: UNKNOWN
|
9
|
+
Platform: UNKNOWN
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
12
|
+
Classifier: Operating System :: OS Independent
|
13
|
+
Requires-Python: >=3.0
|
14
|
+
Description-Content-Type: text/markdown
|
15
|
+
License-File: LICENSE
|
16
|
+
Requires-Dist: psycopg2
|
17
|
+
Requires-Dist: requests
|
18
|
+
Requires-Dist: Pillow
|
19
|
+
Requires-Dist: xlsxwriter
|
20
|
+
Requires-Dist: ImageHash
|
21
|
+
|
22
|
+
# Tools
|
23
|
+
[](https://opensource.org/licenses/Apache-2.0)
|
24
|
+

|
25
|
+

|
26
|
+
[](https://github.com/eric-jxl/Tools/actions/workflows/publish-pypi.yml)
|
27
|
+
|
28
|
+
|
29
|
+
[Reids](https://eric-jxl.github.io/bak/index.html)
|
30
|
+
|
31
|
+
#### Project management of Python daily tools
|
32
|
+
|
33
|
+
```shell
|
34
|
+
pip install eric_tools
|
35
|
+
```
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
| 文件名 | 说明 |
|
40
|
+
| :----------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------: |
|
41
|
+
| [exception_class.py](https://github.com/eric-jxl/Tools/blob/main/eric_tools/encryption_classmethod.py) | 异常类 |
|
42
|
+
| [resize_image.py](https://github.com/eric-jxl/Tools/blob/main/eric_tools/resize_image.py) | 图片压缩 |
|
43
|
+
| [logger.py](https://github.com/eric-jxl/Tools/blob/main/eric_tools/logger.py) | 日志模块类和高级日志装饰器 |
|
44
|
+
| [pgsql.py](https://github.com/eric-jxl/Tools/blob/main/eric_tools/pgsql.py) | postgresql CRUD |
|
45
|
+
| [jwt_encrypt.py](https://github.com/eric-jxl/Tools/blob/main/eric_tools/jwt_encrypt.py) | 生成jwt Access Token 加密及解密 |
|
46
|
+
| [convert_json.py](https://github.com/eric-jxl/Tools/blob/main/eric_tools/convert_json.py) | 支持json和object之间转换 |
|
47
|
+
| [Abstract.py](https://github.com/eric-jxl/Tools/blob/main/eric_tools/Abstract.py) | 抽象类模型 |
|
48
|
+
| [decorator.py](https://github.com/eric-jxl/Tools/blob/main/eric_tools/decorator.py) | 惰性属性装饰器 |
|
49
|
+
| [async_queue.py](https://github.com/eric-jxl/Tools/blob/main/eric_tools/async_queue.py) | 异步队列 |
|
50
|
+
| [downloader.py](https://github.com/eric-jxl/Tools/blob/main/eric_tools/downloader.py) | 下载器 |
|
51
|
+
| [logMixin.py](https://github.com/eric-jxl/Tools/blob/main/eric_tools/logMixin.py) | 日志元类和高级日志装饰器 |
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
>[!TIP]
|
58
|
+
>
|
59
|
+
> * async_queue.py 异步队列操作
|
60
|
+
>
|
61
|
+
> * downloader.py 下载器
|
62
|
+
>
|
63
|
+
> * logMixIn.py 日志元类和高级日志装饰器
|
64
|
+
> >
|
65
|
+
> * dynamic_settings 一个动态加载配置类(支持toml、yml、conf、csv、ini等)
|
66
|
+
>
|
67
|
+
> * delete_duplicate 删除工作区重复文件(包括图片等)
|
68
|
+
|
69
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
eric_tools/Abstract.py,sha256=8HpTno0VnviyYaRvc2whTUfUJefg2tZhgR94RU9f-FQ,1619
|
2
|
+
eric_tools/__init__.py,sha256=CzY2W-LQ4cLl36vsBepvZ2wnQd-MNsY3t3kuavc4Pgs,386
|
3
|
+
eric_tools/async_queue.py,sha256=-wiImRYCWcNBbCAMLXFTjKkPrK94mFL836-f_wvUewA,1122
|
4
|
+
eric_tools/convert_json.py,sha256=Qcs8VQGB7cBkwAiqH1Xd9vbagw19sA2bE9s4EJFA33E,638
|
5
|
+
eric_tools/decorator.py,sha256=DEN_-TSvtAo0TWvs_7-HbeMQCqdgVAkxz2K5fekYFbM,1887
|
6
|
+
eric_tools/delete_duplicate.py,sha256=X3mXW2rjD4TnhmJPYFl6H06lu4rsUkoltL2C3btpkL4,1919
|
7
|
+
eric_tools/downloader.py,sha256=iSs6fpcxzlZX5VRjeahPOtf5G_HclY7aPNGXL5XyOwg,1758
|
8
|
+
eric_tools/dynamic_settings.py,sha256=ItOEPhTotfVfev4pk665FvT_1GChjvEUQVYCf4dPbaw,4901
|
9
|
+
eric_tools/encryption_classmethod.py,sha256=JaR0rBnaxOEWxOtoOZ6qN1x31Zm1boh5kw264juHLWg,1662
|
10
|
+
eric_tools/excel_generator.py,sha256=8pfd4yfDfd63f6XzFUuMKdpgLiSAnrEfyRcYXKAh8XM,1430
|
11
|
+
eric_tools/exception_class.py,sha256=4ntO2ynm3D9tGoeJ538OGKKsudqhoDRw-fpFd4X6Hy0,741
|
12
|
+
eric_tools/jwt_encrypt.py,sha256=_FxRezFnfEwCviFzx3K0s1yN872VqxqaAwMsU-GI3EI,1358
|
13
|
+
eric_tools/logMixin.py,sha256=1-atM_plpGaZ2KxxDZ9-c38buhPfahrQJ2sRrRo-meI,2235
|
14
|
+
eric_tools/logger.py,sha256=zvpDv0YpeXZld2w2yPIuosfLWdbdvOqSQsJS2PtstXQ,3058
|
15
|
+
eric_tools/pgsql.py,sha256=6rBZillrJF2zOptpnPUiczhKf8-HYosFcoshKrrFGpI,2286
|
16
|
+
eric_tools/resize_image.py,sha256=A2OBCF7XfnQesWIYTs2W1jmZDslftagPxcc-Fijmyoo,2855
|
17
|
+
eric_tools-1.4.0.dist-info/LICENSE,sha256=wURoCIWynkcZ4qUfCqtUOaHgLZgGkrWq8IbK4Scn8os,10849
|
18
|
+
eric_tools-1.4.0.dist-info/METADATA,sha256=6LOjSUDTYbQYBHhD6zZVGlxSUphrxVp1Sx3KP9ag7cU,3607
|
19
|
+
eric_tools-1.4.0.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
20
|
+
eric_tools-1.4.0.dist-info/top_level.txt,sha256=mtO1Tce6qLPcuy4F8bXHByXuIb2LSAEkQEqeQ3UZpzU,11
|
21
|
+
eric_tools-1.4.0.dist-info/RECORD,,
|
eric_tools/ip.py
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
# -*- coding:utf-8 -*-
|
2
|
-
'''
|
3
|
-
@Author : Eric
|
4
|
-
@Time : 2020-09-15 17:20
|
5
|
-
@IDE : PyCharm
|
6
|
-
'''
|
7
|
-
|
8
|
-
import requests
|
9
|
-
|
10
|
-
|
11
|
-
def ip_search(ip=None):
|
12
|
-
assert not isinstance(ip, (int, float)), 'ip类型不能为数值'
|
13
|
-
if ip is not None:
|
14
|
-
if isinstance(ip, (list, set)):
|
15
|
-
for i in ip:
|
16
|
-
url = 'http://ip-api.com/json/' + i + '?lang=zh-CN'
|
17
|
-
response = requests.post(url)
|
18
|
-
print(response.json())
|
19
|
-
|
20
|
-
elif isinstance(ip, str):
|
21
|
-
url = 'http://ip-api.com/json/' + ip + '?lang=zh-CN'
|
22
|
-
response = requests.post(url)
|
23
|
-
res = response.json()
|
24
|
-
print(str({'国家': res['country'], '省/直辖市': res['regionName'], '城市': res['city'],
|
25
|
-
'运营商': res['isp']}))
|
26
|
-
|
27
|
-
else:
|
28
|
-
url = 'http://ip-api.com/json/?lang=zh-CN'
|
29
|
-
response = requests.post(url)
|
30
|
-
print(response.content)
|
eric_tools/nginx_log.py
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
import sys
|
2
|
-
import os
|
3
|
-
import datetime
|
4
|
-
|
5
|
-
# 定义一个函数来获取用户的输入
|
6
|
-
|
7
|
-
|
8
|
-
def get_user_input(prompt):
|
9
|
-
return input(prompt)
|
10
|
-
|
11
|
-
|
12
|
-
# 获取当前日期
|
13
|
-
today = datetime.date.today()
|
14
|
-
|
15
|
-
# 获取过去三天的日期
|
16
|
-
three_days_ago = today - datetime.timedelta(days=3)
|
17
|
-
|
18
|
-
# 获取要切割的日志文件路径
|
19
|
-
log_file_path = '/var/log/nginx/access.log'
|
20
|
-
|
21
|
-
# 获取要匹配的IP地址
|
22
|
-
ip_address = get_user_input("Enter the IP address to match: ")
|
23
|
-
|
24
|
-
# 创建一个新文件来存储切割后的日志
|
25
|
-
output_file_path = 'nginx_access_log_cut.txt'
|
26
|
-
with open(output_file_path, 'w') as output_file:
|
27
|
-
# 逐行读取日志文件
|
28
|
-
with open(log_file_path, 'r') as log_file:
|
29
|
-
for line in log_file:
|
30
|
-
# 分割日志行
|
31
|
-
parts = line.split()
|
32
|
-
|
33
|
-
# 获取日志日期
|
34
|
-
log_date = parts[3][1:]
|
35
|
-
|
36
|
-
# 检查日志日期是否在过去三天内
|
37
|
-
if log_date >= three_days_ago.strftime('%d/%b/%Y'):
|
38
|
-
# 检查日志行是否包含匹配的IP地址
|
39
|
-
if ip_address in line:
|
40
|
-
# 将日志行写入输出文件
|
41
|
-
output_file.write(line)
|
42
|
-
|
43
|
-
# 打印切割后的日志文件路径
|
44
|
-
print(f"Cut nginx access log saved to: {output_file_path}")
|
eric_tools/readconfig.py
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
# -*- coding:utf-8 -*-
|
2
|
-
'''
|
3
|
-
@Author : Eric
|
4
|
-
@Time : 2021-02-07 14:01
|
5
|
-
@IDE : PyCharm
|
6
|
-
'''
|
7
|
-
import sys
|
8
|
-
|
9
|
-
import configparser
|
10
|
-
|
11
|
-
# proDir = os.path.split(os.path.realpath(__file__))[0]
|
12
|
-
# configPath = os.path.join(proDir, "config.ini")
|
13
|
-
|
14
|
-
|
15
|
-
class ReadConfig(object):
|
16
|
-
def __init__(self, configPath,title, name):
|
17
|
-
self.conf = configparser.ConfigParser()
|
18
|
-
self.title = title
|
19
|
-
self.name = name
|
20
|
-
self.conf.read(configPath, encoding='utf-8')
|
21
|
-
self.conf.get(title, name)
|
22
|
-
print self.conf.get(title, name)
|
23
|
-
|
24
|
-
|
25
|
-
def __repr__(self):
|
26
|
-
if sys.version_info < 3:
|
27
|
-
print '%s' % self.conf.get(self.title, self.name)
|
28
|
-
else:
|
29
|
-
print('%s' % self.conf.get(self.title, self.name))
|
30
|
-
|
eric_tools/remove.py
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
# -*- coding:utf-8 -*-
|
2
|
-
'''
|
3
|
-
@Author : Eric
|
4
|
-
@Time : 2020-09-10 10:37
|
5
|
-
@IDE : PyCharm
|
6
|
-
'''
|
7
|
-
|
8
|
-
import os
|
9
|
-
import time
|
10
|
-
import datetime
|
11
|
-
|
12
|
-
|
13
|
-
class RemoveFile(object):
|
14
|
-
def __init__(self, filename, timedifference):
|
15
|
-
self.filename = filename
|
16
|
-
self.timedifference = timedifference
|
17
|
-
|
18
|
-
@staticmethod
|
19
|
-
def fileremove(filename, timedifference):
|
20
|
-
'''remove file'''
|
21
|
-
|
22
|
-
date = datetime.datetime.fromtimestamp(os.path.getmtime(filename))
|
23
|
-
now = datetime.datetime.now()
|
24
|
-
|
25
|
-
if (now - date).seconds > timedifference:
|
26
|
-
if os.path.exists(filename):
|
27
|
-
os.remove(filename)
|
28
|
-
print 'remove file: %s' % filename
|
29
|
-
else:
|
30
|
-
print 'no such file: %s' % filename
|
31
|
-
|
32
|
-
|
33
|
-
FILE_DIR = '/home'
|
34
|
-
|
35
|
-
if __name__ == '__main__':
|
36
|
-
|
37
|
-
print 'Script is running...'
|
38
|
-
|
39
|
-
while True:
|
40
|
-
ITEMS = os.listdir(FILE_DIR)
|
41
|
-
NEWLIST = []
|
42
|
-
for names in ITEMS:
|
43
|
-
if names.endswith(".txt"):
|
44
|
-
NEWLIST.append(FILE_DIR + names)
|
45
|
-
|
46
|
-
for names in NEWLIST:
|
47
|
-
print 'current file: %s' % (names)
|
48
|
-
RemoveFile.fileremove(names, 10)
|
49
|
-
|
50
|
-
time.sleep(2)
|
eric_tools/send_email.py
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
# -*- coding:utf-8 -*-
|
2
|
-
'''
|
3
|
-
@Author : Eric
|
4
|
-
@Time : 2021-01-15 13:50
|
5
|
-
@IDE : PyCharm
|
6
|
-
'''
|
7
|
-
|
8
|
-
__doc__ = ["测试QQ邮箱,pwd为邮箱授权码"]
|
9
|
-
|
10
|
-
import smtplib
|
11
|
-
from email.mime.text import MIMEText
|
12
|
-
from email.utils import formataddr
|
13
|
-
|
14
|
-
|
15
|
-
def mail(send_email, receive_email, send_nickname, receive_nickname, pwd):
|
16
|
-
try:
|
17
|
-
msg = MIMEText('Test QQ Email', 'plain', 'utf-8')
|
18
|
-
# 括号里的对应发件人邮箱昵称、发件人邮箱账号
|
19
|
-
msg['From'] = formataddr([send_nickname, send_email])
|
20
|
-
# 括号里的对应收件人邮箱昵称、收件人邮箱账号
|
21
|
-
msg['To'] = formataddr([receive_nickname, receive_email])
|
22
|
-
msg['Subject'] = "发送邮件测试" # 邮件的主题,也可以说是标题
|
23
|
-
|
24
|
-
server = smtplib.SMTP_SSL("smtp.qq.com", 465) # 发件人邮箱中的SMTP服务器,端口是25
|
25
|
-
server.login(send_email, pwd)
|
26
|
-
# 括号中对应的是发件人邮箱账号、收件人邮箱账号、发送邮件
|
27
|
-
server.sendmail(send_email, [receive_email, ], msg.as_string())
|
28
|
-
server.quit() # 关闭连接
|
29
|
-
except Exception as e:
|
30
|
-
print('发送邮件失败:%s' % e)
|
31
|
-
return e
|
eric_tools/sftp.py
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# -*- coding:utf-8 -*-
|
2
|
-
'''
|
3
|
-
@Author : Eric
|
4
|
-
@Time : 2020-11-30 15:06
|
5
|
-
@IDE : PyCharm
|
6
|
-
'''
|
7
|
-
import paramiko
|
8
|
-
|
9
|
-
|
10
|
-
def remote_scp(host_ip, remote_path, local_path, username, password=None):
|
11
|
-
t = paramiko.Transport(host_ip)
|
12
|
-
t.connect(username=username, password=password) # 登录远程服务器
|
13
|
-
sftp = paramiko.SFTPClient.from_transport(t) # sftp传输协议
|
14
|
-
sftp.get(remote_path, local_path)
|
15
|
-
t.close()
|
16
|
-
|
17
|
-
|
@@ -1,78 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.1
|
2
|
-
Name: eric-tools
|
3
|
-
Version: 1.3.3.1
|
4
|
-
Summary: Python Daily Development Tools
|
5
|
-
Home-page: https://github.com/Eric-jxl/Tools
|
6
|
-
Author: Eric
|
7
|
-
Author-email: jxleric95@gmail.com
|
8
|
-
License: UNKNOWN
|
9
|
-
Platform: UNKNOWN
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
11
|
-
Classifier: License :: OSI Approved :: MIT License
|
12
|
-
Classifier: Operating System :: OS Independent
|
13
|
-
Requires-Python: >=3.0
|
14
|
-
Description-Content-Type: text/markdown
|
15
|
-
License-File: LICENSE
|
16
|
-
Requires-Dist: psycopg2
|
17
|
-
Requires-Dist: requests
|
18
|
-
Requires-Dist: paramiko
|
19
|
-
Requires-Dist: Pillow
|
20
|
-
Requires-Dist: xlsxwriter
|
21
|
-
|
22
|
-
# Tools
|
23
|
-
[](https://opensource.org/licenses/Apache-2.0)
|
24
|
-

|
25
|
-

|
26
|
-
[](https://github.com/eric-jxl/Tools/actions/workflows/publish-pypi.yml)
|
27
|
-
|
28
|
-
|
29
|
-
[Reids](https://eric-jxl.github.io/bak/index.html)
|
30
|
-
|
31
|
-
#### Project management of Python daily tools
|
32
|
-
|
33
|
-
```shell
|
34
|
-
pip install eric_tools
|
35
|
-
```
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
| 文件名 | 说明 |
|
40
|
-
| :----------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------: |
|
41
|
-
| [encryption_classmethod.py ](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/Abstract.py) | HMAC+MD5加密签名算法 |
|
42
|
-
| [exception_class.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/exception_class.py) | 异常类 |
|
43
|
-
| [resize_image.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/resize_image.py) | 图片压缩 |
|
44
|
-
| [ip.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/ip.py) | ip地址定位API |
|
45
|
-
| [logger.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/logger.py) | 日志模块类和高级日志装饰器 |
|
46
|
-
| [remove.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/remove.py) | 删除文件 |
|
47
|
-
| [send_email.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/send_email.py) | 发送邮件 |
|
48
|
-
| [sftp.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/sftp.py) | ssh远程下载文件 |
|
49
|
-
| [pgsql.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/pgsql.py) | postgresql CRUD |
|
50
|
-
| [readconfig.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/readconfig.py) | 读取.ini配置文件 |
|
51
|
-
| [jwt_encrypt.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/jwt_encrypt.py) | 生成jwt Access Token 加密及解密 |
|
52
|
-
| [convert_json.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/convert_json.py) | 支持json和object之间转换 |
|
53
|
-
| [Abstract.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/Abstract.py) | 抽象类模型 |
|
54
|
-
| [decorator.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/decorator.py) | 惰性属性装饰器 |
|
55
|
-
| [async_queue.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/async_queue.py) | 异步队列 |
|
56
|
-
| [downloader.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/downloader.py) | 下载器 |
|
57
|
-
| [logMixin.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/logMixin.py) | 日志元类和高级日志装饰器 |
|
58
|
-
| [nginx_log.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/nginx_log.py) | nginx日志解析(默认access.log) |
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
>[!TIP]
|
65
|
-
>
|
66
|
-
> * async_queue.py 异步队列操作
|
67
|
-
>
|
68
|
-
> * downloader.py 下载器
|
69
|
-
>
|
70
|
-
> * logMixIn.py 日志元类和高级日志装饰器
|
71
|
-
>
|
72
|
-
> * nginx_log.py nginx日志解析(默认access.log)
|
73
|
-
>
|
74
|
-
> * dynamic_settings 一个动态加载配置类(支持toml、yml、conf、csv、ini等)
|
75
|
-
>
|
76
|
-
> * delete_duplicate 删除工作区重复文件(包括图片等)
|
77
|
-
|
78
|
-
|
@@ -1,27 +0,0 @@
|
|
1
|
-
eric_tools/Abstract.py,sha256=8HpTno0VnviyYaRvc2whTUfUJefg2tZhgR94RU9f-FQ,1619
|
2
|
-
eric_tools/__init__.py,sha256=AzdqdRGGJQONw9Wm-92xghu7pbW5dDJCs_w4JM2fhig,388
|
3
|
-
eric_tools/async_queue.py,sha256=-wiImRYCWcNBbCAMLXFTjKkPrK94mFL836-f_wvUewA,1122
|
4
|
-
eric_tools/convert_json.py,sha256=Qcs8VQGB7cBkwAiqH1Xd9vbagw19sA2bE9s4EJFA33E,638
|
5
|
-
eric_tools/decorator.py,sha256=DEN_-TSvtAo0TWvs_7-HbeMQCqdgVAkxz2K5fekYFbM,1887
|
6
|
-
eric_tools/delete_duplicate.py,sha256=X3mXW2rjD4TnhmJPYFl6H06lu4rsUkoltL2C3btpkL4,1919
|
7
|
-
eric_tools/downloader.py,sha256=iSs6fpcxzlZX5VRjeahPOtf5G_HclY7aPNGXL5XyOwg,1758
|
8
|
-
eric_tools/dynamic_settings.py,sha256=WGsjU1YYdXkoXB3J_8Tm6TUvNqc7qjQ2NmVzt0CnH1U,5717
|
9
|
-
eric_tools/encryption_classmethod.py,sha256=JaR0rBnaxOEWxOtoOZ6qN1x31Zm1boh5kw264juHLWg,1662
|
10
|
-
eric_tools/excel_generator.py,sha256=8pfd4yfDfd63f6XzFUuMKdpgLiSAnrEfyRcYXKAh8XM,1430
|
11
|
-
eric_tools/exception_class.py,sha256=4ntO2ynm3D9tGoeJ538OGKKsudqhoDRw-fpFd4X6Hy0,741
|
12
|
-
eric_tools/ip.py,sha256=TqeWnJe2M5HhoI8WGNFwyYrsI7kYDQ4PBDBDIDjLSkc,915
|
13
|
-
eric_tools/jwt_encrypt.py,sha256=_FxRezFnfEwCviFzx3K0s1yN872VqxqaAwMsU-GI3EI,1358
|
14
|
-
eric_tools/logMixin.py,sha256=D7S8FmjO_5ON6vIQXrOQFblDNmeoTHb3TV2eisJOFAQ,2298
|
15
|
-
eric_tools/logger.py,sha256=zvpDv0YpeXZld2w2yPIuosfLWdbdvOqSQsJS2PtstXQ,3058
|
16
|
-
eric_tools/nginx_log.py,sha256=zEhfYBtXNJam9tfRbOY5TjezvZspFQzcV5fgrcXv_PM,1260
|
17
|
-
eric_tools/pgsql.py,sha256=hYt9GwdpobHOoQ6SAemlyN0zlo0X0niYiTcG-2yWEeQ,2320
|
18
|
-
eric_tools/readconfig.py,sha256=Wosz96C1RFITBN2pgfw-TlX7C-wnOiLcDowb7mITysk,737
|
19
|
-
eric_tools/remove.py,sha256=RtnNFZzvRc-YNKdDb0h9zVZAPXyDSM1nVcUHTFEjQGk,1163
|
20
|
-
eric_tools/resize_image.py,sha256=A2OBCF7XfnQesWIYTs2W1jmZDslftagPxcc-Fijmyoo,2855
|
21
|
-
eric_tools/send_email.py,sha256=z1SMVpRaJZQIpA-zUHxxd3WKnUGMaAl9ZG-GirO9fTQ,1177
|
22
|
-
eric_tools/sftp.py,sha256=UUBmy4R-7Pezo9haA8JufDyJRcxZg2pKquX0KJIDZIw,423
|
23
|
-
eric_tools-1.3.3.1.dist-info/LICENSE,sha256=wURoCIWynkcZ4qUfCqtUOaHgLZgGkrWq8IbK4Scn8os,10849
|
24
|
-
eric_tools-1.3.3.1.dist-info/METADATA,sha256=iiQhVWg7FoqVUmWUXePM7GX8zy_tZkZKv_yvG6iOvxo,5152
|
25
|
-
eric_tools-1.3.3.1.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
26
|
-
eric_tools-1.3.3.1.dist-info/top_level.txt,sha256=mtO1Tce6qLPcuy4F8bXHByXuIb2LSAEkQEqeQ3UZpzU,11
|
27
|
-
eric_tools-1.3.3.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|