eric-tools 1.3.1__tar.gz → 1.3.3__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 (34) hide show
  1. eric_tools-1.3.3/PKG-INFO +72 -0
  2. eric_tools-1.3.3/README.md +54 -0
  3. {eric_tools-1.3.1 → eric_tools-1.3.3}/eric_tools/__init__.py +3 -2
  4. eric_tools-1.3.3/eric_tools/dynamic_settings.py +174 -0
  5. {eric_tools-1.3.1 → eric_tools-1.3.3}/eric_tools/send_email.py +9 -13
  6. eric_tools-1.3.3/eric_tools.egg-info/PKG-INFO +72 -0
  7. {eric_tools-1.3.1 → eric_tools-1.3.3}/eric_tools.egg-info/SOURCES.txt +1 -0
  8. {eric_tools-1.3.1 → eric_tools-1.3.3}/setup.py +1 -1
  9. eric_tools-1.3.1/PKG-INFO +0 -70
  10. eric_tools-1.3.1/README.md +0 -52
  11. eric_tools-1.3.1/eric_tools.egg-info/PKG-INFO +0 -70
  12. {eric_tools-1.3.1 → eric_tools-1.3.3}/LICENSE +0 -0
  13. {eric_tools-1.3.1 → eric_tools-1.3.3}/eric_tools/Abstract.py +0 -0
  14. {eric_tools-1.3.1 → eric_tools-1.3.3}/eric_tools/async_queue.py +0 -0
  15. {eric_tools-1.3.1 → eric_tools-1.3.3}/eric_tools/convert_json.py +0 -0
  16. {eric_tools-1.3.1 → eric_tools-1.3.3}/eric_tools/decorator.py +0 -0
  17. {eric_tools-1.3.1 → eric_tools-1.3.3}/eric_tools/downloader.py +0 -0
  18. {eric_tools-1.3.1 → eric_tools-1.3.3}/eric_tools/encryption_classmethod.py +0 -0
  19. {eric_tools-1.3.1 → eric_tools-1.3.3}/eric_tools/excel_generator.py +0 -0
  20. {eric_tools-1.3.1 → eric_tools-1.3.3}/eric_tools/exception_class.py +0 -0
  21. {eric_tools-1.3.1 → eric_tools-1.3.3}/eric_tools/ip.py +0 -0
  22. {eric_tools-1.3.1 → eric_tools-1.3.3}/eric_tools/jwt_encrypt.py +0 -0
  23. {eric_tools-1.3.1 → eric_tools-1.3.3}/eric_tools/logMixin.py +0 -0
  24. {eric_tools-1.3.1 → eric_tools-1.3.3}/eric_tools/logger.py +0 -0
  25. {eric_tools-1.3.1 → eric_tools-1.3.3}/eric_tools/nginx_log.py +0 -0
  26. {eric_tools-1.3.1 → eric_tools-1.3.3}/eric_tools/pgsql.py +0 -0
  27. {eric_tools-1.3.1 → eric_tools-1.3.3}/eric_tools/readconfig.py +0 -0
  28. {eric_tools-1.3.1 → eric_tools-1.3.3}/eric_tools/remove.py +0 -0
  29. {eric_tools-1.3.1 → eric_tools-1.3.3}/eric_tools/resize_image.py +0 -0
  30. {eric_tools-1.3.1 → eric_tools-1.3.3}/eric_tools/sftp.py +0 -0
  31. {eric_tools-1.3.1 → eric_tools-1.3.3}/eric_tools.egg-info/dependency_links.txt +0 -0
  32. {eric_tools-1.3.1 → eric_tools-1.3.3}/eric_tools.egg-info/requires.txt +0 -0
  33. {eric_tools-1.3.1 → eric_tools-1.3.3}/eric_tools.egg-info/top_level.txt +0 -0
  34. {eric_tools-1.3.1 → eric_tools-1.3.3}/setup.cfg +0 -0
