Skip to main content

前言

自己常用的函数平常是在是太多了,经常会重复性编写

索性就自己编写一个python包

create by swm 2018/11/20

LICENSE

2018/11/20

增加判断操作系统的方法

修改名字为swmtools

help(swmtools.manytools)查看目前已有方法

2019/03/26

新增了xml,xlsx,csv文件的读取方法,help(readmanyfile)查看具体使用

新增了时间的处理方法,增加了一个计算当前方法运行时间的装饰器,使用help(timeformat)查看具体使用

2021/06/16

新增了单例日志方法,在logging的基础上完成

使用方法

from swmtools import MyLogger
import threading
import time
from datetime import datetime


def ddd():
    logger = MyLogger()
    # print(logger.get_instance())
    # logger.logger.info()
    logger.info(f"Now time is {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")


for i in range(0, 10):
    t = threading.Thread(target=ddd, args=())
    time.sleep(5)
    t.start()

使用方法

线下安装:python setup.py bdist_wheel

线上安装:

测试版:
        pip install -i https://test.pypi.org/simple/swmtools

正式版:
        pip install swmtools

开源许可

当初在大学学习编程时,可以通宵不睡,可以连续3天吃喝都在实验室,那个时候完全感觉不到累, 996不应该是企业强制加给我们的,而是我们在追求自己喜欢的生活中愿意花时间在上面的, 当生存花费了我们太多时间,我们必然是没有时间去提升自己的。

Metadata

Release files for swmtools 3.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for swmtools 3.0.1
File Interpreter ABI Platform Actions
swmtools-3.0.1-py2.py3-none-any.whl Python 3, Python 2 none any Details for swmtools-3.0.1-py2.py3-none-any.whl

Release files / swmtools-3.0.1-py2.py3-none-any.whl

Download URL swmtools-3.0.1-py2.py3-none-any.whl
Size 10.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
4c80e9faee769a0248756e7d75141b5cc97cde3b78a7b055885f124ae406662b
BLAKE2b-256 checksum
How to use checksums
e16fdeb361c80e813c3b1adec5e564bfda262980b507f88f17b809d8ee1753f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

Security for swmtools 3.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page