Tired of running long proceces and keeping up with the status using messy print statements? Progress Bar is a library to view realtime updates of a process on the Web. Progress Bar will give you a URL to see the progress, status, and messages send by the process. Besides showing progress, Progress Bar will also indicate if the process crashes. The server is implemented in node with very few dependencies. We offer a python client, and a node client will follow soon. I'm running a free server is you want to try the library.
pip install https://raw.githubusercontent.com/fsaint/progress-bar/main/backend/lib/python/dist/ProgressBar_fsaint-1.0.tar.gz
from progressbar import ProgressBar
progresbar = ProgressBar()
print(progresbar.url)
long_list = [...]
for i, element in enumerate(long_list):
progresbar.progress(float(i + 1) / len(urls), message=f"Processing element {i}")
process(element)
So you can get the URL on your phone, ProgressBar will pring a handy QR code of the generated URL.
In this example we show a simple scraper that uses beautiful soup to extract the title of the scrapped page.
import requests
from bs4 import BeautifulSoup
from progressbar import ProgressBar
import time
urls = [
"https://www.example/1",
"https://www.example/2",
...
]
progresbar = ProgressBar()
print(progresbar.url)
progresbar.progress(0, message="Ready ...")
for i, url in enumerate(urls):
response = requests.get(url)
html = response.text
soup = BeautifulSoup(html, 'html.parser')
progresbar.progress(float(i + 1) / len(urls), message=soup.title.text)
# Rest of your code to parse the HTML with BeautifulSoup
time.sleep(2)
brew tap mongodb/brew
brew install mongodb-community
brew services start mongodb/brew/mongodb-community
node server.js
- PENDING: URL was created. However, no progress has bee received.
- IN_PROGRESS: Progress has been received.
- STALLED: The process is not making progress. Use for Throdling timers
- FAILED: An unhandled exception was captured.
- FINISHED: The process reached sucesful completion. It can be manually done, or when the process exits with no exception.
- Handle crashes
- show the running time.
- Add the title parameter when creating the URL.
- Change colors on status.
- Improve UI: make it dark themed.
- API Documentation
- Show a list of events. Log style
- Estimated time of completion
- Add better font
python setup.py sdist