@@ -0,0 +1,72 @@
1
+ Metadata-Version: 2.1
2
+ Name: eric_tools
3
+ Version: 1.3.3
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
+
17
+ # Tools
18
+ [![License](https://img.shields.io/:license-apache-blue.svg)](https://opensource.org/licenses/Apache-2.0)
19
+ ![latest 1.3.3](https://img.shields.io/badge/latest-1.3.3-green.svg?style=flat)
20
+ ![GitHub commits since latest release](https://img.shields.io/github/commits-since/eric-jxl/Tools/latest)
21
+ [![Publish Python Package](https://github.com/eric-jxl/Tools/actions/workflows/publish-pypi.yml/badge.svg)](https://github.com/eric-jxl/Tools/actions/workflows/publish-pypi.yml)
22
+
23
+
24
+ [Reids](https://eric-jxl.github.io/bak/index.html)
25
+
26
+ #### Project management of Python daily tools
27
+
28
+ ```shell
29
+ pip install eric_tools
30
+ ```
31
+
32
+
33
+
34
+ | 文件名 | 说明 |
35
+ | :----------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------: |
36
+ | [encryption_classmethod.py ](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/Abstract.py) | HMAC+MD5加密签名算法 |
37
+ | [exception_class.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/exception_class.py) | 异常类 |
38
+ | [resize_image.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/resize_image.py) | 图片压缩 |
39
+ | [ip.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/ip.py) | ip地址定位API |
40
+ | [logger.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/logger.py) | 日志模块类和高级日志装饰器 |
41
+ | [remove.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/remove.py) | 删除文件 |
42
+ | [send_email.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/send_email.py) | 发送邮件 |
43
+ | [sftp.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/sftp.py) | ssh远程下载文件 |
44
+ | [pgsql.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/pgsql.py) | postgresql CRUD |
45
+ | [readconfig.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/readconfig.py) | 读取.ini配置文件 |
46
+ | [jwt_encrypt.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/jwt_encrypt.py) | 生成jwt Access Token 加密及解密 |
47
+ | [convert_json.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/convert_json.py) | 支持json和object之间转换 |
48
+ | [Abstract.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/Abstract.py) | 抽象类模型 |
49
+ | [decorator.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/decorator.py) | 惰性属性装饰器 |
50
+ | [async_queue.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/async_queue.py) | 异步队列 |
51
+ | [downloader.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/downloader.py) | 下载器 |
52
+ | [logMixin.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/logMixin.py) | 日志元类和高级日志装饰器 |
53
+ | [nginx_log.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/nginx_log.py) | nginx日志解析(默认access.log) |
54
+
55
+
56
+
57
+
58
+
59
+ >[!TIP]
60
+ >
61
+ > * async_queue.py 异步队列操作
62
+ >
63
+ > * downloader.py 下载器
64
+ >
65
+ > * logMixIn.py 日志元类和高级日志装饰器
66
+ >
67
+ > * nginx_log.py nginx日志解析(默认access.log)
68
+ >
69
+ > * dynamic_settings 一个动态加载配置类(支持toml、yml、conf、csv、ini等)
70
+ >
71
+
72
+
@@ -0,0 +1,54 @@
1
+ # Tools
2
+ [![License](https://img.shields.io/:license-apache-blue.svg)](https://opensource.org/licenses/Apache-2.0)
3
+ ![latest 1.3.3](https://img.shields.io/badge/latest-1.3.3-green.svg?style=flat)
4
+ ![GitHub commits since latest release](https://img.shields.io/github/commits-since/eric-jxl/Tools/latest)
5
+ [![Publish Python Package](https://github.com/eric-jxl/Tools/actions/workflows/publish-pypi.yml/badge.svg)](https://github.com/eric-jxl/Tools/actions/workflows/publish-pypi.yml)
6
+
7
+
8
+ [Reids](https://eric-jxl.github.io/bak/index.html)
9
+
10
+ #### Project management of Python daily tools
11
+
12
+ ```shell
13
+ pip install eric_tools
14
+ ```
15
+
16
+
17
+
18
+ | 文件名 | 说明 |
19
+ | :----------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------: |
20
+ | [encryption_classmethod.py ](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/Abstract.py) | HMAC+MD5加密签名算法 |
21
+ | [exception_class.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/exception_class.py) | 异常类 |
22
+ | [resize_image.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/resize_image.py) | 图片压缩 |
23
+ | [ip.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/ip.py) | ip地址定位API |
24
+ | [logger.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/logger.py) | 日志模块类和高级日志装饰器 |
25
+ | [remove.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/remove.py) | 删除文件 |
26
+ | [send_email.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/send_email.py) | 发送邮件 |
27
+ | [sftp.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/sftp.py) | ssh远程下载文件 |
28
+ | [pgsql.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/pgsql.py) | postgresql CRUD |
29
+ | [readconfig.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/readconfig.py) | 读取.ini配置文件 |
30
+ | [jwt_encrypt.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/jwt_encrypt.py) | 生成jwt Access Token 加密及解密 |
31
+ | [convert_json.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/convert_json.py) | 支持json和object之间转换 |
32
+ | [Abstract.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/Abstract.py) | 抽象类模型 |
33
+ | [decorator.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/decorator.py) | 惰性属性装饰器 |
34
+ | [async_queue.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/async_queue.py) | 异步队列 |
35
+ | [downloader.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/downloader.py) | 下载器 |
36
+ | [logMixin.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/logMixin.py) | 日志元类和高级日志装饰器 |
37
+ | [nginx_log.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/nginx_log.py) | nginx日志解析(默认access.log) |
38
+
39
+
40
+
41
+
42
+
43
+ >[!TIP]
44
+ >
45
+ > * async_queue.py 异步队列操作
46
+ >
47
+ > * downloader.py 下载器
48
+ >
49
+ > * logMixIn.py 日志元类和高级日志装饰器
50
+ >
51
+ > * nginx_log.py nginx日志解析(默认access.log)
52
+ >
53
+ > * dynamic_settings 一个动态加载配置类(支持toml、yml、conf、csv、ini等)
54
+ >
@@ -7,13 +7,14 @@
7
7
  from . import decorator, Abstract, convert_json, jwt_encrypt, send_email, readconfig, sftp
8
8
  from . import ip, logger, resize_image, exception_class, pgsql, encryption_classmethod
9
9
  from . import async_queue, downloader, logMixin, nginx_log, excel_generator
10
+ from .dynamic_settings import DynamicConfig
10
11
 
11
12
 
12
13
  name = 'Eric-Tools'
13
14
  __title__ = 'tools'
14
15
  __description__ = 'Python HTTP for Humans.'
15
- __version__ = "1.3.1"
16
+ __version__ = "1.3.3"
16
17
  __author__ = 'Eric'
17
18
  __doc__ = ["Python Daily Development Tools"]
18
19
  __url__ = "https://github.com/Eric-jxl/Tools"
19
- __license__ = "Apache"
20
+ __license__ = "MIT License"
@@ -0,0 +1,174 @@
1
+ import os
2
+ import yaml
3
+ import toml
4
+ import csv
5
+ import configparser
6
+ import logging
7
+ from collections.abc import MutableMapping
8
+ from watchdog.observers import Observer
9
+ from watchdog.events import FileSystemEventHandler
10
+ from flask import Flask, jsonify, redirect
11
+
12
+ logging.basicConfig(level=logging.INFO)
13
+ logger = logging.getLogger(__file__.rsplit("/", 1)[1])
14
+
15
+ __all__ = ["DynamicConfig"]
16
+
17
+ # Flask Web Service for testing
18
+ app = Flask(__name__)
19
+
20
+
21
+ class ConfigFileHandler(FileSystemEventHandler):
22
+ """Handles file changes and reloads the configuration."""
23
+
24
+ def __init__(self, config, file_path):
25
+ self.config = config
26
+ self.file_path = file_path
27
+
28
+ def on_modified(self, event):
29
+ if event.src_path == self.file_path:
30
+ print(f"Configuration file {self.file_path} changed, reloading...")
31
+ self.config.force_reload(self.file_path)
32
+
33
+
34
+ class DynamicConfig(MutableMapping):
35
+ def __init__(self, watch_file=None, **kwargs):
36
+ self.watch_file = watch_file
37
+ self.config = kwargs # Support setting variables directly
38
+
39
+ if watch_file:
40
+ self.load(watch_file)
41
+ self._start_watching()
42
+
43
+ def _start_watching(self):
44
+ """Starts a background thread to monitor file changes."""
45
+ event_handler = ConfigFileHandler(self, self.watch_file)
46
+ observer = Observer()
47
+ observer.schedule(event_handler, path=os.path.dirname(
48
+ self.watch_file) or ".", recursive=False)
49
+ observer.start()
50
+ self._observer = observer
51
+
52
+ def load(self, file_path=None):
53
+ """Loads configuration from a file and merges with existing values."""
54
+ if file_path:
55
+ self.file_path = file_path
56
+
57
+ if not self.file_path or not os.path.exists(self.file_path):
58
+ logger.error(f"Configuration file '{self.file_path}' not found.")
59
+ return
60
+
61
+ loaders = {
62
+ ".yml": self._load_yaml, ".yaml": self._load_yaml,
63
+ ".toml": self._load_toml, ".csv": self._load_csv,
64
+ ".conf": self._load_conf, ".ini": self._load_conf
65
+ }
66
+
67
+ ext = os.path.splitext(self.file_path)[-1].lower()
68
+ if ext not in loaders:
69
+ raise ValueError(f"Unsupported file format: {ext}")
70
+
71
+ file_config = loaders[ext](self.file_path, self.config)
72
+
73
+ logger.debug("Updated Config:", self.config) # Debugging
74
+
75
+ def force_reload(self):
76
+ """Manually trigger configuration reload (used in watchdog)."""
77
+ logger.info("Force reloading configuration...")
78
+ if self.watch_file:
79
+ self.load(self.watch_file)
80
+
81
+ def _load_yaml(self, file_path, config):
82
+ with open(file_path, 'r', encoding='utf-8') as f:
83
+ config.update(yaml.safe_load(f) or {})
84
+
85
+ def _load_toml(self, file_path, config):
86
+ with open(file_path, 'r', encoding='utf-8') as f:
87
+ config.update(toml.load(f))
88
+
89
+ def _load_csv(self, file_path, config):
90
+ with open(file_path, 'r', encoding='utf-8') as f:
91
+ reader = csv.reader(f)
92
+ config.update({row[0]: row[1] for row in reader if len(row) >= 2})
93
+
94
+ def _load_conf(self, file_path, config):
95
+ parser = configparser.ConfigParser()
96
+ parser.read(file_path, encoding='utf-8')
97
+ for section in parser.sections():
98
+ for key, value in parser.items(section):
99
+ config[f"{section}.{key}"] = value
100
+
101
+ def set(self, key, value):
102
+ """Sets a configuration variable."""
103
+ self.config[key] = value
104
+
105
+ def get(self, key, default=None):
106
+ """支持多层级 `.` 分隔键访问,如 `config.get("database.host")`"""
107
+ if key in self.config:
108
+ return self.config[key]
109
+ keys = key.split(".") # 按 `.` 分割多级键
110
+ value = self.config # 从 `self.config` 开始查找
111
+
112
+ try:
113
+ for k in keys:
114
+ if isinstance(value, dict): # 如果是字典,继续查找键
115
+ value = value[k]
116
+ elif isinstance(value, list) and k.isdigit(): # 如果是列表,并且 k 是索引
117
+ value = value[int(k)]
118
+ else:
119
+ return default # 找不到,返回默认值
120
+ return value
121
+ except (KeyError, IndexError, TypeError):
122
+ return default # 访问失败,返回默认值
123
+
124
+ def __getitem__(self, key):
125
+ return self.config[key]
126
+
127
+ def __setitem__(self, key, value):
128
+ self.config[key] = value
129
+
130
+ def __delitem__(self, key):
131
+ del self.config[key]
132
+
133
+ def __iter__(self):
134
+ return iter(self.config)
135
+
136
+ def __len__(self):
137
+ return len(self.config)
138
+
139
+ def __repr__(self):
140
+ return f"DynamicConfig({self.config})"
141
+
142
+ def stop_watching(self):
143
+ """Stops the file watcher."""
144
+ if hasattr(self, "_observer"):
145
+ self._observer.stop()
146
+ self._observer.join()
147
+
148
+
149
+ config = DynamicConfig("config.yml", debug=True, mode="production")
150
+
151
+
152
+ @app.route("/", methods=["GET"])
153
+ def index():
154
+ return redirect("/config/")
155
+
156
+
157
+ @app.route("/config/", methods=["GET"])
158
+ def get_config():
159
+ config.force_reload()
160
+ return jsonify(config.config)
161
+
162
+
163
+ @app.route("/config/<path:key>", methods=["GET"]) # ✅ 允许 `/` 作为 key 的一部分
164
+ def get_config_key(key):
165
+ """获取指定配置项的值,并支持自动重新加载"""
166
+ config.force_reload() # ✅ 先重新加载配置
167
+ value = config.get(key) # ✅ 取值
168
+ if value is None:
169
+ return jsonify({"error": "Key not found"}), 404 # ✅ 404 + 友好错误信息
170
+ return jsonify(value)
171
+
172
+
173
+ if __name__ == "__main__":
174
+ app.run(host="0.0.0.0", port=5001, debug=True)
@@ -10,26 +10,22 @@ __doc__ = ["测试QQ邮箱,pwd为邮箱授权码"]
10
10
  import smtplib
11
11
  from email.mime.text import MIMEText
12
12
  from email.utils import formataddr
13
- import sys
14
- reload(sys)
15
- sys.setdefaultencoding("utf-8")
16
13
 
17
14
 
18
-
19
-
20
- def mail(send_email,receive_email,send_nickname,receive_nickname,pwd):
15
+ def mail(send_email, receive_email, send_nickname, receive_nickname, pwd):
21
16
  try:
22
17
  msg = MIMEText('Test QQ Email', 'plain', 'utf-8')
23
- msg['From'] = formataddr([send_nickname, send_email]) # 括号里的对应发件人邮箱昵称、发件人邮箱账号
24
- msg['To'] = formataddr([receive_nickname, receive_email]) # 括号里的对应收件人邮箱昵称、收件人邮箱账号
25
- msg['Subject'] = str("发送邮件测试").decode('utf-8') # 邮件的主题,也可以说是标题
18
+ # 括号里的对应发件人邮箱昵称、发件人邮箱账号
19
+ msg['From'] = formataddr([send_nickname, send_email])
20
+ # 括号里的对应收件人邮箱昵称、收件人邮箱账号
21
+ msg['To'] = formataddr([receive_nickname, receive_email])
22
+ msg['Subject'] = "发送邮件测试" # 邮件的主题,也可以说是标题
26
23
 
27
24
  server = smtplib.SMTP_SSL("smtp.qq.com", 465) # 发件人邮箱中的SMTP服务器,端口是25
28
25
  server.login(send_email, pwd)
29
- server.sendmail(send_email, [receive_email, ], msg.as_string()) # 括号中对应的是发件人邮箱账号、收件人邮箱账号、发送邮件
26
+ # 括号中对应的是发件人邮箱账号、收件人邮箱账号、发送邮件
27
+ server.sendmail(send_email, [receive_email, ], msg.as_string())
30
28
  server.quit() # 关闭连接
31
29
  except Exception as e:
32
- print '发送邮件失败:%s' % e
30
+ print('发送邮件失败:%s' % e)
33
31
  return e
34
-
35
-
@@ -0,0 +1,72 @@
1
+ Metadata-Version: 2.1
2
+ Name: eric-tools
3
+ Version: 1.3.3
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
+
17
+ # Tools
18
+ [![License](https://img.shields.io/:license-apache-blue.svg)](https://opensource.org/licenses/Apache-2.0)
19
+ ![latest 1.3.3](https://img.shields.io/badge/latest-1.3.3-green.svg?style=flat)
20
+ ![GitHub commits since latest release](https://img.shields.io/github/commits-since/eric-jxl/Tools/latest)
21
+ [![Publish Python Package](https://github.com/eric-jxl/Tools/actions/workflows/publish-pypi.yml/badge.svg)](https://github.com/eric-jxl/Tools/actions/workflows/publish-pypi.yml)
22
+
23
+
24
+ [Reids](https://eric-jxl.github.io/bak/index.html)
25
+
26
+ #### Project management of Python daily tools
27
+
28
+ ```shell
29
+ pip install eric_tools
30
+ ```
31
+
32
+
33
+
34
+ | 文件名 | 说明 |
35
+ | :----------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------: |
36
+ | [encryption_classmethod.py ](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/Abstract.py) | HMAC+MD5加密签名算法 |
37
+ | [exception_class.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/exception_class.py) | 异常类 |
38
+ | [resize_image.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/resize_image.py) | 图片压缩 |
39
+ | [ip.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/ip.py) | ip地址定位API |
40
+ | [logger.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/logger.py) | 日志模块类和高级日志装饰器 |
41
+ | [remove.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/remove.py) | 删除文件 |
42
+ | [send_email.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/send_email.py) | 发送邮件 |
43
+ | [sftp.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/sftp.py) | ssh远程下载文件 |
44
+ | [pgsql.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/pgsql.py) | postgresql CRUD |
45
+ | [readconfig.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/readconfig.py) | 读取.ini配置文件 |
46
+ | [jwt_encrypt.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/jwt_encrypt.py) | 生成jwt Access Token 加密及解密 |
47
+ | [convert_json.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/convert_json.py) | 支持json和object之间转换 |
48
+ | [Abstract.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/Abstract.py) | 抽象类模型 |
49
+ | [decorator.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/decorator.py) | 惰性属性装饰器 |
50
+ | [async_queue.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/async_queue.py) | 异步队列 |
51
+ | [downloader.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/downloader.py) | 下载器 |
52
+ | [logMixin.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/logMixin.py) | 日志元类和高级日志装饰器 |
53
+ | [nginx_log.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/nginx_log.py) | nginx日志解析(默认access.log) |
54
+
55
+
56
+
57
+
58
+
59
+ >[!TIP]
60
+ >
61
+ > * async_queue.py 异步队列操作
62
+ >
63
+ > * downloader.py 下载器
64
+ >
65
+ > * logMixIn.py 日志元类和高级日志装饰器
66
+ >
67
+ > * nginx_log.py nginx日志解析(默认access.log)
68
+ >
69
+ > * dynamic_settings 一个动态加载配置类(支持toml、yml、conf、csv、ini等)
70
+ >
71
+
72
+
@@ -7,6 +7,7 @@ eric_tools/async_queue.py
7
7
  eric_tools/convert_json.py
8
8
  eric_tools/decorator.py
9
9
  eric_tools/downloader.py
10
+ eric_tools/dynamic_settings.py
10
11
  eric_tools/encryption_classmethod.py
11
12
  eric_tools/excel_generator.py
12
13
  eric_tools/exception_class.py
@@ -7,7 +7,7 @@ with open("README.md", "r") as fh:
7
7
 
8
8
  setuptools.setup(
9
9
  name="eric_tools",
10
- version="1.3.1",
10
+ version="1.3.3",
11
11
  author="Eric",
12
12
  author_email="jxleric95@gmail.com",
13
13
  description="Python Daily Development Tools",
eric_tools-1.3.1/PKG-INFO DELETED
@@ -1,70 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: eric_tools
3
- Version: 1.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
-
17
- # Tools
18
- [![License](https://img.shields.io/:license-apache-blue.svg)](https://opensource.org/licenses/Apache-2.0)
19
- ![latest 1.3](https://img.shields.io/badge/latest-1.3-green.svg?style=flat)
20
- ![GitHub commits since latest release](https://img.shields.io/github/commits-since/eric-jxl/Tools/latest)
21
-
22
-
23
- [New Year](https://eric-jxl.github.io/bak/index.html)
24
-
25
- #### Project management of Python daily tools
26
-
27
- ```shell
28
- pip install eric_tools
29
- ```
30
-
31
-
32
-
33
- | 文件名 | 说明 |
34
- | :----------------------------------------------------------: | :-----------------------------: |
35
- | [encryption_classmethod.py ](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/Abstract.py) | HMAC+MD5加密签名算法 |
36
- | [exception_class.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/exception_class.py) | 异常类 |
37
- | [resize_image.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/resize_image.py) | 图片压缩 |
38
- | [ip.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/ip.py) | ip地址定位API |
39
- | [logger.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/logger.py) | 日志模块类和高级日志装饰器 |
40
- | [remove.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/remove.py) | 删除文件 |
41
- | [send_email.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/send_email.py) | 发送邮件 |
42
- | [sftp.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/sftp.py) | ssh远程下载文件 |
43
- | [pgsql.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/pgsql.py) | postgresql CRUD |
44
- | [readconfig.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/readconfig.py) | 读取.ini配置文件 |
45
- | [jwt_encrypt.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/jwt_encrypt.py) | 生成jwt Access Token 加密及解密 |
46
- | [convert_json.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/convert_json.py) | 支持json和object之间转换 |
47
- | [Abstract.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/Abstract.py) | 抽象类模型 |
48
- | [decorator.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/decorator.py) | 惰性属性装饰器 |
49
- | [async_queue.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/async_queue.py) | 异步队列 |
50
- | [downloader.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/downloader.py) | 下载器 |
51
- | [logMixIn.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/logMixIn.py) | 日志元类和高级日志装饰器 |
52
- | [nginx_log.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/nginx_log.py) | nginx日志解析(默认access.log) |
53
-
54
-
55
-
56
-
57
-
58
- >[!TIP]
59
- >
60
- > * async_queue.py 异步队列操作
61
- >
62
- > * downloader.py 下载器
63
- >
64
- > * logMixIn.py 日志元类和高级日志装饰器
65
- >
66
- > * nginx_log.py nginx日志解析(默认access.log)
67
- >
68
- > * [eric-tools==1.3](https://pypi.org/project/eric-tools/1.3/)
69
-
70
-
@@ -1,52 +0,0 @@
1
- # Tools
2
- [![License](https://img.shields.io/:license-apache-blue.svg)](https://opensource.org/licenses/Apache-2.0)
3
- ![latest 1.3](https://img.shields.io/badge/latest-1.3-green.svg?style=flat)
4
- ![GitHub commits since latest release](https://img.shields.io/github/commits-since/eric-jxl/Tools/latest)
5
-
6
-
7
- [New Year](https://eric-jxl.github.io/bak/index.html)
8
-
9
- #### Project management of Python daily tools
10
-
11
- ```shell
12
- pip install eric_tools
13
- ```
14
-
15
-
16
-
17
- | 文件名 | 说明 |
18
- | :----------------------------------------------------------: | :-----------------------------: |
19
- | [encryption_classmethod.py ](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/Abstract.py) | HMAC+MD5加密签名算法 |
20
- | [exception_class.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/exception_class.py) | 异常类 |
21
- | [resize_image.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/resize_image.py) | 图片压缩 |
22
- | [ip.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/ip.py) | ip地址定位API |
23
- | [logger.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/logger.py) | 日志模块类和高级日志装饰器 |
24
- | [remove.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/remove.py) | 删除文件 |
25
- | [send_email.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/send_email.py) | 发送邮件 |
26
- | [sftp.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/sftp.py) | ssh远程下载文件 |
27
- | [pgsql.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/pgsql.py) | postgresql CRUD |
28
- | [readconfig.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/readconfig.py) | 读取.ini配置文件 |
29
- | [jwt_encrypt.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/jwt_encrypt.py) | 生成jwt Access Token 加密及解密 |
30
- | [convert_json.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/convert_json.py) | 支持json和object之间转换 |
31
- | [Abstract.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/Abstract.py) | 抽象类模型 |
32
- | [decorator.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/decorator.py) | 惰性属性装饰器 |
33
- | [async_queue.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/async_queue.py) | 异步队列 |
34
- | [downloader.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/downloader.py) | 下载器 |
35
- | [logMixIn.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/logMixIn.py) | 日志元类和高级日志装饰器 |
36
- | [nginx_log.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/nginx_log.py) | nginx日志解析(默认access.log) |
37
-
38
-
39
-
40
-
41
-
42
- >[!TIP]
43
- >
44
- > * async_queue.py 异步队列操作
45
- >
46
- > * downloader.py 下载器
47
- >
48
- > * logMixIn.py 日志元类和高级日志装饰器
49
- >
50
- > * nginx_log.py nginx日志解析(默认access.log)
51
- >
52
- > * [eric-tools==1.3](https://pypi.org/project/eric-tools/1.3/)
@@ -1,70 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: eric-tools
3
- Version: 1.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
-
17
- # Tools
18
- [![License](https://img.shields.io/:license-apache-blue.svg)](https://opensource.org/licenses/Apache-2.0)
19
- ![latest 1.3](https://img.shields.io/badge/latest-1.3-green.svg?style=flat)
20
- ![GitHub commits since latest release](https://img.shields.io/github/commits-since/eric-jxl/Tools/latest)
21
-
22
-
23
- [New Year](https://eric-jxl.github.io/bak/index.html)
24
-
25
- #### Project management of Python daily tools
26
-
27
- ```shell
28
- pip install eric_tools
29
- ```
30
-
31
-
32
-
33
- | 文件名 | 说明 |
34
- | :----------------------------------------------------------: | :-----------------------------: |
35
- | [encryption_classmethod.py ](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/Abstract.py) | HMAC+MD5加密签名算法 |
36
- | [exception_class.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/exception_class.py) | 异常类 |
37
- | [resize_image.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/resize_image.py) | 图片压缩 |
38
- | [ip.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/ip.py) | ip地址定位API |
39
- | [logger.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/logger.py) | 日志模块类和高级日志装饰器 |
40
- | [remove.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/remove.py) | 删除文件 |
41
- | [send_email.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/send_email.py) | 发送邮件 |
42
- | [sftp.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/sftp.py) | ssh远程下载文件 |
43
- | [pgsql.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/pgsql.py) | postgresql CRUD |
44
- | [readconfig.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/readconfig.py) | 读取.ini配置文件 |
45
- | [jwt_encrypt.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/jwt_encrypt.py) | 生成jwt Access Token 加密及解密 |
46
- | [convert_json.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/convert_json.py) | 支持json和object之间转换 |
47
- | [Abstract.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/Abstract.py) | 抽象类模型 |
48
- | [decorator.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/decorator.py) | 惰性属性装饰器 |
49
- | [async_queue.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/async_queue.py) | 异步队列 |
50
- | [downloader.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/downloader.py) | 下载器 |
51
- | [logMixIn.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/logMixIn.py) | 日志元类和高级日志装饰器 |
52
- | [nginx_log.py](https://github.com/eric-jxl/Tools/blob/62f538a1d34df869722c68e3ea5df222bdd1605e/eric_tools/nginx_log.py) | nginx日志解析(默认access.log) |
53
-
54
-
55
-
56
-
57
-
58
- >[!TIP]
59
- >
60
- > * async_queue.py 异步队列操作
61
- >
62
- > * downloader.py 下载器
63
- >
64
- > * logMixIn.py 日志元类和高级日志装饰器
65
- >
66
- > * nginx_log.py nginx日志解析(默认access.log)
67
- >
68
- > * [eric-tools==1.3](https://pypi.org/project/eric-tools/1.3/)
69
-
70
-
File without changes
File without changes
File without changes