Skip to main content

toolkit for python

Project description

toolkit for python.

A.Star私房工具包

唉~ 写了辣么多代码,总觉得过于臃肿。 我把简单的代码能重复利用的摘出来作为工具包,以后就引用他了

目前此代码包含一下几部分: 1. data_structure

keymap: 两端键值的类字典 linked_list: 链表 queue: 链式队列

2. error 错误的包

MethodNotFoundError: 方法错误 ParameterError: 参数错误 ParameterTypeError: 参数类型错误 ParameterValueError: 参数值错误

  1. exception

异常的包

  1. file

downloadhelper: 大文件下载 excelhelper: excel生成 filehelper: 简单的文件哈希、文件简单操作 imagehelper: 简单的图片转化,目前对base64转image

  1. number

number包包含数论/数字处理的一些基本代码

equals_zero: 与numpy.isclose类似,只不过这个是专门判断0的

equals_zero_any: 只要有一个为0,则返回True, 否则是False

equals_zero_all: 只有全部为0, 返回True, 否则是False

ishex: 判断是否是16进制字符串

gcd: 辗转相处法求最大公约

lcm: 最小公倍数

prime_factorzation: 筛选法求素数

rotate_left: 循环左移

  1. project

file_logging/std_logging 日志装饰器

_project: 文档模板生成

_platform: 判断当前运行环境操作系统类型

time_clock: 对time.clock的改良,操作系统导致使用错误

  1. random

random 包包含随机数相关的函数

generate_password: 随机密码

random_digit_string: 随机生成n位数字

random_string: 随机生成一个长度为n的字符串

random_hex_string: 随机生成n位16进制字符串

random_ip: 随机生成一个ip地址, 目前只支持IPV4

security_random_hex: 基于国密SM3的KDF

  1. setuptool

包含打包相关的函数

_tool: 调用setup方法之前做一些处理

_version: 版本管理

  1. string

包含字符串处理相关函数

is_email: 判断是不是邮箱

is_mobile: 判断是否是手机号

generate_number: 生成n位带时间编号

check_number: 检验生成n位带时间编号

to_binary: str转bytes

to_text: bytes转str

password_check 检查口令合法性的小工具

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

astartool-0.2.tar.gz (37.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

astartool-0.2-py3-none-any.whl (47.4 kB view details)

Uploaded Python 3

File details

Details for the file astartool-0.2.tar.gz.

File metadata

  • Download URL: astartool-0.2.tar.gz
  • Upload date:
  • Size: 37.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for astartool-0.2.tar.gz
Algorithm Hash digest
SHA256 cfa498f32d9062f79a71b714ed8fdf7d69135286e67e56cd1b38ac35979c7888
MD5 5d15bab1867208606338c0e1e5ddd928
BLAKE2b-256 9e33a05d3ff48cf377cd867dc725a5d5245857cc51f460afc043ed4c1bfa7741

See more details on using hashes here.

File details

Details for the file astartool-0.2-py3-none-any.whl.

File metadata

  • Download URL: astartool-0.2-py3-none-any.whl
  • Upload date:
  • Size: 47.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for astartool-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 727ab996b57d38d954e49e722a136edd08c20fdb53a0d075fabbe3f9f01ba145
MD5 88ea9fcda43e41f6c98c520c0a805bd5
BLAKE2b-256 915f1ff8e2767e87ab94a521cb67edd40c74117c42a2d1ba324b325843148410

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page