All Projects → shunyooo → notion-tqdm

shunyooo / notion-tqdm

Licence: MIT license
Progress Bar displayed in Notion like tqdm for Python

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to notion-tqdm

MatlabProgressBar
This MATLAB class provides a smart progress bar like tqdm in the command window and is optimized for progress information in simple iterations or large frameworks with full support of parallel parfor loops provided by the MATLAB Parallel Computing Toolbox.
Stars: ✭ 44 (-31.25%)
Mutual labels:  progress, tqdm
stqdm
stqdm is the simplest way to handle a progress bar in streamlit app.
Stars: ✭ 75 (+17.19%)
Mutual labels:  progress, tqdm
spinners-angular
Lightweight SVG/CSS spinners for Angular
Stars: ✭ 21 (-67.19%)
Mutual labels:  progress
notion-instagram
Schedule & Publish posts to Instagram from Notion
Stars: ✭ 115 (+79.69%)
Mutual labels:  notion
ProgressText
A text progress bar with animation effect, highly customized.
Stars: ✭ 13 (-79.69%)
Mutual labels:  progress
react-native-modal-loader
Customizable animated modal progress hud for react apps.
Stars: ✭ 36 (-43.75%)
Mutual labels:  progress
jahir.dev
My personal website 💎 – Built using Next.js, TypeScript, MDX, contentlayer, Notion and Stitches styled components
Stars: ✭ 119 (+85.94%)
Mutual labels:  notion
notion-heroku
Heroku hosted application that performs Notion actions (i.e., new task, new note) based on voice requests via IFTTT Webhooks and Google Assistant.
Stars: ✭ 41 (-35.94%)
Mutual labels:  notion
nobelium
A static blog build on top of Notion and NextJS, deployed on Vercel.
Stars: ✭ 1,790 (+2696.88%)
Mutual labels:  notion
notion-cms
Notion as a headless CMS
Stars: ✭ 76 (+18.75%)
Mutual labels:  notion
notion-linux-wrapper
Notion.so desktop application for Linux
Stars: ✭ 37 (-42.19%)
Mutual labels:  notion
DataDigger
A dynamic dataviewer for your Progress / OpenEdge databases
Stars: ✭ 43 (-32.81%)
Mutual labels:  progress
typora notion-theme
My customisations for Typora to look a little more like Notion.so
Stars: ✭ 32 (-50%)
Mutual labels:  notion
CustomProgress
一款常见的进度条加载框架
Stars: ✭ 32 (-50%)
Mutual labels:  progress
notion widgets
A set of HTML widgets that could be embedded into Notion.so https://www.notion.so/ pages. For more see https://blog.shorouk.dev/notion-widgets-gallery/
Stars: ✭ 270 (+321.88%)
Mutual labels:  notion
DevProgressView
自定义ProdressView-进度条动画
Stars: ✭ 17 (-73.44%)
Mutual labels:  progress
cards
Turn your Notion database into a deck of cards
Stars: ✭ 37 (-42.19%)
Mutual labels:  notion
react-redux-spinner
An automatic spinner for react and redux
Stars: ✭ 81 (+26.56%)
Mutual labels:  progress
notionapi
A Notion API SDK, written in Golang
Stars: ✭ 351 (+448.44%)
Mutual labels:  notion
notion-avatar
🪄 An online tool for making notion-style avatars.
Stars: ✭ 1,687 (+2535.94%)
Mutual labels:  notion

notion-tqdm

PyPI version MIT License

Progress Bar displayed in Notion like tqdm for Python using notion-py.

demo

notion-tqdm inherits from tqdm, so it can be run in the same way as tqdm.

Installation

pip install git+https://github.com/shunyooo/notion-tqdm

Usage

Preparation

  1. Get Notion's Token for reference here

  2. Duplicate this page in your own workspace and get the table link. (Note that it is a table link, not a page link.)

QuickStart

from notion_tqdm import notion_tqdm
from time import sleep

# Configure
token_v2 = '<token_v2>'
table_url = '<table_url>'
notion_email = '<notion_email>' # For multi-account users
notion_tqdm.set_config(token_v2, table_url, email=notion_email, timezone='Asia/Tokyo')

# Run Iterate
for i in notion_tqdm(range(100), desc='Processing'):
    sleep(1)
    print(i)

A row representing the progress should be added to the table as shown below.

Example: Running with the Other tqdm

from tqdm.auto import tqdm as tqdm_auto
from time import sleep
# Nest tqdm
tqdm = lambda *args, **kwags: tqdm_auto(notion_tqdm(*args, **kwags))
for i in tqdm(range(100)):
  sleep(1)
  print(i)

Example: Set Custom Property

Set the common parameters before the iterative process.

# 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')

Set the dynamic parameters during the iterative process.

with notion_tqdm(range(50), desc='process') as pbar:
    for i in pbar:
        # ... some process ...
        # The `precision`, `highparam` column must be 
        # added to the table beforehand.
        pbar.update_props(precision=precision, highparam=highparam)

Example: Add text to a page in table row.

with notion_tqdm(range(500), desc='add text test') as pbar:
    for i in pbar:
        sleep(1)
        pbar.add_text(f'text: {i}')

image-20201127213525339

Example: Timeline View

With Notion's timeline view, you can visualize the execution time of the progress.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].