Skip to content

Commit

Permalink
2024年7月15日 添加时间字符串获取包含微妙部分
Browse files Browse the repository at this point in the history
  • Loading branch information
ss1917 committed Jul 15, 2024
1 parent 92001f1 commit 0843729
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import sys
from distutils.core import setup

VERSION = '1.0.3'
VERSION = '1.0.4'

if sys.version_info < (2, 7) or (3, 0) <= sys.version_info < (3, 6):
print('This program requires at least Python 2.7 or 3.6 to run.')
Expand Down
10 changes: 8 additions & 2 deletions websdk2/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
import os
import time
import json
import uuid
import socket
import smtplib
from datetime import datetime
from ..consts import const
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
import uuid


class SendMail(object):
Expand Down Expand Up @@ -92,7 +93,6 @@ def send_mail(self, to_list, subject, content, subtype='plain', att=None):
return False



def mail_login(user, password, mail_server='smtp.exmail.qq.com'):
### 模拟登录来验证邮箱
try:
Expand Down Expand Up @@ -165,6 +165,7 @@ def get_contain_dict(src_data: dict, dst_data: dict) -> bool:
else:
return True


def now_time_stamp() -> int:
"""
秒时间戳
Expand Down Expand Up @@ -192,6 +193,11 @@ def get_node_topic(node=False):
return f'{socket.gethostname()}--mac-{mac}'


@staticmethod
def echo_datetime_now_f():
return datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f')


### 令牌桶限流
'''
示例
Expand Down

0 comments on commit 0843729

Please sign in to comment.