Skip to main content

Forward progress from tqdm to a public website

Project description

tqdme

Environment Variables

  • TQDME_URL - URL to the TQDME server. Default: http://tqdm.me
  • TQDME_DISPLAY - Show TQDM progress bars in the terminal. Default: True
  • TQDME_VERBOSE - Print debug messages. Default: False

Usage

tqdm Replacement

Use tqdme as a drop-in replacement for tqdm in your Python scripts.

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

Relay Server (Flask + SocketIO)

Note: The tqdme server assumes you have provided an index.html file in the base directory.

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()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tqdme-0.0.0.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

tqdme-0.0.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file tqdme-0.0.0.tar.gz.

File metadata

  • Download URL: tqdme-0.0.0.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for tqdme-0.0.0.tar.gz
Algorithm Hash digest
SHA256 9b867b67d4cae4691616f636ce1f971dba2bd00b5496954c0565a62e89634c85
MD5 3ea9261fa915b49b48e84145c117e9e4
BLAKE2b-256 6d78710e185d4a63ef11c59ede7a2377d7b943cd409ea0ad20e747e6437da85c

See more details on using hashes here.

File details

Details for the file tqdme-0.0.0-py3-none-any.whl.

File metadata

  • Download URL: tqdme-0.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for tqdme-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 442a50eb97605fbe1683dffcba35ddf08d124839de52df7f5f27176c20591dd9
MD5 9fc092b2cd3ed42d5872c1f64311954c
BLAKE2b-256 990526afa7c2628cbec433441bd029041922e34bccd375a8bf72883f96da1b5b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page