进度条以tqdm for Python的概念显示

notion-tqdm的Python项目详细描述


概念TQM

PyPI versionMIT License

进度条以类似tqdm for Python的概念显示,使用^{}。在

demo

notion-tqdm继承自tqdm,因此它可以以与tqdm相同的方式运行。在

安装

pip install notion-tqdm

使用

准备

  1. Get concept的令牌以供参考here

  2. Duplicate this page在您自己的工作区中,获取表链接。 (请注意,它是表链接,而不是页面链接。)

快速启动

^{pr2}$

应将表示进度的行添加到表中,如下所示。在

示例:与其他TQM一起运行

fromtqdm.autoimporttqdmastqdm_autofromtimeimportsleep# Nest tqdmtqdm=lambda*args,**kwags:tqdm_auto(notion_tqdm(*args,**kwags))foriintqdm(range(100)):sleep(1)print(i)

示例:设置自定义属性

在迭代过程之前设置公共参数。

# After this setting, the value will be added to the column by default.# The `machine` column must be added to the table beforehand.notion_tqdm.set_common_props(machine='Jupyter1')

在迭代过程中设置动态参数。

withnotion_tqdm(range(50),desc='process')aspbar:foriinpbar:# ... some process ...# The `precision`, `highparam` column must be # added to the table beforehand.pbar.update_props(precision=precision,highparam=highparam)

示例:将文本添加到表格行中的页面。

withnotion_tqdm(range(500),desc='add text test')aspbar:foriinpbar:sleep(1)pbar.add_text(f'text: {i}')

示例:时间线视图

使用concept的timeline视图,您可以可视化进度的执行时间。在

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

推荐PyPI第三方库


热门话题
java实现建议需要时事通讯   这个“未知所有者”死锁是JVM错误吗?所有java程序都会受到它的影响吗?   java在Android中获得了多少主屏幕?   java如何检查方法的TypeMirror returnType是否为枚举   java寻找两点之间的最短路径,动态规划   java如何获取最大的BigDecimal值   java许多返回的记录导致Hibernate堆栈溢出   DynamoDB(Java)中基于数字限制和偏移量的分页   java如何设计算法来计算所有可能的元素排列?   使用SpringMVC的java流式处理大型文件   jsp如何实现java web应用程序属性缓存?   java使用应用程序属性动态创建bean   尝试在Azure上创建目录时发生java AccessControlException   Java:创建特定类   java中的双击   java如何使constrator方法非结构化?   openfire如何修复Java VM缺少的类   java JOGL 1。x个未签名的小程序是否可能?   安卓在java中解析2d Json