Skip to main content

DerrickTools工具

提供包含但不限于各种加密算法的实现、时间戳和各种格式时间字符串之间的转换等功能

安装

pip install derrick-tools

使用

  • 日期时间工具

from DerrickTools.engine.datetime.main import DateTimeTool    # 导入function_tool_derrick.UsualTool下的DateTimeTool类

if __name__ == '__main__':
    print(DateTimeTool.timestamp2time(1681721029)) # 打印 2023-04-17 16:43:49
    print(DateTimeTool.time2timestamp('2023-04-17 16:43:49')) # 打印 1681721029

    ret = DateTimeTool.get_range_of_date_by_str('2022-02-02 15:30:28', formatter='%Y-%m-%d %H:%M:%S', tsType=TimestampType.MILLISECOND)
    print(ret) # 打印 [1643731200000, 1643817599999]

    print(DateTimeTool.get_difference_between_time('2024-02-20 08:30:00', '2024-02-20 08:31:30'))   # 打印90
  • 加密算法工具

    from DerrickTools.engine.secret.main import Encoder, Decoder
    md5_secret_text = Encoder.md5_encode("你好")
    print(md5_secret_text)
    
    origin_text = "Hello World"
    bs64_str = Encoder.base64_encode(origin_text)
    decoder_str = Decoder.base64_decode(bs64_str)
    print(bs64_str, decoder_str)
    

Metadata

Release files for derrick-tool 0.0.1

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

Source distribution (sdist)

Source distribution for derrick-tool 0.0.1
File Size Uploaded Provenance Actions
derrick-tool-0.0.1.tar.gz 4.8 kB Without provenance Details for derrick-tool-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for derrick-tool 0.0.1
File Interpreter ABI Platform Actions
derrick_tool-0.0.1-py3-none-any.whl Python 3 none any Details for derrick_tool-0.0.1-py3-none-any.whl

Total release size: 11.4 kB

Release files / derrick-tool-0.0.1.tar.gz

Download URL derrick-tool-0.0.1.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f8cdccd2899a8d66e46287d5026587831b059e3e013802125f03bb61fbe9c524
BLAKE2b-256 checksum
How to use checksums
f2ded3dead5605a94a6d3badd772647708dc43e649f448f5121f646f748da869
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.8.19

Release files / derrick_tool-0.0.1-py3-none-any.whl

Download URL derrick_tool-0.0.1-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
16e0a84a4f7e03d296249cfaa5a4a466e7c7829448a649f41e9b7b6738dbf840
BLAKE2b-256 checksum
How to use checksums
a7a972b49efd8266e7c784794ac4bf6af16cd61ea1d41e44e011006122ffcdcb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.8.19

Security for derrick-tool 0.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.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

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