An elegant console reporter, a python port of Yournalist
Project description
Pyrnalist
An elegant console reporter, a python port of Yournalist.
Introduction
Pretty console output makes developers happy and Yarn is doing a nice job. Pyrnalist is an incomplete rewrite of Node.js's Yournalist, which in turn is a public version of Yarn internal console reproter.
Yurnalist can be used to report many different things besides simple messages.
Features
- log, info, warn, succes, error & command messages
- activity spinners
- emojis
- process steps
- lists
- program header & footer
Missing features of Yournalist
- progress bars
- object inspection
- trees
- tables
- user question
- user select
Install
pip install pyrnalist
How to use
Here is an example showing a combination of different reporter API functions.
from pyrnalist import report
import time
report.header("pyrnalist", version="0.0.2")
report.info("Please wait while I fetch something for you.")
report.warn("It might take a little while though.")
spinner = report.activity()
spinner.tick("I am on it!")
time.sleep(1)
spinner.tick("Still busy...")
time.sleep(1)
spinner.tick("Almost there...")
time.sleep(1)
report.success("Done!")
spinner.end()
report.footer()
Configuration
A normal import gives you a reporter instance configured with defaults for easy
use. If you want something else you can call create_reporter()
to give
you an instance with different options.
Options
These are the options of the reporter as defined by Flow:
def create_reporter(
verbose=True,
silent=False,
emoji=True
):
Credits
Of course ❤️ and credits to all the contributers of Yournalist and Yarn. The ease with which I was able to port the module to python from their codebase is proving some awesome engineering skills.
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
Hashes for pyrnalist-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ff3dfb066d4a7bac5a9bae2f019daddaea9ca2ea9189c2ac51a8dc53f22aea3 |
|
MD5 | 6a35ef2a9d25b40fcc44e367bd1ab735 |
|
BLAKE2b-256 | 24a822f30b4be23877c70b79c93c70dea15757b91b36bb2dd8e91dc35129e857 |