No project description provided
Project description
indentalog
An easy-to-use progress bar decorator for Python functions and loops.
Getting Started
indentalog will be available on PyPI once it reaches a stable version. For now, you can install it from the source code.
git clone git@github.com:bastienlc/indentalog.git
cd indentalog
poetry install
indentalog has the simplest API possible. Just import the ilog
object and use it either as a decorator, as an iterator wrapper or as a context manager.
from indentalog import ilog
@ilog()
def my_first_function():
# Your code here
pass
def my_second_function():
for i in ilog(range(10)):
# Your code here
pass
my_first_function()
my_second_function()
The main advantage of indentalog is that it keeps track of the call stack, which allows displaying the progress of nested functions or loops.
from indentalog import ilog
@ilog()
def my_inner_function():
# Your code here
pass
def my_main_function():
for i in ilog(range(3), name="Main function"):
# Your code here
my_inner_function()
pass
my_main_function()
Future features
- Passing data to the endpoints
- Support for custom styles or themes
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
indentalog-0.1.1.tar.gz
(5.3 kB
view hashes)
Built Distribution
Close
Hashes for indentalog-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cad5ccfd4db827190869d30801ba0179d9e5222e3f9abcca75928a458d678b23 |
|
MD5 | 46be1719af97f165bdbdf05b44c1a192 |
|
BLAKE2b-256 | 5a23fd97c7425e4a16b31535af05dbf08a76cf76664c14c5b1919281995387b7 |