{"id":72878,"date":"2021-01-22T13:43:00","date_gmt":"2021-01-22T18:43:00","guid":{"rendered":"https:\/\/ibkrcampus.com\/?p=72878"},"modified":"2022-11-21T09:46:56","modified_gmt":"2022-11-21T14:46:56","slug":"pythons-rich-library-a-tutorial","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pythons-rich-library-a-tutorial\/","title":{"rendered":"Python&#8217;s Rich Library &#8211; a Tutorial"},"content":{"rendered":"\n<p>The Python&nbsp;<strong>rich<\/strong>&nbsp;library is a package for having clearer, styled, and colored output in the terminal.&nbsp;<strong>rich<\/strong>&nbsp;works across multiple operating systems \u2013 including Windows, Linux, and macOS. In this post, we\u2019ll give an introduction to what it can do for you.<\/p>\n\n\n\n<p>You can get started with&nbsp;<strong>rich<\/strong>&nbsp;by installing it with pip.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>1<\/td><td><code>pip install rich<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Once you have it installed, open up the command line and type in&nbsp;<strong>python<\/strong>. In order to get the additional functionality from&nbsp;<strong>rich<\/strong>, you\u2019ll need to do one more step, which you can see below. Running this snippet will allow you to have styled \/ formatted code interactively. You\u2019ll only need to do this once.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>12<\/td><td><code>from<\/code> <code>rich <\/code><code>import<\/code> <code>pretty<\/code><code>pretty.install()<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Here\u2019s a couple examples of automatic coloring for a list.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2021\/01\/python-rich-library-the-automatic-net-1.png\" alt=\"\" class=\"wp-image-72931 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"497\" height=\"57\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2021\/01\/python-rich-library-the-automatic-net-2.png\" alt=\"\" class=\"wp-image-72932 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/01\/python-rich-library-the-automatic-net-2.png 497w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/01\/python-rich-library-the-automatic-net-2-300x34.png 300w\" data-sizes=\"(max-width: 497px) 100vw, 497px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 497px; aspect-ratio: 497\/57;\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-creating-rich-progress-bars\"><strong>Creating \u201crich\u201d progress bars<\/strong><\/h2>\n\n\n\n<p>In a previous post, we talked about&nbsp;<a href=\"https:\/\/theautomatic.net\/2020\/10\/12\/how-to-create-a-progress-bar-in-python\/\">how to create progress bars with Python<\/a>.&nbsp;<strong>rich<\/strong>&nbsp;can also create progress bars. Below, we import&nbsp;<em>track<\/em>&nbsp;from&nbsp;<strong>rich.progress<\/strong>. Similarly to&nbsp;<a href=\"https:\/\/theautomatic.net\/2020\/10\/12\/how-to-create-a-progress-bar-in-python\/\">tqdm<\/a>, you can wrap an&nbsp;<a href=\"https:\/\/www.geeksforgeeks.org\/python-difference-iterable-iterator\/\">iterable<\/a>&nbsp;with&nbsp;<em>track<\/em>&nbsp;to print out a progress bar as the loop completes each iteration.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>1234<\/td><td><code>from<\/code> <code>rich.progress <\/code><code>import<\/code> <code>track<\/code>&nbsp;<code>for<\/code> <code>num <\/code><code>in<\/code> <code>track(<\/code><code>range<\/code><code>(<\/code><code>100<\/code><code>)):<\/code><code>print<\/code><code>(num <\/code><code>*<\/code> <code>2<\/code><code>)<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"640\" height=\"26\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2021\/01\/python-rich-library-the-automatic-net-3.png\" alt=\"\" class=\"wp-image-72933 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/01\/python-rich-library-the-automatic-net-3.png 640w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/01\/python-rich-library-the-automatic-net-3-300x12.png 300w\" data-sizes=\"(max-width: 640px) 100vw, 640px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 640px; aspect-ratio: 640\/26;\" \/><\/figure>\n\n\n\n<p>Also, like&nbsp;<strong>tqdm<\/strong>, progress bars can be created for list and dictionary comprehensions, too! In the snippet below, we use&nbsp;<strong>rich<\/strong>&nbsp;to track the download progress of a collection of stocks (<a href=\"https:\/\/theautomatic.net\/yahoo_fin-documentation\/\">see more on scraping stock prices here<\/a>).<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>12345<\/td><td><code>import<\/code> <code>yahoo_fin.stock_info as si<\/code>&nbsp;<code>tickers <\/code><code>=<\/code> <code>si.tickers_dow()<\/code>&nbsp;<code>dow_prices <\/code><code>=<\/code> <code>{ticker : si.get_data(ticker) <\/code><code>for<\/code> <code>ticker <\/code><code>in<\/code> <code>track(tickers)}<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Word wrapping and font colors<\/strong><\/h2>\n\n\n\n<p><strong>rich<\/strong>&nbsp;can apply word wrapping to printed text so that it fits within the terminal width. To take advantage of this feature, you need to create a&nbsp;<em>Console<\/em>&nbsp;object.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>12345<\/td><td><code>from<\/code> <code>rich.console <\/code><code>import<\/code> <code>Console<\/code>&nbsp;<code>c <\/code><code>=<\/code> <code>Console()<\/code>&nbsp;<code>c.<\/code><code>print<\/code><code>(<\/code><code>\"testing word wrap\"<\/code><code>)<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>You can also add styling to the printed text, such as modifying the font color. To see the possible colors, check out&nbsp;<a href=\"https:\/\/rich.readthedocs.io\/en\/latest\/appendix\/colors.html#appendix-colors\">this link<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"640\" height=\"159\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2021\/01\/python-rich-library-the-automatic-net-4.png\" alt=\"\" class=\"wp-image-72936 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/01\/python-rich-library-the-automatic-net-4.png 640w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/01\/python-rich-library-the-automatic-net-4-300x75.png 300w\" data-sizes=\"(max-width: 640px) 100vw, 640px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 640px; aspect-ratio: 640\/159;\" \/><\/figure>\n\n\n\n<p><em>Visit TheAutomatic.net for additional Python code such as how to create formatted tables and inspect Python objects with rich:<br><a href=\"https:\/\/theautomatic.net\/2021\/01\/05\/pythons-rich-library-a-tutorial\/\">https:\/\/theautomatic.net\/2021\/01\/05\/pythons-rich-library-a-tutorial\/<\/a><\/em>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to create &#8220;rich&#8221; progress bars and formatted tables in Python with this tutorial. Download ready-to-use code.<\/p>\n","protected":false},"author":388,"featured_media":23888,"comment_status":"closed","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[339,343,349,338,341,352],"tags":[865,595,9098],"contributors-categories":[13695],"class_list":{"0":"post-72878","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-data-science","8":"category-programing-languages","9":"category-python-development","10":"category-ibkr-quant-news","11":"category-quant-development","12":"category-quant-north-america","13":"tag-github","14":"tag-python","15":"tag-rich-python-library","16":"contributors-categories-theautomatic-net"},"pp_statuses_selecting_workflow":false,"pp_workflow_action":"current","pp_status_selection":"publish","acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v27.7) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Python&#8217;s Rich Library &#8211; a Tutorial | IBKR Quant<\/title>\n<meta name=\"description\" content=\"Learn how to create &quot;rich&quot; progress bars and formatted tables in Python with this tutorial. Download ready-to-use code.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/72878\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python&#039;s Rich Library - a Tutorial | IBKR Quant Blog\" \/>\n<meta property=\"og:description\" content=\"Learn how to create &quot;rich&quot; progress bars and formatted tables in Python with this tutorial. Download ready-to-use code.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pythons-rich-library-a-tutorial\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2021-01-22T18:43:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-21T14:46:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/11\/liquid-gold.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"900\" \/>\n\t<meta property=\"og:image:height\" content=\"575\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Andrew Treadway\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andrew Treadway\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\n\t    \"@context\": \"https:\\\/\\\/schema.org\",\n\t    \"@graph\": [\n\t        {\n\t            \"@type\": \"NewsArticle\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pythons-rich-library-a-tutorial\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pythons-rich-library-a-tutorial\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Andrew Treadway\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/d4018570a16fb867f1c08412fc9c64bc\"\n\t            },\n\t            \"headline\": \"Python&#8217;s Rich Library &#8211; a Tutorial\",\n\t            \"datePublished\": \"2021-01-22T18:43:00+00:00\",\n\t            \"dateModified\": \"2022-11-21T14:46:56+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pythons-rich-library-a-tutorial\\\/\"\n\t            },\n\t            \"wordCount\": 332,\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pythons-rich-library-a-tutorial\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2019\\\/11\\\/liquid-gold.jpg\",\n\t            \"keywords\": [\n\t                \"GitHub\",\n\t                \"Python\",\n\t                \"Rich Python Library\"\n\t            ],\n\t            \"articleSection\": [\n\t                \"Data Science\",\n\t                \"Programming Languages\",\n\t                \"Python Development\",\n\t                \"Quant\",\n\t                \"Quant Development\",\n\t                \"Quant North America\"\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"WebPage\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pythons-rich-library-a-tutorial\\\/\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pythons-rich-library-a-tutorial\\\/\",\n\t            \"name\": \"Python's Rich Library - a Tutorial | IBKR Quant Blog\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\"\n\t            },\n\t            \"primaryImageOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pythons-rich-library-a-tutorial\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pythons-rich-library-a-tutorial\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2019\\\/11\\\/liquid-gold.jpg\",\n\t            \"datePublished\": \"2021-01-22T18:43:00+00:00\",\n\t            \"dateModified\": \"2022-11-21T14:46:56+00:00\",\n\t            \"description\": \"Learn how to create \\\"rich\\\" progress bars and formatted tables in Python with this tutorial. Download ready-to-use code.\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"ReadAction\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pythons-rich-library-a-tutorial\\\/\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"ImageObject\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pythons-rich-library-a-tutorial\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2019\\\/11\\\/liquid-gold.jpg\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2019\\\/11\\\/liquid-gold.jpg\",\n\t            \"width\": 900,\n\t            \"height\": 575,\n\t            \"caption\": \"Liquidity\"\n\t        },\n\t        {\n\t            \"@type\": \"WebSite\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"name\": \"IBKR Campus US\",\n\t            \"description\": \"Financial Education from Interactive Brokers\",\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"SearchAction\",\n\t                    \"target\": {\n\t                        \"@type\": \"EntryPoint\",\n\t                        \"urlTemplate\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/?s={search_term_string}\"\n\t                    },\n\t                    \"query-input\": {\n\t                        \"@type\": \"PropertyValueSpecification\",\n\t                        \"valueRequired\": true,\n\t                        \"valueName\": \"search_term_string\"\n\t                    }\n\t                }\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"Organization\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\",\n\t            \"name\": \"Interactive Brokers\",\n\t            \"alternateName\": \"IBKR\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"logo\": {\n\t                \"@type\": \"ImageObject\",\n\t                \"inLanguage\": \"en-US\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\",\n\t                \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"width\": 669,\n\t                \"height\": 669,\n\t                \"caption\": \"Interactive Brokers\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\"\n\t            },\n\t            \"publishingPrinciples\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/about-ibkr-campus\\\/\",\n\t            \"ethicsPolicy\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/cyber-security-notice\\\/\"\n\t        },\n\t        {\n\t            \"@type\": \"Person\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/d4018570a16fb867f1c08412fc9c64bc\",\n\t            \"name\": \"Andrew Treadway\",\n\t            \"description\": \"Andrew Treadway currently works as a Senior Data Scientist, and has experience doing analytics, software automation, and ETL. He completed a master\u2019s degree in computer science \\\/ machine learning, and an undergraduate degree in pure mathematics. Connect with him on LinkedIn: https:\\\/\\\/www.linkedin.com\\\/in\\\/andrew-treadway-a3b19b103\\\/In addition to TheAutomatic.net blog, he also teaches in-person courses on Python and R through my NYC meetup: more details.\",\n\t            \"sameAs\": [\n\t                \"https:\\\/\\\/theautomatic.net\\\/about-me\\\/\"\n\t            ],\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/author\\\/andrewtreadway\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Python&#8217;s Rich Library &#8211; a Tutorial | IBKR Quant","description":"Learn how to create \"rich\" progress bars and formatted tables in Python with this tutorial. Download ready-to-use code.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/72878\/","og_locale":"en_US","og_type":"article","og_title":"Python's Rich Library - a Tutorial | IBKR Quant Blog","og_description":"Learn how to create \"rich\" progress bars and formatted tables in Python with this tutorial. Download ready-to-use code.","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pythons-rich-library-a-tutorial\/","og_site_name":"IBKR Campus US","article_published_time":"2021-01-22T18:43:00+00:00","article_modified_time":"2022-11-21T14:46:56+00:00","og_image":[{"width":900,"height":575,"url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/11\/liquid-gold.jpg","type":"image\/jpeg"}],"author":"Andrew Treadway","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Andrew Treadway","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pythons-rich-library-a-tutorial\/#article","isPartOf":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pythons-rich-library-a-tutorial\/"},"author":{"name":"Andrew Treadway","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/d4018570a16fb867f1c08412fc9c64bc"},"headline":"Python&#8217;s Rich Library &#8211; a Tutorial","datePublished":"2021-01-22T18:43:00+00:00","dateModified":"2022-11-21T14:46:56+00:00","mainEntityOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pythons-rich-library-a-tutorial\/"},"wordCount":332,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pythons-rich-library-a-tutorial\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/11\/liquid-gold.jpg","keywords":["GitHub","Python","Rich Python Library"],"articleSection":["Data Science","Programming Languages","Python Development","Quant","Quant Development","Quant North America"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pythons-rich-library-a-tutorial\/","url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pythons-rich-library-a-tutorial\/","name":"Python's Rich Library - a Tutorial | IBKR Quant Blog","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pythons-rich-library-a-tutorial\/#primaryimage"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pythons-rich-library-a-tutorial\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/11\/liquid-gold.jpg","datePublished":"2021-01-22T18:43:00+00:00","dateModified":"2022-11-21T14:46:56+00:00","description":"Learn how to create \"rich\" progress bars and formatted tables in Python with this tutorial. Download ready-to-use code.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pythons-rich-library-a-tutorial\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pythons-rich-library-a-tutorial\/#primaryimage","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/11\/liquid-gold.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/11\/liquid-gold.jpg","width":900,"height":575,"caption":"Liquidity"},{"@type":"WebSite","@id":"https:\/\/ibkrcampus.com\/campus\/#website","url":"https:\/\/ibkrcampus.com\/campus\/","name":"IBKR Campus US","description":"Financial Education from Interactive Brokers","publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ibkrcampus.com\/campus\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ibkrcampus.com\/campus\/#organization","name":"Interactive Brokers","alternateName":"IBKR","url":"https:\/\/ibkrcampus.com\/campus\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","width":669,"height":669,"caption":"Interactive Brokers"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/"},"publishingPrinciples":"https:\/\/www.interactivebrokers.com\/campus\/about-ibkr-campus\/","ethicsPolicy":"https:\/\/www.interactivebrokers.com\/campus\/cyber-security-notice\/"},{"@type":"Person","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/d4018570a16fb867f1c08412fc9c64bc","name":"Andrew Treadway","description":"Andrew Treadway currently works as a Senior Data Scientist, and has experience doing analytics, software automation, and ETL. He completed a master\u2019s degree in computer science \/ machine learning, and an undergraduate degree in pure mathematics. Connect with him on LinkedIn: https:\/\/www.linkedin.com\/in\/andrew-treadway-a3b19b103\/In addition to TheAutomatic.net blog, he also teaches in-person courses on Python and R through my NYC meetup: more details.","sameAs":["https:\/\/theautomatic.net\/about-me\/"],"url":"https:\/\/www.interactivebrokers.com\/campus\/author\/andrewtreadway\/"}]}},"jetpack_featured_media_url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/11\/liquid-gold.jpg","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/72878","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/users\/388"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=72878"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/72878\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media\/23888"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=72878"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=72878"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=72878"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=72878"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}