<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title>Real Python</title>
  <link href="https://realpython.com/atom.xml" rel="self"/>
  <link href="https://realpython.com/"/>
  <updated>2021-04-02T12:00:00+00:00</updated>
  <id>https://realpython.com/</id>
  <author>
    <name>Real Python</name>
  </author>

  
    <entry>
      <title>The Real Python Podcast – Episode #54: Building a Neural Network and How to Write Tests in Python</title>
      <id>https://realpython.com/podcasts/rpp/54/</id>
      <link href="https://realpython.com/podcasts/rpp/54/"/>
      <updated>2021-04-02T12:00:00+00:00</updated>
      <summary>Do you know how a neural network functions? What goes into building one from scratch using Python? This week on the show, David Amos is back, and he&#x27;s brought another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;Do you know how a neural network functions? What goes into building one from scratch using Python? This week on the show, David Amos is back, and he&#x27;s brought another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python Community Interview With Will McGugan</title>
      <id>https://realpython.com/interview-will-mcgugan/</id>
      <link href="https://realpython.com/interview-will-mcgugan/"/>
      <updated>2021-03-31T14:00:00+00:00</updated>
      <summary>In this interview, we&#x27;re joined by Will McGugan, a freelance Python developer based in Scotland and the creator of the popular Python library Rich. We discuss the origins of Rich, what it&#x27;s like to maintain a popular Python package, building chess engines, and Will&#x27;s love of photography.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Today I’m joined by &lt;a href=&quot;https://twitter.com/willmcgugan&quot;&gt;Will McGugan&lt;/a&gt;. Will is a freelance Python developer based in Scotland and the creator of the popular Python library &lt;a href=&quot;https://pypi.org/project/rich/&quot;&gt;&lt;code&gt;Rich&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In this interview, we discuss the origins of &lt;code&gt;Rich&lt;/code&gt;, what it’s like to maintain a popular Python package, building chess engines, and Will’s love of photography.&lt;/p&gt;
&lt;p class=&quot;mt-5&quot;&gt;&lt;strong&gt;Ricky:&lt;/strong&gt; &lt;em&gt;Thanks for joining me for this interview, Will. I’d like to start in the same manner we do with all our guests: how did you get into programming, and when did you start using Python?&lt;/em&gt;&lt;/p&gt;
&lt;figure&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid w-25 float-right ml-3 rounded-circle&quot; src=&quot;https://files.realpython.com/media/WillMcGugan-square.92efc493faf2.jpg&quot; width=&quot;1934&quot; height=&quot;1934&quot; srcset=&quot;https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/WillMcGugan-square.92efc493faf2.jpg&amp;amp;w=483&amp;amp;sig=94fc43d642a7fa3dec28068176f3323ceb38d441 483w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/WillMcGugan-square.92efc493faf2.jpg&amp;amp;w=967&amp;amp;sig=f6aee573248c6275abe4c7618978482e4decac8d 967w, https://files.realpython.com/media/WillMcGugan-square.92efc493faf2.jpg 1934w&quot; sizes=&quot;75vw&quot; alt=&quot;Headshot of Will McGugan&quot; data-asset=&quot;3542&quot;&gt;&lt;/figure&gt;

&lt;p&gt;&lt;strong&gt;Will:&lt;/strong&gt; Thanks for having me on!&lt;/p&gt;
&lt;p&gt;I discovered programming as a kid in the ’80s. For younger readers, it was exactly like &lt;em&gt;Stranger Things&lt;/em&gt;, minus the CGI monsters. We had a ZX Spectrum+ computer back then. The graphics were flickery, and the sound was tinny, but I was hooked. At some point I discovered that you could type things on the keyboard and—if you did it just right—the computer would do as you told it.&lt;/p&gt;
&lt;p&gt;Fast-forward a few years, and I’m working in the video games industry. I’m building a game engine and looking for a scripting language to handle the game mechanics while C++ does the graphics and heavy lifting. That’s when I came across Python, version 2.1, I think. &lt;/p&gt;
&lt;p&gt;I didn’t consider it a proper programming language at the time, probably because it was too easy to use, and programming should be hard, right? Even so, I found myself coming back to Python for scripts and tools, which gradually became more sophisticated. &lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/interview-will-mcgugan/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/interview-will-mcgugan/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Understanding Python List Comprehensions</title>
      <id>https://realpython.com/courses/understand-list-comprehensions/</id>
      <link href="https://realpython.com/courses/understand-list-comprehensions/"/>
      <updated>2021-03-30T14:00:00+00:00</updated>
      <summary>Python list comprehensions make it easy to create lists while performing sophisticated filtering, mapping, and conditional logic on their members. In this course, you&#x27;ll learn when to use a list comprehension in Python and how to create them effectively.</summary>
      <content type="html">
        &lt;p&gt;One of Python&amp;rsquo;s most distinctive features is the &lt;strong&gt;list comprehension&lt;/strong&gt;, which you can use to create powerful functionality within a single line of code. However, many developers struggle to fully leverage the more advanced features, or use them too much, which can lead to code that&amp;rsquo;s less efficient and harder to read.&lt;/p&gt;
&lt;p&gt;By the end of this course, you&amp;rsquo;ll understand the full power of Python list comprehensions and how to use their features comfortably. You&amp;rsquo;ll also gain an understanding of the trade-offs that come with using them so that you can determine when other approaches are more preferable.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this course, you&amp;rsquo;ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Rewrite loops and &lt;code&gt;map()&lt;/code&gt; calls as a &lt;strong&gt;list comprehension&lt;/strong&gt; in Python&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Choose&lt;/strong&gt; between comprehensions, loops, and &lt;code&gt;map()&lt;/code&gt; calls&lt;/li&gt;
&lt;li&gt;Supercharge your comprehensions with &lt;strong&gt;conditional logic&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use comprehensions&lt;/strong&gt; to replace &lt;code&gt;filter()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Profile&lt;/strong&gt; your code to solve performance questions&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>OrderedDict vs dict in Python: The Right Tool for the Job</title>
      <id>https://realpython.com/python-ordereddict/</id>
      <link href="https://realpython.com/python-ordereddict/"/>
      <updated>2021-03-29T14:00:00+00:00</updated>
      <summary>In this step-by-step tutorial, you&#x27;ll learn what Python&#x27;s OrderedDict is and how to use it in your code. You&#x27;ll also learn about the main differences between regular dictionaries and ordered dictionaries.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Sometimes you need a Python &lt;a href=&quot;https://realpython.com/python-dicts/&quot;&gt;dictionary&lt;/a&gt; that remembers the order of its items. In the past, you had only one tool for solving this specific problem: Python’s &lt;a href=&quot;https://docs.python.org/3/library/collections.html#collections.OrderedDict&quot;&gt;&lt;code&gt;OrderedDict&lt;/code&gt;&lt;/a&gt;. It’s a dictionary subclass specially designed to remember the order of items, which is defined by the insertion order of keys.&lt;/p&gt;
&lt;p&gt;This changed in Python 3.6. The built-in &lt;code&gt;dict&lt;/code&gt; class now keeps its items ordered as well. Because of that, many in the Python community now wonder if &lt;code&gt;OrderedDict&lt;/code&gt; is still useful. A closer look at &lt;code&gt;OrderedDict&lt;/code&gt; will uncover that this class still provides valuable features.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create and use &lt;strong&gt;&lt;code&gt;OrderedDict&lt;/code&gt; objects&lt;/strong&gt; in your code&lt;/li&gt;
&lt;li&gt;Identify the &lt;strong&gt;differences&lt;/strong&gt; between &lt;code&gt;OrderedDict&lt;/code&gt; and &lt;code&gt;dict&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Understand the &lt;strong&gt;pros&lt;/strong&gt; and &lt;strong&gt;cons&lt;/strong&gt; of using &lt;code&gt;OrderedDict&lt;/code&gt; vs &lt;code&gt;dict&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With this knowledge, you’ll able to choose the dictionary class that best fits your needs when you want to preserve the order of items.&lt;/p&gt;
&lt;p&gt;By the end of the tutorial, you’ll see an example of implementing a dictionary-based queue using &lt;code&gt;OrderedDict&lt;/code&gt;, which would be more challenging if you used a regular &lt;code&gt;dict&lt;/code&gt; object.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;&lt;p&gt;&lt;strong&gt;Free Bonus:&lt;/strong&gt; &lt;a href=&quot;&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-cheat-sheet-shortened&quot; data-focus=&quot;false&quot;&gt;Click here to get a Python Cheat Sheet&lt;/a&gt; and learn the basics of Python 3, like working with data types, dictionaries, lists, and Python functions.&lt;/p&gt;&lt;/div&gt;

&lt;h2 id=&quot;choosing-between-ordereddict-and-dict&quot;&gt;Choosing Between &lt;code&gt;OrderedDict&lt;/code&gt; and &lt;code&gt;dict&lt;/code&gt;&lt;a class=&quot;headerlink&quot; href=&quot;#choosing-between-ordereddict-and-dict&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;For years, Python &lt;a href=&quot;https://realpython.com/iterate-through-dictionary-python/#a-few-words-on-dictionaries&quot;&gt;dictionaries&lt;/a&gt; were unordered &lt;a href=&quot;https://realpython.com/python-data-structures/&quot;&gt;data structures&lt;/a&gt;. Python developers were used to this fact, and they relied on &lt;a href=&quot;https://realpython.com/python-lists-tuples/&quot;&gt;lists&lt;/a&gt; or other sequences when they needed to keep their data in order. With time, developers found a need for a new type of dictionary, one that would keep its items ordered.&lt;/p&gt;
&lt;p&gt;Back in 2008, &lt;a href=&quot;https://www.python.org/dev/peps/pep-0372/&quot;&gt;PEP 372&lt;/a&gt; introduced the idea of adding a new dictionary class to &lt;a href=&quot;https://docs.python.org/3/library/collections.html#module-collections&quot;&gt;&lt;code&gt;collections&lt;/code&gt;&lt;/a&gt;. Its main goal was to remember the order of items as defined by the order in which keys were inserted. That was the origin of &lt;code&gt;OrderedDict&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Core Python developers wanted to fill in the gap and provide a dictionary that could preserve the order of inserted keys. That, in turn, allowed for a more straightforward implementation of specific algorithms that rely on this property.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;OrderedDict&lt;/code&gt; was added to the standard library in &lt;a href=&quot;https://docs.python.org/3/whatsnew/3.1.html&quot;&gt;Python 3.1&lt;/a&gt;. Its API is essentially the same as &lt;code&gt;dict&lt;/code&gt;. However, &lt;code&gt;OrderedDict&lt;/code&gt; iterates over keys and values in the same order that the keys were inserted. If a new entry overwrites an existing entry, then the order of items is left unchanged. If an entry is deleted and reinserted, then it will be moved to the end of the dictionary.&lt;/p&gt;
&lt;p&gt;Python 3.6 introduced a &lt;a href=&quot;https://docs.python.org/3/whatsnew/3.6.html#new-dict-implementation&quot;&gt;new implementation of &lt;code&gt;dict&lt;/code&gt;&lt;/a&gt;. This new implementation represents a big win in terms of memory usage and iteration efficiency. Additionally, the new implementation provides a new and somewhat unexpected feature: &lt;code&gt;dict&lt;/code&gt; objects now keep their items in the same order they were introduced. Initially, this feature was considered an implementation detail, and the documentation advised against relying on it.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; In this tutorial, you’ll focus on the implementations of &lt;code&gt;dict&lt;/code&gt; and &lt;code&gt;OrderedDict&lt;/code&gt; that &lt;a href=&quot;https://www.python.org/about/&quot;&gt;CPython&lt;/a&gt; provides.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;In the words of &lt;a href=&quot;https://twitter.com/raymondh&quot;&gt;Raymond Hettinger&lt;/a&gt;, core Python developer and coauthor of &lt;code&gt;OrderedDict&lt;/code&gt;, the class was specially designed to keep its items ordered, whereas the new implementation of &lt;code&gt;dict&lt;/code&gt; was designed to be compact and to provide fast iteration:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The current regular dictionary is based on the design I proposed several years ago. The primary goals of that design were compactness and faster iteration over the dense arrays of keys and values. Maintaining order was an artifact rather than a design goal. The design can maintain order but that is not its specialty.&lt;/p&gt;
&lt;p&gt;In contrast, I gave &lt;code&gt;collections.OrderedDict&lt;/code&gt; a different design (later coded in C by Eric Snow). The primary goal was to have efficient maintenance of order even for severe workloads such as that imposed by the &lt;code&gt;lru_cache&lt;/code&gt; which frequently alters order without touching the underlying &lt;code&gt;dict&lt;/code&gt;. Intentionally, the &lt;code&gt;OrderedDict&lt;/code&gt; has a design that prioritizes ordering capabilities at the expense of additional memory overhead and a constant factor worse insertion time.&lt;/p&gt;
&lt;p&gt;It is still my goal to have &lt;code&gt;collections.OrderedDict&lt;/code&gt; have a different design with different performance characteristics than regular dicts. It has some order specific methods that regular dicts don’t have (such as a &lt;code&gt;move_to_end()&lt;/code&gt; and a &lt;code&gt;popitem()&lt;/code&gt; that pops efficiently from either end). The &lt;code&gt;OrderedDict&lt;/code&gt; needs to be good at those operations because that is what differentiates it from regular dicts. (&lt;a href=&quot;https://mail.python.org/pipermail/python-dev/2017-December/151266.html&quot;&gt;Source&lt;/a&gt;)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In &lt;a href=&quot;https://realpython.com/python37-new-features/&quot;&gt;Python 3.7&lt;/a&gt;, the items-ordered feature of &lt;code&gt;dict&lt;/code&gt; objects was &lt;a href=&quot;https://mail.python.org/pipermail/python-dev/2017-December/151283.html&quot;&gt;declared&lt;/a&gt; an official part of the Python language specification. So, from that point on, developers could rely on &lt;code&gt;dict&lt;/code&gt; when they needed a dictionary that keeps its items ordered.&lt;/p&gt;
&lt;p&gt;At this point, a question arises: Is &lt;code&gt;OrderedDict&lt;/code&gt; still needed after this new implementation of &lt;code&gt;dict&lt;/code&gt;? The answer depends on your specific use case and also on how explicit you want to be in your code.&lt;/p&gt;
&lt;p&gt;At the time of writing, some features of &lt;code&gt;OrderedDict&lt;/code&gt; still made it valuable and different from a regular &lt;code&gt;dict&lt;/code&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Intent signaling:&lt;/strong&gt; If you use &lt;code&gt;OrderedDict&lt;/code&gt; over &lt;code&gt;dict&lt;/code&gt;, then your code makes it clear that the order of items in the dictionary is important. You’re clearly communicating that your code needs or relies on the order of items in the underlying dictionary.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Control over the order of items:&lt;/strong&gt; If you need to rearrange or reorder the items in a dictionary, then you can use &lt;a href=&quot;https://docs.python.org/3/library/collections.html#collections.OrderedDict.move_to_end&quot;&gt;&lt;code&gt;.move_to_end()&lt;/code&gt;&lt;/a&gt; and also the enhanced variation of &lt;a href=&quot;https://docs.python.org/3/library/collections.html#collections.OrderedDict.popitem&quot;&gt;&lt;code&gt;.popitem()&lt;/code&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Equality test behavior:&lt;/strong&gt; If your code compares dictionaries for equality, and the order of items is important in that comparison, then &lt;code&gt;OrderedDict&lt;/code&gt; is the right choice.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;There’s at least one more reason to continue using &lt;code&gt;OrderedDict&lt;/code&gt; in your code: &lt;strong&gt;backward compatibility&lt;/strong&gt;. Relying on regular &lt;code&gt;dict&lt;/code&gt; objects to preserve the order of items will break your code in environments that run versions of Python older than 3.6.&lt;/p&gt;
&lt;p&gt;It’s difficult to say if &lt;code&gt;dict&lt;/code&gt; will fully replace &lt;code&gt;OrderedDict&lt;/code&gt; soon. Nowadays, &lt;code&gt;OrderedDict&lt;/code&gt; still offers interesting and valuable features that you might want to consider when selecting a tool for a given job.&lt;/p&gt;
&lt;h2 id=&quot;getting-started-with-pythons-ordereddict&quot;&gt;Getting Started With Python’s &lt;code&gt;OrderedDict&lt;/code&gt;&lt;a class=&quot;headerlink&quot; href=&quot;#getting-started-with-pythons-ordereddict&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Python’s &lt;code&gt;OrderedDict&lt;/code&gt; is a &lt;code&gt;dict&lt;/code&gt; subclass that preserves the order in which &lt;strong&gt;key-value pairs&lt;/strong&gt;, commonly known as &lt;strong&gt;items&lt;/strong&gt;, are inserted into the dictionary. When you iterate over an &lt;code&gt;OrderedDict&lt;/code&gt; object, items are traversed in the original order. If you update the value of an existing key, then the order remains unchanged. If you remove an item and reinsert it, then the item is added at the end of the dictionary.&lt;/p&gt;
&lt;p&gt;Being a &lt;code&gt;dict&lt;/code&gt; subclass means that it inherits all the methods a regular dictionary provides. &lt;code&gt;OrderedDict&lt;/code&gt; also has additional features that you’ll learn about in this tutorial. In this section, however, you’ll learn the basics of creating and using &lt;code&gt;OrderedDict&lt;/code&gt; objects in your code.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-ordereddict/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-ordereddict/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #53: Improving the Learning Experience on Real Python</title>
      <id>https://realpython.com/podcasts/rpp/53/</id>
      <link href="https://realpython.com/podcasts/rpp/53/"/>
      <updated>2021-03-26T12:00:00+00:00</updated>
      <summary>If you haven&#x27;t visited the website lately, then you&#x27;re missing out on the updates to realpython.com! The site features a completely refreshed layout with multiple sections to help you take advantage of even more great educational Python content. This week on the show, we have Dan Bader, the person behind Real Python, and all these architectural changes.</summary>
      <content type="html">
        &lt;p&gt;If you haven&#x27;t visited the website lately, then you&#x27;re missing out on the updates to realpython.com! The site features a completely refreshed layout with multiple sections to help you take advantage of even more great educational Python content. This week on the show, we have Dan Bader, the person behind Real Python, and all these architectural changes.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python Community Interview With Dane Hillard</title>
      <id>https://realpython.com/interview-dane-hillard/</id>
      <link href="https://realpython.com/interview-dane-hillard/"/>
      <updated>2021-03-24T14:00:00+00:00</updated>
      <summary>Dane Hillard is a Real Python contributor and author of the book Practices of the Python Pro. In this interview, we discuss a variety of topics, including code complexity, Python package maintenance, and popcorn.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Today I’m joined by &lt;a href=&quot;https://realpython.com/team/dhillard/&quot;&gt;Dane Hillard&lt;/a&gt;, lead web application developer at &lt;a href=&quot;https://www.ithaka.org&quot;&gt;ITHAKA&lt;/a&gt; and author of &lt;a href=&quot;https://realpython.com/asins/1617296082/&quot;&gt;&lt;em&gt;Practices of the Python Pro&lt;/em&gt;&lt;/a&gt;. Dane is also a &lt;em&gt;Real Python&lt;/em&gt; &lt;a href=&quot;https://realpython.com/team/dhillard/&quot;&gt;tutorial author&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In this interview, we discuss a variety of topics, including code complexity, Python package maintenance, and popcorn. So without further ado, let’s welcome Dane.&lt;/p&gt;
&lt;p class=&quot;mt-5&quot;&gt;&lt;strong&gt;Ricky:&lt;/strong&gt; &lt;em&gt;Thanks for joining me for this interview, Dane. I’d like to start in the same manner we do with all our guests: how did you get into programming, and when did you start using Python?&lt;/em&gt;&lt;/p&gt;
&lt;figure&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid w-25 float-right ml-3 rounded-circle&quot; src=&quot;https://files.realpython.com/media/profilenew.cf86e4c32676.jpg&quot; width=&quot;1050&quot; height=&quot;1050&quot; srcset=&quot;https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/profilenew.cf86e4c32676.jpg&amp;amp;w=262&amp;amp;sig=f2565794539d8f69107ebc71d9fb2fb93574be43 262w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/profilenew.cf86e4c32676.jpg&amp;amp;w=525&amp;amp;sig=0839a61c255ee681592215f80cdf9c8fe58e2f2c 525w, https://files.realpython.com/media/profilenew.cf86e4c32676.jpg 1050w&quot; sizes=&quot;75vw&quot; alt=&quot;Dane Hillard&quot; data-asset=&quot;1668&quot;&gt;&lt;/figure&gt;

&lt;p&gt;&lt;strong&gt;Dane:&lt;/strong&gt; Thanks for having me back! &lt;em&gt;Real Python&lt;/em&gt; is a pretty nice place to spend some more time. Some of my first experiences with programming were the same for a lot of kids from the era of LiveJournal and MySpace—I was regularly customizing my profile page and theme to make sure my angsty ramblings looked their best.&lt;/p&gt;
&lt;p&gt;Around the same time, I started doing some 3D modeling in &lt;a href=&quot;https://www.rhino3d.com/&quot;&gt;Rhinoceros&lt;/a&gt; as a mostly artistic outlet, but it also offered some scripting capabilities that I tinkered with. A friend and I got pretty into &lt;a href=&quot;https://en.wikipedia.org/wiki/Liero&quot;&gt;Liero&lt;/a&gt;, and I went so far as to make a few custom weapons for us to play with. So in all, a geeky start coming out of a few tangential interests.&lt;/p&gt;
&lt;p&gt;I learned C++ and MATLAB in school and spent my first internship and full-time job working in those languages. I picked up Perl along the way and managed to land my second job using it. &lt;/p&gt;
&lt;p&gt;While learning a massive amount about SQL optimization there, I also started tinkering on some side projects with a friend. He was a big &lt;a href=&quot;https://rubyonrails.org/&quot;&gt;Rails&lt;/a&gt; guy, so I started getting exposure to Ruby. I’d been using PHP and then Spring to run a website for &lt;a href=&quot;https://www.danehillard.com&quot;&gt;my photography&lt;/a&gt; and decided to give Rails a try next. The “coding by convention” paradigm didn’t quite click with me at that time.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/interview-dane-hillard/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/interview-dane-hillard/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Records and Sets: Selecting the Ideal Data Structure</title>
      <id>https://realpython.com/courses/records-sets-ideal-data-structure/</id>
      <link href="https://realpython.com/courses/records-sets-ideal-data-structure/"/>
      <updated>2021-03-23T14:00:00+00:00</updated>
      <summary>In this course, you&#x27;ll learn about two of Python&#x27;s data structures: records and sets. You&#x27;ll look at multiple types and classes for both of these and learn which implementations are best for your specific use cases.</summary>
      <content type="html">
        &lt;p&gt;There are a variety of ways for storing and managing data in your program and the choice of the right data structure has an effect on the readability of your code, ease of writing, and performance. Python has a wide selection of built-in mechanisms that meet most of your data structure needs. This course introduces you to two types of data structures: data records and sets. &lt;/p&gt;
&lt;p&gt;There are multiple types and classes for both of these data structures and this course discusses them and provides information on how to choose the right one.&lt;/p&gt;
&lt;p&gt;In this course you&amp;rsquo;ll learn about:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What are the &lt;strong&gt;advantages&lt;/strong&gt; of using the built-in &lt;code&gt;dict&lt;/code&gt; type as a Data Record&lt;/li&gt;
&lt;li&gt;What &lt;strong&gt;flexibility&lt;/strong&gt; do DataClasses add for Records compared to regular Classes&lt;/li&gt;
&lt;li&gt;How to store &lt;strong&gt;C-type Data&lt;/strong&gt; with &lt;code&gt;struct.Struct&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;How to &lt;strong&gt;define&lt;/strong&gt; Sets &lt;/li&gt;
&lt;li&gt;Where to use a &lt;strong&gt;Frozenset&lt;/strong&gt; &lt;/li&gt;
&lt;li&gt;How to &lt;strong&gt;create a counter&lt;/strong&gt; with a multiset&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The course is the &lt;strong&gt;second&lt;/strong&gt; part of an ongoing series, exploring how to find the right Data Structure for your projects. The &lt;strong&gt;first&lt;/strong&gt; course is &lt;a href=&quot;https://realpython.com/courses/dicts-arrays-ideal-data-structure/&quot;&gt;Dictionaries and Arrays: Selecting the Ideal Data Structure&lt;/a&gt;.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Build an Asteroids Game With Python and Pygame</title>
      <id>https://realpython.com/asteroids-game-python/</id>
      <link href="https://realpython.com/asteroids-game-python/"/>
      <updated>2021-03-22T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll build a clone of the Asteroids game in Python using Pygame. Step by step, you&#x27;ll add images, input handling, game logic, sounds, and text to your program.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Do you want to create your own computer games but like Python too much to abandon it for a career as a game developer? There’s a solution for that! With the Pygame module, you can use your amazing Python skills to create games, from the basic to the very complex. Below, you’ll learn how to use Pygame by making a clone of the Asteroids game!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll learn how to build a complete game, including:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Loading &lt;strong&gt;images&lt;/strong&gt; and displaying them on the screen&lt;/li&gt;
&lt;li&gt;Handling &lt;strong&gt;user input&lt;/strong&gt; in order to control the game&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Moving objects&lt;/strong&gt; according to the &lt;strong&gt;game logic&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Detecting &lt;strong&gt;collisions&lt;/strong&gt; between object&lt;/li&gt;
&lt;li&gt;Displaying &lt;strong&gt;text&lt;/strong&gt; on the screen&lt;/li&gt;
&lt;li&gt;Playing &lt;strong&gt;sounds&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Click the link below to download the code for this project and follow along as you build your game:&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown=&quot;1&quot;&gt;Get the Source Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-asteroids-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-asteroids-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to get the source code you’ll use&lt;/a&gt; to build an Asteroids game in Python with Pygame in this tutorial.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Let’s get started!&lt;/p&gt;
&lt;h2 id=&quot;demo-asteroids-game-in-python&quot;&gt;Demo: Asteroids Game in Python&lt;a class=&quot;headerlink&quot; href=&quot;#demo-asteroids-game-in-python&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The game you’ll be making is a clone of the classic arcade game &lt;a href=&quot;https://www.youtube.com/watch?v=WYSupJ5r2zo&quot;&gt;Asteroids&lt;/a&gt;. In it, you control a spaceship and shoot asteroids. If your spaceship collides with an asteroid, you lose. If you shoot down all asteroids, you win!&lt;/p&gt;
&lt;div class=&quot;embed-responsive embed-responsive-16by9 rounded mb-3 &quot;&gt;
  &lt;iframe class=&quot;embed-responsive-item&quot; src=&quot;https://player.vimeo.com/video/511326635?background=1&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;h2 id=&quot;project-overview&quot;&gt;Project Overview&lt;a class=&quot;headerlink&quot; href=&quot;#project-overview&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Your Asteroids game in Python will feature a single spaceship. The spaceship can rotate left and right as well as accelerate forward. When it’s not accelerating, it will continue moving with the velocity it had. The spaceship can also shoot bullets.&lt;/p&gt;
&lt;p&gt;The game will use the following key mappings:&lt;/p&gt;
&lt;div class=&quot;table-responsive&quot;&gt;
&lt;table class=&quot;table table-hover&quot;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;Key&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span class=&quot;keys&quot;&gt;&lt;kbd class=&quot;key-arrow-right&quot;&gt;Right&lt;/kbd&gt;&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;Rotate the spaceship right&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span class=&quot;keys&quot;&gt;&lt;kbd class=&quot;key-arrow-left&quot;&gt;Left&lt;/kbd&gt;&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;Rotate the spaceship left&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span class=&quot;keys&quot;&gt;&lt;kbd class=&quot;key-arrow-up&quot;&gt;Up&lt;/kbd&gt;&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;Accelerate the spaceship forward&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span class=&quot;keys&quot;&gt;&lt;kbd class=&quot;key-space&quot;&gt;Space&lt;/kbd&gt;&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;Shoot&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span class=&quot;keys&quot;&gt;&lt;kbd class=&quot;key-escape&quot;&gt;Esc&lt;/kbd&gt;&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;Exit the game&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;There will also be six big asteroids in the game. When a bullet hits a big asteroid, it will split into two medium ones. When a bullet hits a medium asteroid, it will split into two small ones. A small asteroid won’t split but will be destroyed by a bullet.&lt;/p&gt;
&lt;p&gt;When an asteroid collides with the spaceship, the spaceship will be destroyed, and the game will end in a defeat. When all asteroids are gone, the game will end in a victory!&lt;/p&gt;
&lt;p&gt;The project will be broken into ten steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Setting up Pygame for a Python project&lt;/li&gt;
&lt;li&gt;Handing input in the game&lt;/li&gt;
&lt;li&gt;Loading images and showing them on the screen&lt;/li&gt;
&lt;li&gt;Creating game objects with an image, a position, and some logic&lt;/li&gt;
&lt;li&gt;Moving the spaceship&lt;/li&gt;
&lt;li&gt;Moving the asteroids and detecting collisions with the spaceship&lt;/li&gt;
&lt;li&gt;Shooting bullets and destroying asteroids&lt;/li&gt;
&lt;li&gt;Splitting asteroids into smaller ones&lt;/li&gt;
&lt;li&gt;Playing sounds&lt;/li&gt;
&lt;li&gt;Handling the end of the game&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Each step will provide links to all necessary resources.&lt;/p&gt;
&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;a class=&quot;headerlink&quot; href=&quot;#prerequisites&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To build your Asteroids game, you’ll need some more advanced elements of Python. You should already be comfortable with the language itself as well as with concepts like classes, inheritance, and callbacks. If you need to refresh your knowledge on these topics, then check our &lt;a href=&quot;https://realpython.com/python3-object-oriented-programming/&quot;&gt;Object-Oriented Programming (OOP) in Python 3&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The game will also use &lt;strong&gt;vectors&lt;/strong&gt; to represent positions and directions, as well as some vector operations to move the elements on the screen. Pygame will take care of most of the math, and all the necessary concepts will be explained in this tutorial. However, if you want to know more, then you can check out &lt;a href=&quot;https://www.onlinemathlearning.com/vector-addition.html&quot;&gt;Vector Addition&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;https://www.pygame.org/docs/&quot;&gt;Pygame documentation&lt;/a&gt; can be useful if you want to understand some concepts in depth, but you’ll find everything you need to know in this tutorial.&lt;/p&gt;
&lt;h2 id=&quot;step-1-pygame-setup&quot;&gt;Step 1: Pygame Setup&lt;a class=&quot;headerlink&quot; href=&quot;#step-1-pygame-setup&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;At the end of this step, you’ll have a small Python project that uses Pygame. It will display a window with a caption, filled with a blue color. This will be first step toward your Asteroids game. You won’t need any specific game development tools. Your favorite text editor and the command line will be enough.&lt;/p&gt;
&lt;h3 id=&quot;python-project&quot;&gt;Python Project&lt;a class=&quot;headerlink&quot; href=&quot;#python-project&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/asteroids-game-python/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/asteroids-game-python/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #52: Connecting to MongoDB and Updates on the Python Packaging Landscape</title>
      <id>https://realpython.com/podcasts/rpp/52/</id>
      <link href="https://realpython.com/podcasts/rpp/52/"/>
      <updated>2021-03-19T12:00:00+00:00</updated>
      <summary>Have you heard about NoSQL databases, or wondered how to use one with Python? How does MongoDB store information and what packages can you use to connect this type of database to your Python project? This week on the show, David Amos is back, and he&#x27;s brought another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;Have you heard about NoSQL databases, or wondered how to use one with Python? How does MongoDB store information and what packages can you use to connect this type of database to your Python project? This week on the show, David Amos is back, and he&#x27;s brought another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python AI: How to Build a Neural Network &amp; Make Predictions</title>
      <id>https://realpython.com/python-ai-neural-network/</id>
      <link href="https://realpython.com/python-ai-neural-network/"/>
      <updated>2021-03-17T14:00:00+00:00</updated>
      <summary>In this step-by-step tutorial, you&#x27;ll build a neural network from scratch as an introduction to the world of artificial intelligence (AI) in Python. You&#x27;ll learn how to train your neural network and make accurate predictions based on a given dataset.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;If you’re just starting out in the artificial intelligence (AI) world, then Python is a great language to learn since most of the tools are built using it. &lt;strong&gt;Deep learning&lt;/strong&gt; is a technique used to make predictions using data, and it heavily relies on &lt;a href=&quot;https://en.wikipedia.org/wiki/Neural_network&quot;&gt;neural networks&lt;/a&gt;. Today, you’ll learn how to build a neural network from scratch.&lt;/p&gt;
&lt;p&gt;In a production setting, you would use a deep learning framework like &lt;a href=&quot;https://www.tensorflow.org/&quot;&gt;TensorFlow&lt;/a&gt; or &lt;a href=&quot;https://pytorch.org/&quot;&gt;PyTorch&lt;/a&gt; instead of building your own neural network. That said, having some knowledge of how neural networks work is helpful because you can use it to better architect your deep learning models.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll learn:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What &lt;strong&gt;artificial intelligence&lt;/strong&gt; is&lt;/li&gt;
&lt;li&gt;How both &lt;strong&gt;machine learning&lt;/strong&gt; and &lt;strong&gt;deep learning&lt;/strong&gt; play a role in AI&lt;/li&gt;
&lt;li&gt;How a &lt;strong&gt;neural network&lt;/strong&gt; functions internally&lt;/li&gt;
&lt;li&gt;How to &lt;strong&gt;build a neural network&lt;/strong&gt; from scratch using Python&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Let’s get started!&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;&lt;p&gt;&lt;strong&gt;Free Bonus:&lt;/strong&gt; &lt;a href=&quot;#&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-numpy-learning-guide&quot; data-focus=&quot;false&quot;&gt;Click here to get access to a free NumPy Resources Guide&lt;/a&gt; that points you to the best tutorials, videos, and books for improving your NumPy skills.&lt;/p&gt;&lt;/div&gt;

&lt;h2 id=&quot;artificial-intelligence-overview&quot;&gt;Artificial Intelligence Overview&lt;a class=&quot;headerlink&quot; href=&quot;#artificial-intelligence-overview&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In basic terms, the goal of using AI is to make computers think as humans do. This may seem like something new, but the field was born in the 1950s.&lt;/p&gt;
&lt;p&gt;Imagine that you need to write a Python program that uses AI to &lt;a href=&quot;https://realpython.com/python-practice-problems/#python-practice-problem-5-sudoku-solver&quot;&gt;solve a sudoku problem&lt;/a&gt;. A way to accomplish that is to write &lt;a href=&quot;https://realpython.com/python-conditional-statements/&quot;&gt;conditional statements&lt;/a&gt; and check the constraints to see if you can place a number in each position. Well, this Python script is already an application of AI because you programmed a computer to solve a problem! &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Machine learning (ML)&lt;/strong&gt; and &lt;strong&gt;deep learning (DL)&lt;/strong&gt; are also approaches to solving problems. The difference between these techniques and a Python script is that ML and DL use &lt;strong&gt;training data&lt;/strong&gt; instead of hard-coded rules, but all of them can be used to solve problems using AI. In the next sections, you’ll learn more about what differentiates these two techniques.&lt;/p&gt;
&lt;h3 id=&quot;machine-learning&quot;&gt;Machine Learning&lt;a class=&quot;headerlink&quot; href=&quot;#machine-learning&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Machine learning is a technique in which you train the system to solve a problem instead of explicitly programming the rules. Getting back to the sudoku example in the previous section, to solve the problem using machine learning, you would gather data from solved sudoku games and train a &lt;strong&gt;statistical model&lt;/strong&gt;. &lt;a href=&quot;https://en.wikipedia.org/wiki/Statistical_model&quot;&gt;Statistical models&lt;/a&gt; are mathematically formalized ways to approximate the behavior of a phenomenon. &lt;/p&gt;
&lt;p&gt;A common machine learning task is &lt;a href=&quot;https://en.wikipedia.org/wiki/Supervised_learning&quot;&gt;supervised learning&lt;/a&gt;, in which you have a dataset with inputs and known outputs. The task is to use this dataset to train a model that predicts the correct outputs based on the inputs. The image below presents the workflow to train a model using supervised learning:&lt;/p&gt;
&lt;figure&gt;&lt;a href=&quot;https://files.realpython.com/media/ML_workflow.8620ebb656aa.png&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block &quot; src=&quot;https://files.realpython.com/media/ML_workflow.8620ebb656aa.png&quot; width=&quot;2315&quot; height=&quot;1400&quot; srcset=&quot;https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/ML_workflow.8620ebb656aa.png&amp;amp;w=578&amp;amp;sig=8f7c580fcfd80f7930a29f660ae926da04548b31 578w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/ML_workflow.8620ebb656aa.png&amp;amp;w=1157&amp;amp;sig=e5b87d878cd33fb9e00cb512e2819f271535cf40 1157w, https://files.realpython.com/media/ML_workflow.8620ebb656aa.png 2315w&quot; sizes=&quot;75vw&quot; alt=&quot;Supervised Learning Workflow&quot; data-asset=&quot;3412&quot;&gt;&lt;/a&gt;&lt;figcaption class=&quot;figure-caption text-center&quot;&gt;Workflow to train a machine learning model&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;The combination of the training data with the machine learning algorithm creates the model. Then, with this model, you can make predictions for new data.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;a href=&quot;https://scikit-learn.org&quot;&gt;scikit-learn&lt;/a&gt; is a popular Python machine learning library that provides many supervised and unsupervised learning algorithms. To learn more about it, check out &lt;a href=&quot;https://realpython.com/train-test-split-python-data/&quot;&gt;Split Your Dataset With scikit-learn’s train_test_split()&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The goal of supervised learning tasks is to make predictions for new, unseen data. To do that, you assume that this unseen data follows a &lt;a href=&quot;https://en.wikipedia.org/wiki/Probability_distribution&quot;&gt;probability distribution&lt;/a&gt; similar to the distribution of the training dataset. If in the future this distribution changes, then you need to train your model again using the new training dataset.&lt;/p&gt;
&lt;h3 id=&quot;feature-engineering&quot;&gt;Feature Engineering&lt;a class=&quot;headerlink&quot; href=&quot;#feature-engineering&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Prediction problems become harder when you use different kinds of data as inputs. The sudoku problem is relatively straightforward because you’re dealing directly with numbers. What if you want to train a model to predict the sentiment in a sentence? Or what if you have an image, and you want to know whether it depicts a cat? &lt;/p&gt;
&lt;p&gt;Another name for input data is &lt;strong&gt;feature&lt;/strong&gt;, and &lt;strong&gt;feature engineering&lt;/strong&gt; is the process of extracting features from raw data. When dealing with different kinds of data, you need to figure out ways to represent this data in order to extract meaningful information from it.&lt;/p&gt;
&lt;p&gt;An example of a feature engineering technique is &lt;a href=&quot;https://realpython.com/sentiment-analysis-python/#normalizing-words&quot;&gt;lemmatization&lt;/a&gt;, in which you remove the inflection from words in a sentence. For example, inflected forms of the verb “watch,” like “watches,” “watching,” and “watched,” would be reduced to their &lt;strong&gt;lemma&lt;/strong&gt;, or base form: “watch.” &lt;/p&gt;
&lt;p&gt;If you’re using arrays to store each word of a corpus, then by applying lemmatization, you end up with a less-sparse matrix. This can increase the performance of some machine learning algorithms. The following image presents the process of lemmatization and representation using a &lt;a href=&quot;https://en.wikipedia.org/wiki/Bag-of-words_model&quot;&gt;bag-of-words model&lt;/a&gt;:&lt;/p&gt;
&lt;figure&gt;&lt;a href=&quot;https://files.realpython.com/media/Features_from_text.9296775db229.png&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block &quot; src=&quot;https://files.realpython.com/media/Features_from_text.9296775db229.png&quot; width=&quot;2315&quot; height=&quot;1400&quot; srcset=&quot;https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/Features_from_text.9296775db229.png&amp;amp;w=578&amp;amp;sig=e9ad1f6d0eac4221c5776dd41aae18f76d7dd0ae 578w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/Features_from_text.9296775db229.png&amp;amp;w=1157&amp;amp;sig=bc00742cf912e073b0527552089ae1f443ab9c49 1157w, https://files.realpython.com/media/Features_from_text.9296775db229.png 2315w&quot; sizes=&quot;75vw&quot; alt=&quot;Feature engineering from text to numeric array&quot; data-asset=&quot;3417&quot;&gt;&lt;/a&gt;&lt;figcaption class=&quot;figure-caption text-center&quot;&gt;Creating features using a bag-of-words model&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;First, the inflected form of every word is reduced to its lemma. Then, the number of occurrences of that word is computed. The result is an array containing the number of occurrences of every word in the text.&lt;/p&gt;
&lt;h3 id=&quot;deep-learning&quot;&gt;Deep Learning&lt;a class=&quot;headerlink&quot; href=&quot;#deep-learning&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-ai-neural-network/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-ai-neural-network/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python Booleans: Leveraging the Values of Truth</title>
      <id>https://realpython.com/courses/booleans-leveraging-truth/</id>
      <link href="https://realpython.com/courses/booleans-leveraging-truth/"/>
      <updated>2021-03-16T14:00:00+00:00</updated>
      <summary>In this course, you&#x27;ll learn about the built-in Python Boolean data type, which is used to represent the truth value of an expression. You&#x27;ll see how to use Booleans to compare values, check for identity and membership, and control the flow of your programs with conditionals.</summary>
      <content type="html">
        &lt;p&gt;Understanding how Python Boolean values behave is important to programming well in Python. The &lt;strong&gt;Python Boolean&lt;/strong&gt; type is one of Python&amp;rsquo;s &lt;a href=&quot;https://realpython.com/python-data-types/&quot;&gt;built-in data types&lt;/a&gt;. It&amp;rsquo;s used to represent the truth value of an expression.  For example, the expression &lt;code&gt;1 &amp;lt;= 2&lt;/code&gt; is &lt;code&gt;True&lt;/code&gt;, while the expression &lt;code&gt;0 == 1&lt;/code&gt; is &lt;code&gt;False&lt;/code&gt;. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this course, you&amp;rsquo;ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use Python Booleans to write &lt;strong&gt;efficient and readable&lt;/strong&gt; Python code&lt;/li&gt;
&lt;li&gt;Manipulate Boolean values with &lt;strong&gt;Boolean operators&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Convert Booleans to &lt;strong&gt;other types&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Convert other types to &lt;strong&gt;Python Booleans&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python Community Interview With Ewa Jodlowska</title>
      <id>https://realpython.com/interview-ewa-jodlowska/</id>
      <link href="https://realpython.com/interview-ewa-jodlowska/"/>
      <updated>2021-03-15T14:00:00+00:00</updated>
      <summary>Today I&#x27;m joined by Ewa Jodlowska, the executive director of the Python Software Foundation (PSF). In this interview, we discuss how Ewa started her tech journey, how COVID-19 affected the PSF, plans for PyCon US 2021, her love of hiking and lifting weights, and much more.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Today I’m joined by &lt;a href=&quot;https://twitter.com/ewa_jodlowska&quot;&gt;Ewa Jodlowska&lt;/a&gt;, executive director of the &lt;a href=&quot;https://www.python.org/psf-landing/&quot;&gt;Python Software Foundation&lt;/a&gt; (PSF), the organization devoted to advancing open source technology related to the Python programming language.&lt;/p&gt;
&lt;p&gt;In this interview, we discuss how Ewa started her tech journey, how  COVID-19 affected the PSF, plans for &lt;a href=&quot;https://us.pycon.org/2021/&quot;&gt;PyCon US 2021&lt;/a&gt;, her love of hiking and lifting weights, and much more.&lt;/p&gt;
&lt;p class=&quot;mt-5&quot;&gt;&lt;strong&gt;Ricky:&lt;/strong&gt; &lt;em&gt;Thank you for joining me, Ewa. You’ve been at the PSF for over nine years at this point, first as the events coordinator, then as the director of operations, and now as the executive director. I’m curious to know a little about your background, how you found your way in the PSF, and why you’re so passionate about Python.&lt;/em&gt;&lt;/p&gt;
&lt;figure&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid w-25 float-right ml-3 rounded-circle&quot; src=&quot;https://files.realpython.com/media/ejodlowska_open_source_small.c28aa6ad735e.jpeg&quot; width=&quot;592&quot; height=&quot;568&quot; srcset=&quot;https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/ejodlowska_open_source_small.c28aa6ad735e.jpeg&amp;amp;w=148&amp;amp;sig=f6c73530987822cee69d0b8d2f43c4559b88373f 148w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/ejodlowska_open_source_small.c28aa6ad735e.jpeg&amp;amp;w=296&amp;amp;sig=f1c28193cafca0fb86a62dedb416553282ed1c36 296w, https://files.realpython.com/media/ejodlowska_open_source_small.c28aa6ad735e.jpeg 592w&quot; sizes=&quot;75vw&quot; alt=&quot;Headshot of Ewa Jodlowska&quot; data-asset=&quot;3525&quot;&gt;&lt;/figure&gt;

&lt;p&gt;&lt;strong&gt;Ewa:&lt;/strong&gt; That is a great question—and not one I get asked often!&lt;/p&gt;
&lt;p&gt;I was first introduced to PyCon through my previous employer, where I was a meeting planner, account manager, and eventually a software engineer! We were contracted in 2008 to help out in several ways: We helped with logistical conference planning and eventually built a registration site for PyCon and managed hotel reservations. Back then, we were programming using PHP and Informix 4GL.&lt;/p&gt;
&lt;p&gt;I implemented many first-time registration functionalities, such as how people signed up for tutorials! Of course, PyCon has its own system now, but the flow of it is still based on what was created for PyCon 2009.&lt;/p&gt;
&lt;p&gt;Going to PyCon in 2008 and 2009 inspired me to get my CS degree through night school. Even though it didn’t offer any Python courses, it helped uncover more of the tech scene for me.&lt;/p&gt;
&lt;p&gt;In 2011 I left my previous employer to adventure around Europe for a couple of years, and the PSF offered me a part-time position to work on PyCon! By June of 2012 I was offered full-time employment since PyCon really took off when it was in Santa Clara, California. A couple months later, the PSF’s part-time administrator left, and that responsibility was added to my role. &lt;/p&gt;
&lt;p&gt;Through that role I received a lot of exposure to what the PSF did outside of PyCon and our wonderful community. From that time, the PSF really began to flourish, and the support we provided (and continue to provide) to the Python community continued to evolve. &lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/interview-ewa-jodlowska/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/interview-ewa-jodlowska/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #51: Navigating Options for Deploying Your Python Application</title>
      <id>https://realpython.com/podcasts/rpp/51/</id>
      <link href="https://realpython.com/podcasts/rpp/51/"/>
      <updated>2021-03-12T12:00:00+00:00</updated>
      <summary>What goes into the decision of how to host your Python code or application in the cloud? Which technology stack is the right size for your project? This week on the show, we have Calvin Hendryx-Parker. Calvin talks about cloud hosting options, infrastructure choices, and deployment tools.</summary>
      <content type="html">
        &lt;p&gt;What goes into the decision of how to host your Python code or application in the cloud? Which technology stack is the right size for your project? This week on the show, we have Calvin Hendryx-Parker. Calvin talks about cloud hosting options, infrastructure choices, and deployment tools.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Build a Contact Book With Python, PyQt, and SQLite</title>
      <id>https://realpython.com/python-contact-book/</id>
      <link href="https://realpython.com/python-contact-book/"/>
      <updated>2021-03-10T14:00:00+00:00</updated>
      <summary>In this step-by-step project, you&#x27;ll build a minimal contact book application using Python, with PyQt to build the application&#x27;s GUI and SQLite to handle the database.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Building &lt;a href=&quot;https://realpython.com/intermediate-python-project-ideas/&quot;&gt;projects&lt;/a&gt; is arguably one of the more approachable and effective ways of learning to program. Real projects require you to apply different and varied coding skills. They also encourage you to research topics that pop up as you’re solving problems in the development process. In this tutorial, you’ll create a contact book application with Python, PyQt, and SQLite.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create a &lt;strong&gt;graphical user interface (GUI)&lt;/strong&gt; for your contact book application using Python and PyQt&lt;/li&gt;
&lt;li&gt;Connect the application to an &lt;strong&gt;SQLite database&lt;/strong&gt; using &lt;strong&gt;PyQt’s SQL support&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Manage contact data using &lt;strong&gt;PyQt’s Model-View architecture&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;At the end of this project, you’ll have a functional contact book application that will allow you to store and manage your contact information.&lt;/p&gt;
&lt;p&gt;To get the complete source code for the application as well as the code for every step you’ll go through in this tutorial, click the link below:&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown=&quot;1&quot;&gt;Get the Source Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-contact-book-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-contact-book-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to get the source code you’ll use&lt;/a&gt; to build a contact book with Python, PyQt, and SQLite in this tutorial.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;demo-a-contact-book-with-python&quot;&gt;Demo: A Contact Book With Python&lt;a class=&quot;headerlink&quot; href=&quot;#demo-a-contact-book-with-python&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Contact books are a useful and widely used kind of application. They’re everywhere. You probably have a contact book on your phone and on your computer. With a contact book, you can store and manage contact information for your family members, friends, coworkers, and so on.&lt;/p&gt;
&lt;p&gt;In this tutorial, you’ll code a contact book GUI application with Python, &lt;a href=&quot;https://www.sqlite.org/about.html&quot;&gt;SQLite&lt;/a&gt;, and &lt;a href=&quot;https://www.riverbankcomputing.com/static/Docs/PyQt5/&quot;&gt;PyQt&lt;/a&gt;. Here’s a demo of how your contact book will look and work after you follow the steps in this tutorial:&lt;/p&gt;
&lt;div class=&quot;embed-responsive embed-responsive-16by9 rounded mb-3 border&quot;&gt;
  &lt;iframe class=&quot;embed-responsive-item&quot; src=&quot;https://player.vimeo.com/video/500503701?background=1&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;p&gt;Your contact book will provide the minimal required set of features for this kind of application. You’ll be able to display, create, update, and remove the information in your contacts list.&lt;/p&gt;
&lt;h2 id=&quot;project-overview&quot;&gt;Project Overview&lt;a class=&quot;headerlink&quot; href=&quot;#project-overview&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To build your contact book application, you need to organize the code into modules and packages and give your project a coherent structure. In this tutorial, you’ll use the following directories and files structure:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;rpcontacts_project/
│
├── rpcontacts/
│   ├── __init__.py
│   ├── views.py
│   ├── database.py
│   ├── main.py
│   └── model.py
│
├── requirements.txt
├── README.md
└── rpcontacts.py
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Here’s a brief summary of the contents of your project directory:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;rpcontacts_project/&lt;/code&gt;&lt;/strong&gt; is the project’s root directory. It’ll contain the following files:&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;requirements.txt&lt;/code&gt;&lt;/strong&gt; provides the project’s requirements list.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;README.md&lt;/code&gt;&lt;/strong&gt; provides general information about the project.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;rpcontacts.py&lt;/code&gt;&lt;/strong&gt; provides the entry-point script to run the application.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;rpcontacts/&lt;/code&gt;&lt;/strong&gt; is a subdirectory that provides the application’s main package. It provides the following modules:&lt;ul&gt;
&lt;li&gt;&lt;code&gt;__init__.py&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;views.py&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;database.py&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;main.py&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;model.py&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You’ll cover each of these files step by step in this tutorial. The name of each file gives an idea of its role in the application. For example, &lt;code&gt;views.py&lt;/code&gt; will contain the code to generate the GUI of windows and dialogs, &lt;code&gt;database.py&lt;/code&gt; will contain code to work with the database, and &lt;code&gt;main.py&lt;/code&gt; will host the application itself. Finally, &lt;code&gt;model.py&lt;/code&gt; will implement the model to manage the data in the application’s database.&lt;/p&gt;
&lt;p&gt;In general, the application will have a main window to display, add, remove, and update contacts. It’ll also have a dialog to add new contacts to the database.&lt;/p&gt;
&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;a class=&quot;headerlink&quot; href=&quot;#prerequisites&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To get the most out of this project, some previous knowledge of GUI programming with Python and PyQt would help. In this regard, you’ll need to know the basics of how to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create GUI applications with PyQt and Python&lt;/li&gt;
&lt;li&gt;Build and lay out GUIs with PyQt&lt;/li&gt;
&lt;li&gt;Manage SQL databases with Python and PyQt&lt;/li&gt;
&lt;li&gt;Work with &lt;a href=&quot;https://realpython.com/python-sql-libraries/#sqlite&quot;&gt;SQLite&lt;/a&gt; databases&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To brush up on these topics, you can check out the following resources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-pyqt-gui-calculator/&quot;&gt;Python and PyQt: Building a GUI Desktop Calculator&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-menus-toolbars/&quot;&gt;Python and PyQt: Creating Menus, Toolbars, and Status Bars&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-pyqt-layout/&quot;&gt;PyQt Layouts: Create Professional-Looking GUI Applications&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-pyqt-database/&quot;&gt;Handling SQL Databases With PyQt: The Basics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-sql-libraries/&quot;&gt;Introduction to Python SQL Libraries&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-sqlite-sqlalchemy/&quot;&gt;Data Management With Python, SQLite, and SQLAlchemy&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Don’t worry if you’re not an expert in these areas before starting this tutorial. You’ll learn through the process of getting your hands dirty on a real project. If you get stuck, then take your time and review the resources linked above. Then get back to the code.&lt;/p&gt;
&lt;p&gt;The contact book application you’re going to build in this tutorial has a single external dependency: PyQt.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-contact-book/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-contact-book/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Django View Authorization: Restricting Access</title>
      <id>https://realpython.com/courses/django-view-authorization/</id>
      <link href="https://realpython.com/courses/django-view-authorization/"/>
      <updated>2021-03-09T14:00:00+00:00</updated>
      <summary>This course covers how to restrict your web pages to users with different roles through Django view authorization. You&#x27;ll learn about HttpRequest.user objects, view decorators that authenticate, and how to notify your users with the Django messages framework.</summary>
      <content type="html">
        &lt;p&gt;Django provides tools for both authentication and authorization. Django view authorization is typically done with &lt;strong&gt;decorators&lt;/strong&gt;. This course will show you how to use these view decorators to enforce authorized viewing of pages in your Django site.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this course you&amp;rsquo;ll know how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use &lt;strong&gt;&lt;code&gt;HttpRequest&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;HttpRequest.user&lt;/code&gt;&lt;/strong&gt; objects&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Authenticate&lt;/strong&gt; and &lt;strong&gt;authorize&lt;/strong&gt; users&lt;/li&gt;
&lt;li&gt;Differentiate between &lt;strong&gt;regular&lt;/strong&gt;, &lt;strong&gt;staff&lt;/strong&gt;, and &lt;strong&gt;admin&lt;/strong&gt; users&lt;/li&gt;
&lt;li&gt;Secure a view with the &lt;strong&gt;&lt;code&gt;@login_required&lt;/code&gt;&lt;/strong&gt; decorator&lt;/li&gt;
&lt;li&gt;Restrict a view to different roles with the &lt;strong&gt;&lt;code&gt;@user_passes_test&lt;/code&gt;&lt;/strong&gt; decorator&lt;/li&gt;
&lt;li&gt;Use the Django &lt;strong&gt;messages framework&lt;/strong&gt; to notify your users&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast: It&#x27;s Been a Year!</title>
      <id>https://realpython.com/real-python-podcast-first-year/</id>
      <link href="https://realpython.com/real-python-podcast-first-year/"/>
      <updated>2021-03-08T14:00:00+00:00</updated>
      <summary>The Real Python Podcast just reached a major milestone: its fiftieth episode! In this article, you&#x27;ll look at some of the awesome guests we&#x27;ve had and topics we&#x27;ve covered, and you&#x27;ll get a preview of the exciting things happening in the future.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;This week, the &lt;a href=&quot;https://realpython.com/podcasts/rpp/&quot;&gt;Real Python Podcast&lt;/a&gt; is reaching its &lt;a href=&quot;https://realpython.com/podcasts/rpp/50/&quot;&gt;fiftieth episode&lt;/a&gt;! &lt;/p&gt;
&lt;p&gt;It’s been quite a year, full of sharing and learning and connecting in the Python &lt;strong&gt;community&lt;/strong&gt;. We’re looking forward to bringing you more interesting guests, interviews with &lt;strong&gt;expert Pythonistas&lt;/strong&gt;, and lots of &lt;strong&gt;behind-the-scenes&lt;/strong&gt; with the &lt;em&gt;Real Python&lt;/em&gt; team.&lt;/p&gt;
&lt;p&gt;Here’s a quick look at some of what’s been going on with the podcast in the past year as well as a sneak peek at what’s to come!&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;&lt;p&gt;&lt;strong&gt;Free Bonus:&lt;/strong&gt; &lt;a href=&quot;&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-cheat-sheet-shortened&quot; data-focus=&quot;false&quot;&gt;Click here to get a Python Cheat Sheet&lt;/a&gt; and learn the basics of Python 3, like working with data types, dictionaries, lists, and Python functions.&lt;/p&gt;&lt;/div&gt;

&lt;h2 id=&quot;pycon-speakers-shared-their-expertise&quot;&gt;PyCon Speakers Shared Their Expertise&lt;a class=&quot;headerlink&quot; href=&quot;#pycon-speakers-shared-their-expertise&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://realpython.com/pycon-guide/&quot;&gt;PyCon&lt;/a&gt; is an important hub for the Python community, so we absolutely had to bring you the experts who are sharing their expertise at this conference. Here are some of the speakers you heard from this past year:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/real-python-podcast-first-year/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/real-python-podcast-first-year/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #50: Consuming APIs With Python and Building Microservices With gRPC</title>
      <id>https://realpython.com/podcasts/rpp/50/</id>
      <link href="https://realpython.com/podcasts/rpp/50/"/>
      <updated>2021-03-05T12:00:00+00:00</updated>
      <summary>Have you wanted to get your Python code to consume data from web-based APIs? Maybe you&#x27;ve dabbled with the requests package, but you don&#x27;t know what steps to take next. This week on the show, David Amos is back, and he&#x27;s brought another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;Have you wanted to get your Python code to consume data from web-based APIs? Maybe you&#x27;ve dabbled with the requests package, but you don&#x27;t know what steps to take next. This week on the show, David Amos is back, and he&#x27;s brought another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>New Features: Article Bookmarks, Completion Status, and Search Improvements</title>
      <id>https://realpython.com/article-bookmarks-search-improvements/</id>
      <link href="https://realpython.com/article-bookmarks-search-improvements/"/>
      <updated>2021-03-03T14:00:00+00:00</updated>
      <summary>We&#x27;ve just launched out several new features to help you easily find and review the learning resources you&#x27;re looking for: article bookmarks, completion status tracking, and search improvements.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;With close to 2,000 Python tutorials and video lessons in the Real Python content library, it was getting harder and harder for learners to find the right  resources at the right time.&lt;/p&gt;
&lt;p&gt;To fix that, we’ve just launched out several new features to help you easily find and review the learning resources you’re looking for.&lt;/p&gt;
&lt;p&gt;Here’s what’s new:&lt;/p&gt;
&lt;h2 id=&quot;article-completion-status-and-bookmarks&quot;&gt;Article Completion Status and Bookmarks&lt;a class=&quot;headerlink&quot; href=&quot;#article-completion-status-and-bookmarks&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Just like with courses and course lessons, you can now &lt;strong&gt;bookmark written tutorials&lt;/strong&gt; and &lt;strong&gt;mark them as completed&lt;/strong&gt; to track your learning progress.&lt;/p&gt;
&lt;p&gt;This makes it super easy to save tutorials you want to read, or to keep tutorials you found valuable around for future reference:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/article-bookmarks-search-improvements/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/article-bookmarks-search-improvements/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Navigating Namespaces and Scope in Python</title>
      <id>https://realpython.com/courses/navigate-namespaces-scope/</id>
      <link href="https://realpython.com/courses/navigate-namespaces-scope/"/>
      <updated>2021-03-02T14:00:00+00:00</updated>
      <summary>In this course, you&#x27;ll learn about Python namespaces, the structures used to store and organize the symbolic names created during execution of a Python program. You&#x27;ll learn when namespaces are created, how they are implemented, and how they define variable scope.</summary>
      <content type="html">
        &lt;p&gt;In a program of any complexity, you&amp;rsquo;ll create hundreds or thousands of names, each pointing to a specific object. How does Python keep track of all these names so that they don&amp;rsquo;t interfere with one another? This course covers Python namespaces, the structures used to organize the symbolic names assigned to objects in a Python program.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this course, you&amp;rsquo;ll learn:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How Python organizes symbolic names and objects in &lt;strong&gt;namespaces&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;When Python creates a new namespace&lt;/li&gt;
&lt;li&gt;How namespaces are implemented&lt;/li&gt;
&lt;li&gt;How &lt;strong&gt;variable scope&lt;/strong&gt; determines symbolic name visibility&lt;/li&gt;
&lt;li&gt;What is the &lt;strong&gt;LEGB&lt;/strong&gt; rule&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python and MongoDB: Connecting to NoSQL Databases</title>
      <id>https://realpython.com/introduction-to-mongodb-and-python/</id>
      <link href="https://realpython.com/introduction-to-mongodb-and-python/"/>
      <updated>2021-03-01T16:59:25+00:00</updated>
      <summary>In this step-by-step tutorial, you&#x27;ll learn how to use Python to interface with the NoSQL database system MongoDB. You&#x27;ll get an overview of the differences between SQL and NoSQL, and you&#x27;ll also learn about related tools, including PyMongo and MongoEngine.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;&lt;a href=&quot;https://www.mongodb.com/what-is-mongodb&quot;&gt;MongoDB&lt;/a&gt; is a &lt;a href=&quot;https://en.wikipedia.org/wiki/Document-oriented_database&quot;&gt;document-oriented&lt;/a&gt; and &lt;a href=&quot;https://en.wikipedia.org/wiki/NoSQL&quot;&gt;NoSQL&lt;/a&gt; database solution that provides great scalability and flexibility along with a powerful querying system. With MongoDB and Python, you can develop many different types of database applications quickly. So if your Python application needs a database that’s just as flexible as the language itself, then MongoDB is for you.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll learn:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What &lt;strong&gt;MongoDB&lt;/strong&gt; is&lt;/li&gt;
&lt;li&gt;How to &lt;strong&gt;install and run&lt;/strong&gt; MongoDB&lt;/li&gt;
&lt;li&gt;How to work with &lt;strong&gt;MongoDB databases&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;How to use the low-level &lt;strong&gt;PyMongo driver&lt;/strong&gt; to interface with MongoDB&lt;/li&gt;
&lt;li&gt;How to use the high-level &lt;strong&gt;MongoEngine object-document mapper (ODM)&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Throughout this tutorial, you’ll write a couple of examples that will demonstrate the flexibility and power of MongoDB and its great Python support. To download the source code for those examples, click the link below:&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown=&quot;1&quot;&gt;Get the Source Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-mongodb-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-mongodb-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to get the source code you’ll use&lt;/a&gt; to learn about using MongoDB with Python in this tutorial.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;using-sql-vs-nosql-databases&quot;&gt;Using SQL vs NoSQL Databases&lt;a class=&quot;headerlink&quot; href=&quot;#using-sql-vs-nosql-databases&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;For decades, &lt;a href=&quot;https://en.wikipedia.org/wiki/SQL&quot;&gt;SQL&lt;/a&gt; databases were one of the only choices for developers looking to build large and scalable database systems. However, the increasing need for storing complex data structures led to the birth of &lt;strong&gt;NoSQL&lt;/strong&gt; databases. This new kind of database system allows developers to store heterogeneous and structureless data efficiently.&lt;/p&gt;
&lt;p&gt;In general, NoSQL database systems store and retrieve data in a much different way from SQL &lt;a href=&quot;https://en.wikipedia.org/wiki/Relational_database#RDBMS&quot;&gt;relational database management systems&lt;/a&gt; (RDBMSs).&lt;/p&gt;
&lt;p&gt;When it comes to choosing from the currently available database technologies, you might need to decide between using SQL or NoSQL systems. Both of them have specific features that you should consider when choosing one or the other. Here are some of their more substantial differences:&lt;/p&gt;
&lt;div class=&quot;table-responsive&quot;&gt;
&lt;table class=&quot;table table-hover&quot;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Property&lt;/th&gt;
&lt;th&gt;SQL Databases&lt;/th&gt;
&lt;th&gt;NoSQL Databases&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Data model&lt;/td&gt;
&lt;td&gt;Relational&lt;/td&gt;
&lt;td&gt;Nonrelational&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Structure&lt;/td&gt;
&lt;td&gt;Table-based, with columns and rows&lt;/td&gt;
&lt;td&gt;Document based, key-value pairs, graph, or wide-column&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Schema&lt;/td&gt;
&lt;td&gt;A predefined and strict schema in which every record (row) is of the same nature and possesses the same properties&lt;/td&gt;
&lt;td&gt;A dynamic schema or schemaless which means that records don’t need to be of the same nature&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Query language&lt;/td&gt;
&lt;td&gt;Structured Query Language (SQL)&lt;/td&gt;
&lt;td&gt;Varies from database to database&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scalability&lt;/td&gt;
&lt;td&gt;Vertical&lt;/td&gt;
&lt;td&gt;Horizontal&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/ACID&quot;&gt;ACID&lt;/a&gt; transactions&lt;/td&gt;
&lt;td&gt;Supported&lt;/td&gt;
&lt;td&gt;Supported, depending on the specific NoSQL database&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ability to add new properties&lt;/td&gt;
&lt;td&gt;Need to alter the schema first&lt;/td&gt;
&lt;td&gt;Possible without disturbing anything&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;There are many other differences between the two types of databases, but those mentioned above are some of the more important ones to know about.&lt;/p&gt;
&lt;p&gt;When choosing a database, you should consider its strengths and weaknesses carefully. You also need to consider how the database fits into your specific scenario and your application’s requirements. Sometimes the right solution is to use a combination of SQL and NoSQL databases to handle different aspects of a broader system.&lt;/p&gt;
&lt;p&gt;Some common examples of SQL databases include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.sqlite.org/docs.html&quot;&gt;SQLite&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.xplenty.com/integrations/mysql/&quot;&gt;MySQL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.xplenty.com/integrations/oracle/&quot;&gt;Oracle&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.xplenty.com/integrations/postgresql/&quot;&gt;PostgreSQL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.xplenty.com/integrations/microsoft-sql-server/&quot;&gt;Microsoft SQL Server&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;NoSQL database examples include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://aws.amazon.com/dynamodb/&quot;&gt;DynamoDB&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://cassandra.apache.org/doc/latest/&quot;&gt;Cassandra&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-redis/&quot;&gt;Redis&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://couchdb.apache.org/#about&quot;&gt;CouchDB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://rethinkdb.com/faq&quot;&gt;RethinkDB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://ravendb.net/about&quot;&gt;RavenDB&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.xplenty.com/integrations/mongodb/&quot;&gt;MongoDB&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In recent years, SQL and NoSQL databases have even begun to merge. For example, database systems, such as &lt;a href=&quot;https://www.postgresql.org/docs/9.2/datatype-json.html&quot;&gt;PostgreSQL&lt;/a&gt;, &lt;a href=&quot;https://dev.mysql.com/doc/refman/5.7/en/json.html&quot;&gt;MySQL&lt;/a&gt;, and &lt;a href=&quot;https://docs.microsoft.com/en-us/sql/relational-databases/json/json-data-sql-server?redirectedfrom=MSDN&amp;amp;view=sql-server-ver15&quot;&gt;Microsoft SQL Server&lt;/a&gt; now support storing and querying &lt;a href=&quot;https://realpython.com/python-json/&quot;&gt;JSON&lt;/a&gt; data, much like NoSQL databases. With this, you can now achieve many of the same results with both technologies. But you still don’t get many of the NoSQL features, such as horizontal scaling and the user-friendly interface.&lt;/p&gt;
&lt;p&gt;With this brief background on SQL and NoSQL databases, you can focus on the main topic of this tutorial: the &lt;strong&gt;MongoDB database&lt;/strong&gt; and how to use it in Python.&lt;/p&gt;
&lt;h2 id=&quot;managing-nosql-databases-with-mongodb&quot;&gt;Managing NoSQL Databases With MongoDB&lt;a class=&quot;headerlink&quot; href=&quot;#managing-nosql-databases-with-mongodb&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;MongoDB is a &lt;strong&gt;document-oriented&lt;/strong&gt; database classified as NoSQL. It’s become popular throughout the industry in recent years and integrates extremely well with Python. Unlike traditional SQL RDBMSs, MongoDB uses &lt;strong&gt;collections&lt;/strong&gt; of &lt;strong&gt;documents&lt;/strong&gt; instead of &lt;strong&gt;tables&lt;/strong&gt; of &lt;strong&gt;rows&lt;/strong&gt; to organize and store data.&lt;/p&gt;
&lt;p&gt;MongoDB stores data in schemaless and flexible JSON-like documents. Here, &lt;strong&gt;schemaless&lt;/strong&gt; means that you can have documents with a different set of &lt;a href=&quot;https://en.wikipedia.org/wiki/Field_(computer_science)&quot;&gt;fields&lt;/a&gt; in the same collection, without the need for satisfying a rigid table &lt;strong&gt;schema&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;You can change the structure of your documents and data over time, which results in a flexible system that allows you to quickly adapt to requirement changes without the need for a complex process of &lt;a href=&quot;https://en.wikipedia.org/wiki/Data_migration&quot;&gt;data migration&lt;/a&gt;. However, the trade-off in changing the structure of new documents is that exiting documents become inconsistent with the updated schema. So this is a topic that needs to be managed with care.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;a href=&quot;https://en.wikipedia.org/wiki/JSON&quot;&gt;JSON&lt;/a&gt; stands for &lt;strong&gt;JavaScript Object Notation&lt;/strong&gt;. It’s a file format with a human-readable structure consisting of key-value pairs that can be nested arbitrarily deep.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;MongoDB is written in &lt;a href=&quot;https://realpython.com/python-vs-cpp/&quot;&gt;C++&lt;/a&gt; and actively &lt;a href=&quot;https://github.com/mongodb/mongo&quot;&gt;developed&lt;/a&gt; by &lt;a href=&quot;https://www.mongodb.com/company&quot;&gt;MongoDB Inc.&lt;/a&gt; It runs on all major platforms, such as macOS, Windows, Solaris, and most Linux distributions. In general, there are three main development goals behind the MongoDB database:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Scale well&lt;/li&gt;
&lt;li&gt;Store rich data structures&lt;/li&gt;
&lt;li&gt;Provide a sophisticated query mechanism&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/introduction-to-mongodb-and-python/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/introduction-to-mongodb-and-python/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #49: The Challenges of Developing Into a Python Professional</title>
      <id>https://realpython.com/podcasts/rpp/49/</id>
      <link href="https://realpython.com/podcasts/rpp/49/"/>
      <updated>2021-02-26T12:00:00+00:00</updated>
      <summary>What&#x27;s the difference between writing code for yourself and developing for others? What new  considerations do you need to take into account as a professional Python developer? This week on the show, we talk to Dane Hillard about his book &quot;Practices of the Python Pro&quot;.</summary>
      <content type="html">
        &lt;p&gt;What&#x27;s the difference between writing code for yourself and developing for others? What new  considerations do you need to take into account as a professional Python developer? This week on the show, we talk to Dane Hillard about his book &quot;Practices of the Python Pro&quot;.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Dictionaries and Arrays: Selecting the Ideal Data Structure</title>
      <id>https://realpython.com/courses/dicts-arrays-ideal-data-structure/</id>
      <link href="https://realpython.com/courses/dicts-arrays-ideal-data-structure/"/>
      <updated>2021-02-23T14:00:00+00:00</updated>
      <summary>In this course, you&#x27;ll learn about two of Python&#x27;s data structures: dictionaries and arrays. You&#x27;ll look at multiple types and classes for both of these and learn which implementations are best for your specific use cases.</summary>
      <content type="html">
        &lt;p&gt;There are a variety of ways of storing and managing data in your Python programs, and the choice of the right data structure will affect the readability of your code, ease of writing, and performance. Python has a wide variety of built-in mechanisms that meet most of your data structure needs.&lt;/p&gt;
&lt;p&gt;This course introduces you to two types of data structures: dictionaries and arrays. There are multiple types and classes for both of these data structures and this course discusses them and provides information on how to choose the ideal one.&lt;/p&gt;
&lt;p&gt;In this course you&amp;rsquo;ll learn about:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What are the &lt;strong&gt;advantages&lt;/strong&gt; of using the built-in &lt;code&gt;dict&lt;/code&gt; type &lt;/li&gt;
&lt;li&gt;What are four &lt;strong&gt;other types&lt;/strong&gt; of dictionaries &lt;/li&gt;
&lt;li&gt;How &lt;code&gt;list&lt;/code&gt; and &lt;code&gt;tuple&lt;/code&gt; types are &lt;strong&gt;arrays&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;What are typed arrays and how can they &lt;strong&gt;save memory&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;How &lt;strong&gt;strings are arrays&lt;/strong&gt; and what that implies&lt;/li&gt;
&lt;li&gt;What are the different arrays for storing &lt;strong&gt;binary data&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;What are the &lt;strong&gt;practical uses&lt;/strong&gt; for the different types&lt;/li&gt;
&lt;li&gt;How to select the &lt;strong&gt;ideal data structure&lt;/strong&gt; for your programs&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #48: Stochastic Gradient Descent and Deploying Your Python Scripts on the Web</title>
      <id>https://realpython.com/podcasts/rpp/48/</id>
      <link href="https://realpython.com/podcasts/rpp/48/"/>
      <updated>2021-02-19T12:00:00+00:00</updated>
      <summary>Do you know the initial steps to get your Python script hosted on the web? You may have built something with Flask, but how would you stand it up so that you can share it with others? This week on the show, we have the previous guest Martin Breuss back on the show. Martin shares his recent article titled, &quot;Python Web Applications: Deploy Your Script as a Flask App&quot;.  David Amos also returns, and he&#x27;s brought another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;Do you know the initial steps to get your Python script hosted on the web? You may have built something with Flask, but how would you stand it up so that you can share it with others? This week on the show, we have the previous guest Martin Breuss back on the show. Martin shares his recent article titled, &quot;Python Web Applications: Deploy Your Script as a Flask App&quot;.  David Amos also returns, and he&#x27;s brought another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Creating PyQt Layouts for GUI Applications</title>
      <id>https://realpython.com/courses/creating-pyqt-layouts-gui-applications/</id>
      <link href="https://realpython.com/courses/creating-pyqt-layouts-gui-applications/"/>
      <updated>2021-02-16T14:00:00+00:00</updated>
      <summary>In this step-by-step course, you’ll learn how to use PyQt layouts to arrange and manage the graphical components on your GUI applications. With the help of PyQt&#x27;s layout managers, you&#x27;ll be able to create polished and professional GUIs with minimal effort.</summary>
      <content type="html">
        &lt;p&gt;PyQt&amp;rsquo;s &lt;a href=&quot;https://doc.qt.io/qt-5/layout.html&quot;&gt;layout managers&lt;/a&gt; provide a user-friendly and productive way of arranging graphical components, or &lt;strong&gt;widgets&lt;/strong&gt;, on a GUI. Laying out widgets properly will make your &lt;a href=&quot;https://realpython.com/learning-paths/python-gui-programming/&quot;&gt;GUI applications&lt;/a&gt; look polished and professional. Learning to do so efficiently and effectively is a fundamental skill for you to get up and running with GUI application development using Python and PyQt.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this course, you&amp;rsquo;ll learn:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What the benefits are of using PyQt&amp;rsquo;s &lt;strong&gt;layout managers&lt;/strong&gt; &lt;/li&gt;
&lt;li&gt;How to programmatically &lt;strong&gt;lay out widgets&lt;/strong&gt; on a GUI using PyQt&amp;rsquo;s layout managers &lt;/li&gt;
&lt;li&gt;How to &lt;strong&gt;select the right layout manager&lt;/strong&gt; for your GUI application&lt;/li&gt;
&lt;li&gt;How to lay out widgets in &lt;strong&gt;main window&amp;ndash;based&lt;/strong&gt; and &lt;strong&gt;dialog-based&lt;/strong&gt; applications&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For a better understanding of how to use layout managers, some previous knowledge of how to create &lt;a href=&quot;https://realpython.com/python-pyqt-gui-calculator/&quot;&gt;PyQt GUI applications&lt;/a&gt; and how to work with &lt;a href=&quot;https://doc.qt.io/qt-5/qwidget.html&quot;&gt;PyQt widgets&lt;/a&gt; would be helpful.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #47: Unraveling Python&#x27;s Syntax to Its Core With Brett Cannon</title>
      <id>https://realpython.com/podcasts/rpp/47/</id>
      <link href="https://realpython.com/podcasts/rpp/47/"/>
      <updated>2021-02-12T12:00:00+00:00</updated>
      <summary>Do you feel like you understand how Python works under the hood? What is syntactic sugar, and how much of it should be in Python? This week on the show, we have Brett Cannon. Brett is a Python core developer and he&#x27;s been working on a series of articles where he is unraveling the syntax of Python. His series is a fantastic resource for those wanting to learn how Python is structured and works at its core.</summary>
      <content type="html">
        &lt;p&gt;Do you feel like you understand how Python works under the hood? What is syntactic sugar, and how much of it should be in Python? This week on the show, we have Brett Cannon. Brett is a Python core developer and he&#x27;s been working on a series of articles where he is unraveling the syntax of Python. His series is a fantastic resource for those wanting to learn how Python is structured and works at its core.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python Modulo: Using the % Operator</title>
      <id>https://realpython.com/courses/python-modulo-operator/</id>
      <link href="https://realpython.com/courses/python-modulo-operator/"/>
      <updated>2021-02-09T14:00:00+00:00</updated>
      <summary>In this course, you&#x27;ll learn about the Python modulo operator (%). You&#x27;ll look at the mathematical concepts behind the modulo operation and how the modulo operator is used with Python&#x27;s numeric types. You&#x27;ll also see ways to use the modulo operator in your own code.</summary>
      <content type="html">
        &lt;p&gt;Python supports a wide range of &lt;a href=&quot;https://realpython.com/python-operators-expressions/#arithmetic-operators&quot;&gt;arithmetic operators&lt;/a&gt; that you can use when working with &lt;a href=&quot;https://realpython.com/python-numbers/&quot;&gt;numbers&lt;/a&gt; in your code. One of these operators is the &lt;strong&gt;modulo operator&lt;/strong&gt; (&lt;code&gt;%&lt;/code&gt;), which returns the remainder of dividing two numbers. Modular operations are useful to check if a number is even or odd, simplifying cycling through data, and doing non-decimal based units conversion.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this course, you&amp;rsquo;ll learn:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How &lt;strong&gt;modulo&lt;/strong&gt; works in mathematics&lt;/li&gt;
&lt;li&gt;How to use the Python modulo operator with different &lt;strong&gt;numeric types&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;How Python calculates the results of a &lt;strong&gt;modulo operation&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;How to override &lt;strong&gt;&lt;code&gt;.__mod__()&lt;/code&gt;&lt;/strong&gt; in your classes to use them with the modulo operator&lt;/li&gt;
&lt;li&gt;How to use the Python modulo operator to solve &lt;strong&gt;real-world problems&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The code in this course was tested with Python 3.9.0, &lt;code&gt;%&lt;/code&gt; has not change much and older versions should be compatible.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #46: C for Python Developers and Data Visualization With Dash</title>
      <id>https://realpython.com/podcasts/rpp/46/</id>
      <link href="https://realpython.com/podcasts/rpp/46/"/>
      <updated>2021-02-05T12:00:00+00:00</updated>
      <summary>Are you interested in building interactive dashboards with Python? How about a project that takes a flat data file all the way to a web-hosted interactive  dashboard? This week on the show, David Amos is back, and he&#x27;s brought another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;Are you interested in building interactive dashboards with Python? How about a project that takes a flat data file all the way to a web-hosted interactive  dashboard? This week on the show, David Amos is back, and he&#x27;s brought another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Plot With Pandas: Python Data Visualization Basics</title>
      <id>https://realpython.com/courses/plot-pandas-data-visualization/</id>
      <link href="https://realpython.com/courses/plot-pandas-data-visualization/"/>
      <updated>2021-02-02T14:00:00+00:00</updated>
      <summary>In this course, you&#x27;ll get to know the basic plotting possibilities that Python provides in the popular data analysis library pandas. You&#x27;ll learn about the different kinds of plots that pandas offers, how to use them for data exploration, and which types of plots are best for certain use cases.</summary>
      <content type="html">
        &lt;p&gt;Whether you&amp;rsquo;re just getting to know a dataset or preparing to publish your findings, &lt;strong&gt;visualization&lt;/strong&gt; is an essential tool. Python&amp;rsquo;s popular data analysis library, &lt;a href=&quot;https://pandas.pydata.org/about/&quot;&gt;pandas&lt;/a&gt;, provides several different options for visualizing your data with &lt;code&gt;.plot()&lt;/code&gt;. Even if you&amp;rsquo;re at the beginning of your pandas journey, you&amp;rsquo;ll soon be creating basic plots that will yield valuable insights into your data.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this course, you&amp;rsquo;ll learn:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What the different types of &lt;strong&gt;pandas plots&lt;/strong&gt; are and when to use them&lt;/li&gt;
&lt;li&gt;How to get an overview of your dataset with a &lt;strong&gt;histogram&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;How to discover correlation with a &lt;strong&gt;scatter plot&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;How to analyze different &lt;strong&gt;categories&lt;/strong&gt; and their &lt;strong&gt;ratios&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #45: Processing Images in Python With Pillow</title>
      <id>https://realpython.com/podcasts/rpp/45/</id>
      <link href="https://realpython.com/podcasts/rpp/45/"/>
      <updated>2021-01-29T12:00:00+00:00</updated>
      <summary>Are you interested in processing images in Python? Do you need to load and modify images for your Flask or Django website or CMS? Then you most likely will be working with Pillow, the friendly fork of PIL, the Python imaging library. This week on the show, we have Mike Driscoll, who is writing a new book about image processing in Python.</summary>
      <content type="html">
        &lt;p&gt;Are you interested in processing images in Python? Do you need to load and modify images for your Flask or Django website or CMS? Then you most likely will be working with Pillow, the friendly fork of PIL, the Python imaging library. This week on the show, we have Mike Driscoll, who is writing a new book about image processing in Python.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Evaluate Expressions Dynamically With Python eval()</title>
      <id>https://realpython.com/courses/evaluate-expressions-dynamically-python-eval/</id>
      <link href="https://realpython.com/courses/evaluate-expressions-dynamically-python-eval/"/>
      <updated>2021-01-26T14:00:00+00:00</updated>
      <summary>In this step-by-step course, you&#x27;ll learn how Python&#x27;s eval() works and how to use it effectively in your programs. Additionally, you&#x27;ll learn how to minimize the security risks associated to the use of eval().</summary>
      <content type="html">
        &lt;p&gt;The built-in Python function &lt;code&gt;eval()&lt;/code&gt; is used to evaluate Python expressions. You can pass a string containing Python, or a pre-compiled object into &lt;code&gt;eval()&lt;/code&gt; and it will run the code and return the result. &lt;/p&gt;
&lt;p&gt;Although Python&amp;rsquo;s &lt;code&gt;eval()&lt;/code&gt; is an incredibly useful tool, the function has some important security implications that you should consider before using it. In this course, you&amp;rsquo;ll learn how &lt;code&gt;eval()&lt;/code&gt; works and how to use it safely and effectively in your Python programs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you&amp;rsquo;ll learn:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How Python&amp;rsquo;s &lt;strong&gt;&lt;code&gt;eval()&lt;/code&gt;&lt;/strong&gt; works&lt;/li&gt;
&lt;li&gt;How to use &lt;code&gt;eval()&lt;/code&gt; to &lt;strong&gt;dynamically evaluate&lt;/strong&gt; arbitrary string-based or compiled-code-based input&lt;/li&gt;
&lt;li&gt;How &lt;code&gt;eval()&lt;/code&gt; can make your code insecure and how to minimize the associated &lt;strong&gt;security risks&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The code in this course was tested with Python 3.9.0, &lt;code&gt;eval()&lt;/code&gt; has not changed much and older versions should be compatible.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  

</feed>
