<story><title>Rich: A Python library for rich text and formatting in the terminal</title><url>https://github.com/Textualize/rich</url></story><parent_chain></parent_chain><comment><author>pedrovhb</author><text>An extremely useful hidden gem in Rich is its `inspect` function [1].&lt;p&gt;When called on an object, it pretty prints a list of its public attributes (though you can also request private and dunder attributes) [2]. It can also be called on a class or function; it&amp;#x27;ll then pretty print the docstrings, parameters with types, methods, etc. It&amp;#x27;s great for debugging and for starting to code with libraries you&amp;#x27;re not familiar with, don&amp;#x27;t have comprehensive documentation, or have some dynamic aspect.&lt;p&gt;In a similar vein, `objexplore` [3] is another library that lets you dive into an object&amp;#x27;s nested attributes to understand how it&amp;#x27;s laid out.&lt;p&gt;In interactive debugging sessions I often find these to be more useful than the IDE&amp;#x27;s features which provide similar functionality.&lt;p&gt;[1] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;rich.readthedocs.io&amp;#x2F;en&amp;#x2F;stable&amp;#x2F;reference&amp;#x2F;init.html#rich.inspect&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;rich.readthedocs.io&amp;#x2F;en&amp;#x2F;stable&amp;#x2F;reference&amp;#x2F;init.html#ri...&lt;/a&gt;&lt;p&gt;[2] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;i2.paste.pics&amp;#x2F;798cff2903f6b3351289a24c839d4f44.png&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;i2.paste.pics&amp;#x2F;798cff2903f6b3351289a24c839d4f44.png&lt;/a&gt;&lt;p&gt;[3] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;kylepollina&amp;#x2F;objexplore&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;kylepollina&amp;#x2F;objexplore&lt;/a&gt;</text></comment>
<story><title>Rich: A Python library for rich text and formatting in the terminal</title><url>https://github.com/Textualize/rich</url></story><parent_chain></parent_chain><comment><author>samwillis</author><text>See also Textual by the same developer. Really impressive work.&lt;p&gt;&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;Textualize&amp;#x2F;textual&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;Textualize&amp;#x2F;textual&lt;/a&gt;</text></comment>