guan-0.1.2

This commit is contained in:
guanjihuan 2023-10-23 17:04:08 +08:00
parent deb8e3e391
commit 7c5091ab45
3 changed files with 27 additions and 27 deletions

View File

@ -1,4 +1,4 @@
# API Reference shows all functions in Guan package. The current version is guan-0.1.1 updated on December 23, 2023. # API Reference shows all functions in Guan package. The current version is guan-0.1.2 updated on December 23, 2023.
import guan import guan
@ -936,12 +936,6 @@ hashed_password = guan.encryption_SHA_256(password, salt='')
# 获取CPU使用率 # 获取CPU使用率
cpu_usage = guan.get_cpu_usage(interval=1) cpu_usage = guan.get_cpu_usage(interval=1)
# 获取当前日期字符串
datetime_date = guan.get_date(bar=True)
# 获取当前时间字符串
datetime_time = guan.get_time()
# 获取本月的所有日期 # 获取本月的所有日期
day_array = guan.get_days_of_the_current_month(str_or_datetime='str') day_array = guan.get_days_of_the_current_month(str_or_datetime='str')
@ -990,6 +984,12 @@ current_function_name = guan.get_current_function_name()
# 获取调用本函数的函数名 # 获取调用本函数的函数名
calling_function_name = guan.get_calling_function_name(layer=1) calling_function_name = guan.get_calling_function_name(layer=1)
# 获取当前日期字符串
datetime_date = guan.get_date(bar=True)
# 获取当前时间字符串
datetime_time = guan.get_time()
# Guan软件包的使用统计不涉及到用户的个人数据 # Guan软件包的使用统计不涉及到用户的个人数据
guan.statistics_of_guan_package() guan.statistics_of_guan_package()

View File

@ -1,7 +1,7 @@
[metadata] [metadata]
# replace with your username: # replace with your username:
name = guan name = guan
version = 0.1.1 version = 0.1.2
author = guanjihuan author = guanjihuan
author_email = guanjihuan@163.com author_email = guanjihuan@163.com
description = An open source python package description = An open source python package

View File

@ -1,6 +1,6 @@
# Guan is an open-source python package developed and maintained by https://www.guanjihuan.com/about (Ji-Huan Guan, 关济寰). The primary location of this package is on website https://py.guanjihuan.com. GitHub link: https://github.com/guanjihuan/py.guanjihuan.com. # Guan is an open-source python package developed and maintained by https://www.guanjihuan.com/about (Ji-Huan Guan, 关济寰). The primary location of this package is on website https://py.guanjihuan.com. GitHub link: https://github.com/guanjihuan/py.guanjihuan.com.
# The current version is guan-0.1.1, updated on December 23, 2023. # The current version is guan-0.1.2, updated on December 23, 2023.
# Installation: pip install --upgrade guan # Installation: pip install --upgrade guan
@ -4530,24 +4530,6 @@ def get_cpu_usage(interval=1):
guan.statistics_of_guan_package() guan.statistics_of_guan_package()
return cpu_usage return cpu_usage
# 获取当前日期字符串
def get_date(bar=True):
import datetime
datetime_date = str(datetime.date.today())
if bar==False:
datetime_date = datetime_date.replace('-', '')
import guan
guan.statistics_of_guan_package()
return datetime_date
# 获取当前时间字符串
def get_time():
import datetime
datetime_time = datetime.datetime.now().strftime('%H:%M:%S')
import guan
guan.statistics_of_guan_package()
return datetime_time
# 获取本月的所有日期 # 获取本月的所有日期
def get_days_of_the_current_month(str_or_datetime='str'): def get_days_of_the_current_month(str_or_datetime='str'):
import datetime import datetime
@ -4898,6 +4880,24 @@ def get_calling_function_name(layer=1):
calling_function_name = caller.function calling_function_name = caller.function
return calling_function_name return calling_function_name
# 获取当前日期字符串
def get_date(bar=True):
import datetime
datetime_date = str(datetime.date.today())
if bar==False:
datetime_date = datetime_date.replace('-', '')
import guan
guan.statistics_of_guan_package()
return datetime_date
# 获取当前时间字符串
def get_time():
import datetime
datetime_time = datetime.datetime.now().strftime('%H:%M:%S')
import guan
guan.statistics_of_guan_package()
return datetime_time
# Guan软件包的使用统计不涉及到用户的个人数据 # Guan软件包的使用统计不涉及到用户的个人数据
def statistics_of_guan_package(): def statistics_of_guan_package():
try: try: