进度条以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广播接收器未检测到按键事件   java不为特定列更改创建修订   java采用了更实用的方法   java桌面窗格HTML呈现   java处理internet连接丢失   java在调整JFrame的大小时,如何防止JTable的列调整大小?   如何用Java中的“Scanner.hasNext”完成程序   具有模块名称的java停止IntelliJ项目工具窗口?   执行已编译的Rails-Warbler JAR文件时发生java加载错误   java Spring数据redis存储库不支持集合查询?   每个客户端的java队列请求   获取Java中的JSON嵌套数组元素   java GWT,Vaadin ConcurrentModificationException   firebase存储中的java在保存照片之前,我需要发送两次照片   JavaSpringEleaf如何在容器外使用变量