常用的小工具合集,Documentation on Readthedocs。
使用pip安装
$ pip install turbotools
或者从源码包安装
$ git clone https://github.com/anshengme/turbotools
$ cd turbotools
$ python setup.py install
- 获取随机字符串
>>> from turbotools.utils import get_random_str
>>> get_random_str()
's8pqVnVfykU8QxGIMD3z2id4DkQGdOc2'
>>> get_random_str(length=4)
'Muea'
>>> get_random_str(length=4, chars='123456')
'2231'
$ python setup.py sdist
$ twine upload dist/*