生成票证通用性的工具集

ticket-universe的Python项目详细描述


票务范围

CircleCI

一个命令行界面和库,用于在python 3.x中生成一个独特的票证代码的世界。

安装

票证宇宙可以通过pip安装:

pip install ticket-universe

用法

票证宇宙可以用作库和命令行界面。

命令行界面

ticket universe cli提供了一种生成universe并编写 给史杜特。

usage: ticket-universe [-h] [--offset OFFSET] [--limit LIMIT]
                       [POSITION [POSITION ...]]

example: ticket-universe fixed:LTFY- alpha numeric numeric numeric

positional arguments:
  POSITION         alpha | alpha:safe_latin | numeric | range:min:max |
                   fixed:{} | binary

optional arguments:
  -h, --help       show this help message and exit
  --offset OFFSET
  --limit LIMIT

fromticket_universe.positionimportFixedPosition,AlphaPosition,NumericPosition,RangedPositionfromticket_universe.universeimportUniversestandard_universe=Universe([FixedPosition('LTFY-'),AlphaPosition(),NumericPosition(),NumericPosition()])# ['LTFY-A00', ..., 'LTFY-Z99']print([tfortinstandard_universe])# Alternate charsets for alpha positionscharset_universe=Universe([AlphaPosition('safe_latin'),AlphaPosition('safe_latin')])tickets=[tfortincharset_universe]print('O'intickets,'I'intickets,'L'intickets)# False, False, False# Limited, generate only a part of the universelimited_universe=Universe([RangedPosition(0,999)])print(len([tfortinlimited_universe.generate(limit=10,offset=2]))#8

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
ArrayList Java中的搜索字符串   另一个web应用程序的java访问会话   另一个应用程序中的活动和服务之间的java通信   java根据Json字符串类型将Json字符串转换为对象   eclipse如何解决java中的错误异常。lang.NoSuchMethodError:'java。字符串javax。摆动JOptionPane。showInputDialog(java.lang.String)'   线程“main”java中的安卓异常。lang.NoClassDefFoundError:org/codehaus/jackson/JsonParseException   java如何在安卓 emulator上显示Mat图像?使用NDK   Java在本地读取测试源文件,但在服务器上读取失败   java dowhile循环用于计算输入数字中的数字。故障排除代码   JAva初学者在编写获取成本的方法时遇到困难   java是shell游戏。我如何让物体移动,特别是在特定的曲线上,但顺序是随机的?   java如何区分两个同名的JButton   java为什么我在Spring Boot中需要一个接口?   java将文件路径插入数据库将删除\   使用InterfaceType初始化java对象   java如何部署一个分为Angular、Spring Boot和MySQL的项目?   java如何使用Symja解决不等式?