[REQUEST] Add a [minimal] version of rich without commonmark and pygments
See original GitHub issueRich comes with 2 required dependencies: commonmark and pygments.
CommonMark for Markdown parsing and rendering. Pygments for code syntax highlighting.
I’m often pulling in rich for colorised outputs, tables, and progress bars. None of these require those libs.
It would be nice to have a “minimal” version of rich that doesn’t itself have dependencies, e.g.:
$ pip install rich[minimal]
Thanks for your consideration
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
rich - PyPI
Rich is a Python library for rich text and beautiful formatting in the terminal. The Rich API makes it easy to add color...
Read more >rich.syntax — Rich 12.6.0 documentation
code (str, optional) – Optional string of code that will be used as a fallback if no lexer is found for the supplied...
Read more >TDM 30100: Project 8 — 2022 :: The Examples Book
Instead, we are going to use the non-containerized version of Python that is ... commonmark 0.9.1 pip 22.0.4 Pygments 2.13.0 rich 12.6.0 setuptools...
Read more >Using markdown-it in Python | Post - Random Geekery
pip install markdown-it-py[linkify,plugins] ... Let's build a little Typer application that takes a markdown path and makes an HTML fragment ...
Read more >A Python Library for Rich Text & Beautiful Formatting - Morioh
To effortlessly add rich output to your application, you can import the rich print ... markdown. Syntax Highlighting. Rich uses the pygments library...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ve had the same point myself, but AFAIK the extras can’t subtract dependencies, only add them.
An alternative might be to have a new package called
rich-minimal
.@willmcgugan one solution is using env variable in setup.py to control the “subtracted” dependency, example
https://github.com/jina-ai/jina/blob/c056fad074ae6f46a61b193fd89af6b7f0751be8/setup.py#L135