No project description provided
Project description
indentalog
An easy-to-use progress logger for Python. indentalog allows you to display the progress of your functions and loops in a clean and readable way, by keeping track of the call stack. It uses rich under the hood to provide a beautiful and customizable output.
Getting Started
indentalog is available on PyPI. It is still in early development, so you may encounter some bugs. If you do, please open an issue on github.
pip install indentalog
indentalog aims to make logging your script's progress as easy as 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()
indentalog keeps track of the call stack, which allows displaying the progress of nested functions or loops without getting lost in the output.
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()
Contributing
Contributions are welcome! If you have any idea or suggestion, please open an issue on github. This project is still in early development, so there is a lot of room for improvement.
Installation
git clone git@github.com:bastienlc/indentalog.git
cd indentalog
make install
License
This project is licensed under the MIT License - see the LICENSE file for details.
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
Built Distribution
File details
Details for the file indentalog-0.1.3.tar.gz
.
File metadata
- Download URL: indentalog-0.1.3.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5773b74e91343fb5832badfa71e69d788a321d7110ccb47f3914a75ea8d3e918 |
|
MD5 | 8eea31b4a6ec56cce3db5e0ff09e06e8 |
|
BLAKE2b-256 | 3324f6785ca4d23d7ecbbb068cd97b38aaacb7f0fc70ad1b7a38935870e24515 |
File details
Details for the file indentalog-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: indentalog-0.1.3-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5d011776866e8d90888ff858cafc218397a181a2289720205ee26a03800c649 |
|
MD5 | c99671dabaf2a7726bf1135f13dbde95 |
|
BLAKE2b-256 | b5a20889d511d17d733051b1940407f28f04a238341ee0de18a2e4e189aadb8a |