question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[REQUEST] Add a [minimal] version of rich without commonmark and pygments

See original GitHub issue

Rich 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:open
  • Created a year ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
willmcgugancommented, May 16, 2022

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.

0reactions
hanxiaocommented, Jul 16, 2022

@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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found