跳转到主要内容

从tqdm推进到公共网站

项目描述

tqdme

环境变量

  • TQDME_URL - TQDME服务器的URL。默认:http://tqdm.me
  • TQDME_DISPLAY - 在终端中显示TQDM进度条。默认:True
  • TQDME_VERBOSE - 打印调试信息。默认:False

用法

tqdm 替代品

tqdme 作为 tqdm 的替代品用于您的Python脚本中。

import time
# from tqdm import tqdm
from tqdme import tqdme

num_iterations = 100 # Define the number of iterations

for i in tqdme(range(num_iterations)):
    time.sleep(0.1)  # Sleep for 0.1 seconds

中继服务器(Flask + SocketIO)

注意: tqdme 服务器假设您已在 base 目录中提供了 index.html 文件。

from tqdme.server import Server
from flask import send_from_directory
from pathlib import Path

script_directory = Path(__file__).parent.resolve()

server = Server(script_directory, 'localhost', 3768)

app = server.app

@server.app.route('/src/<path:path>')
def get_static_assets(path):
    return send_from_directory(server.base / 'src', path)

server.run()

分发

python -m pip install --upgrade build
python -m pip install --upgrade twine
python -m build
python -m twine upload dist/*

项目详情


下载文件

为您的平台下载文件。如果您不确定选择哪个,请了解更多关于 安装软件包 的信息。

源分发

tqdme-0.0.3.tar.gz (8.0 kB 查看哈希值)

上传于 源代码

构建分发

tqdme-0.0.3-py3-none-any.whl (6.6 kB 查看哈希值)

上传于 Python 3

支持