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 anindex.html
file in thebase
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()
Distrubution
python -m pip install --upgrade build
python -m pip install --upgrade twine
python -m build
python -m twine upload dist/*
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.3.tar.gz
(8.0 kB
view details)
Built Distribution
tqdme-0.0.3-py3-none-any.whl
(6.6 kB
view details)
File details
Details for the file tqdme-0.0.3.tar.gz
.
File metadata
- Download URL: tqdme-0.0.3.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 360a626c768a862fe383da1becc49457258251d77edfa1bf78d5022d305331ef |
|
MD5 | 68576b497d8932df306109d7d9e8a0a7 |
|
BLAKE2b-256 | 7c3d4479ddd8e485b56750be9a69461e73343442ba1f7b381c9f9f1e03823aa8 |
File details
Details for the file tqdme-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: tqdme-0.0.3-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 751c7c03958063b74d32ff773f64169e8af984c0fb6b5047bb4501692559b22e |
|
MD5 | 9f7021153eb2d1a8fac1a622890208ed |
|
BLAKE2b-256 | 7fad47b1dea46af1571fa3c276599af1b5c68a493725bead0fa54678464637a0 |