Skip to content

aansheng/turbotools

Repository files navigation

Turbotools

https://travis-ci.org/anshengme/turbotools.svg?branch=master https://coveralls.io/repos/github/anshengme/turbotools/badge.svg?branch=master https://img.shields.io/pypi/v/turbotools.svg?

常用的小工具合集,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'

发布PyPi

$ python setup.py sdist
$ twine upload dist/*