codosdk 1.0.3__tar.gz → 1.0.5__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.
- {codosdk-1.0.3 → codosdk-1.0.5}/PKG-INFO +1 -1
- {codosdk-1.0.3 → codosdk-1.0.5}/codosdk.egg-info/PKG-INFO +1 -1
- {codosdk-1.0.3 → codosdk-1.0.5}/setup.py +1 -1
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/utils/__init__.py +7 -2
- {codosdk-1.0.3 → codosdk-1.0.5}/LICENSE +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/README.md +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/codosdk.egg-info/SOURCES.txt +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/codosdk.egg-info/dependency_links.txt +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/codosdk.egg-info/requires.txt +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/codosdk.egg-info/top_level.txt +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/opssdk/__init__.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/opssdk/utils/__init__.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/pyproject.toml +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/setup.cfg +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/__init__.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/api_set.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/apis/__init__.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/apis/admin_apis.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/apis/agent_apis.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/apis/cmdb_apis.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/apis/kerrigan_apis.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/apis/mgv4_apis.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/apis/task_apis.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/application.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/base_handler.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/cache.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/cache_context.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/client.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/cloud/__init__.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/cloud/qcloud_api.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/cloud/ucloud_api.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/cloud_utils.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/configs.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/consts.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/db_context.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/error.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/fetch_coroutine.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/jwt_token.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/ldap.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/logger.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/model_utils.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/mqhelper.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/program.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/salt_api.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/sqlalchemy_pagination.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/tools.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/utils/cc_crypto.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/utils/date_format.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/utils/pydantic_utils.py +0 -0
- {codosdk-1.0.3 → codosdk-1.0.5}/websdk2/web_logs.py +0 -0
|
@@ -10,12 +10,13 @@ Desc :
|
|
|
10
10
|
import os
|
|
11
11
|
import time
|
|
12
12
|
import json
|
|
13
|
+
import uuid
|
|
13
14
|
import socket
|
|
14
15
|
import smtplib
|
|
16
|
+
from datetime import datetime
|
|
15
17
|
from ..consts import const
|
|
16
18
|
from email.mime.text import MIMEText
|
|
17
19
|
from email.mime.multipart import MIMEMultipart
|
|
18
|
-
import uuid
|
|
19
20
|
|
|
20
21
|
|
|
21
22
|
class SendMail(object):
|
|
@@ -92,7 +93,6 @@ class SendMail(object):
|
|
|
92
93
|
return False
|
|
93
94
|
|
|
94
95
|
|
|
95
|
-
|
|
96
96
|
def mail_login(user, password, mail_server='smtp.exmail.qq.com'):
|
|
97
97
|
### 模拟登录来验证邮箱
|
|
98
98
|
try:
|
|
@@ -165,6 +165,7 @@ def get_contain_dict(src_data: dict, dst_data: dict) -> bool:
|
|
|
165
165
|
else:
|
|
166
166
|
return True
|
|
167
167
|
|
|
168
|
+
|
|
168
169
|
def now_time_stamp() -> int:
|
|
169
170
|
"""
|
|
170
171
|
秒时间戳
|
|
@@ -192,6 +193,10 @@ def get_node_topic(node=False):
|
|
|
192
193
|
return f'{socket.gethostname()}--mac-{mac}'
|
|
193
194
|
|
|
194
195
|
|
|
196
|
+
def echo_datetime_now_f():
|
|
197
|
+
return datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f')
|
|
198
|
+
|
|
199
|
+
|
|
195
200
|
### 令牌桶限流
|
|
196
201
|
'''
|
|
197
202
|
示例
|
|
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
|
|
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
|