The Real Python Podcast

Drawing Fractals With Python and Working With a Weather API


Listen Later

Have you been wanting to explore fractals and complex numbers in Python? Would you like to practice working with APIs in Python through a new project? This week on the show, Christopher Trudeau is here, and he’s taking on the task of curating new issues of PyCoder’s Weekly going forward. He’ll be joining me as a cohost every other week and bringing a fresh batch of PyCoder’s Weekly articles and projects.

We discuss a Real Python article about drawing the Mandelbrot set in Python. The tutorial guides you through creating fractal art using Matplotlib and Pillow. We also share a new step-by-step project building a weather-reporting command-line interface (CLI) app.

We cover several other articles and projects from the Python community, including a news roundup, a better Pygame main loop, ways to work with static and media files in Django, and a library for pleasing console output.

Course Spotlight: Make a 2D Side-Scroller Game With Pygame

In this step-by-step course, you’ll learn how to use Pygame. This library allows you to create games and rich multimedia programs in Python. You’ll learn how to draw items on your screen, implement collision detection, handle user input, and much more!

Topics:

  • 00:00:00 – Introduction
  • 00:02:15 – Black, the Python Code Formatter, Is Stable
  • 00:04:07 – Apple Removes Python 2.7 in macOS Monterey 12.3
  • 00:06:36 – GitHub Survey on Languages and More Developer Things
  • 00:10:14 – CPython 3.11.0a5 Is Available
  • 00:11:48 – Django Security Releases Issued: 4.0.2, 3.2.12, and 2.2.27
  • 00:12:43 – A Better Pygame Main Loop
  • 00:21:22 – Sponsor: CData Software
  • 00:22:04 – Draw the Mandelbrot Set in Python
  • 00:29:12 – The Fastest Way to Read a CSV in Pandas
  • 00:35:16 – Video Course Spotlight
  • 00:36:26 – Working With Static and Media Files in Django
  • 00:41:42 – Raining Outside? Build a Weather CLI App With Python
  • 00:48:15 – konsole: Readable, Pleasing Console Output
  • 00:50:27 – Thanks and Goodbye
  • News:

    • Black, the Python Code Formatter, Is Stable – The popular Python autoformatter Black is finally non-beta software. Related discussion on Hacker News and Black’s stability policy doc.
    • Apple Removes Python 2.7 in macOS Monterey 12.3 – “Python 2.7 was removed from macOS in this update. Developers should use Python 3 or an alternative language instead.” Also see the related discussion on Hacker News.
    • GitHub Survey on Languages and More Developer Things – JavaScript retains the top spot, Python keeps second place gained in 2019 over Java, which holds in third. TypeScript continues fourth after racing up tenth in 2017 to fourth in 2020. JavaScript + TypeScript seem to put that way ahead in terms of amount of code on GitHub.
    • CPython 3.11.0a5 Is Available – “We needed to tame some angry buildbots, but after a small fight, we won with just some scratches! Here you have a shiny new alpha release: Python 3.11.0a5.”
    • Django Security Releases Issued: 4.0.2, 3.2.12, and 2.2.27 – Includes fixes for a possible XSS via debug template tag and a denial-of-service possibility in file uploads.
    • Articles:

      • A Better Pygame Main Loop – Improving your game’s main loop for smoother gameplay that takes less battery power: “Now your players’ laptops run cool while playing, and the graphics don’t have ugly tearing artifacts any more!”
      • Draw the Mandelbrot Set in Python – In this tutorial, you’ll visualize the famous Mandelbrot set using Python’s Matplotlib and Pillow libraries. You’ll learn how to draw the fractal in black and white, grayscale, and color.
      • The Fastest Way to Read a CSV in Pandas – This article covers pandas’ default CSV reading, the faster and more parallel CSV reader introduced in v1.4, and a different approach that can make things even faster.
      • Working With Static and Media Files in Django – A look at how to work with static and media files in a Django project, locally and in production.
      • Projects:

        • Raining Outside? Build a Weather CLI App With Python – In this tutorial, you’ll write a nicely formatted Python CLI app that displays information about the current weather in any city that you provide the name for.
        • konsole: Readable, Pleasing Console Output
        • Additional Links:

          • Make a 2D Side-Scroller Game With Pygame – Real Python
          • Using Pygame to Build an Asteroids Game in Python – Real Python
          • Deciphering Glyph :: Nice Animations with Twisted and PyGame
          • pygame 4000 book by pygame
          • Where’s your bottleneck? CPU time vs wallclock time
          • Storing Django Static and Media Files on Amazon S3 | TestDriven.io
          • OpenWeatherMap API guide - OpenWeatherMap
          • Level up your Python skills with our expert-led courses:

            • Using Pygame to Build an Asteroids Game in Python
            • Getting Started With Django: Building a Portfolio App
            • Make a 2D Side-Scroller Game With PyGame
            • Support the podcast & join our community of Pythonistas

              ...more
              View all episodesView all episodes
              Download on the App Store

              The Real Python PodcastBy Real Python

              • 4.7
              • 4.7
              • 4.7
              • 4.7
              • 4.7

              4.7

              136 ratings


              More shows like The Real Python Podcast

              View all
              Software Engineering Radio - the podcast for professional software developers by se-radio@computer.org

              Software Engineering Radio - the podcast for professional software developers

              272 Listeners

              The Changelog: Software Development, Open Source by Changelog Media

              The Changelog: Software Development, Open Source

              283 Listeners

              Thoughtworks Technology Podcast by Thoughtworks

              Thoughtworks Technology Podcast

              41 Listeners

              Talk Python To Me by Michael Kennedy

              Talk Python To Me

              592 Listeners

              Software Engineering Daily by Software Engineering Daily

              Software Engineering Daily

              624 Listeners

              Soft Skills Engineering by Jamison Dance and Dave Smith

              Soft Skills Engineering

              269 Listeners

              Super Data Science: ML & AI Podcast with Jon Krohn by Jon Krohn

              Super Data Science: ML & AI Podcast with Jon Krohn

              298 Listeners

              Python Bytes by Michael Kennedy and Brian Okken

              Python Bytes

              213 Listeners

              Data Engineering Podcast by Tobias Macey

              Data Engineering Podcast

              142 Listeners

              Syntax - Tasty Web Development Treats by Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers

              Syntax - Tasty Web Development Treats

              982 Listeners

              DataFramed by DataCamp

              DataFramed

              266 Listeners

              Kubernetes Podcast from Google by Abdel Sghiouar, Kaslin Fields

              Kubernetes Podcast from Google

              181 Listeners

              Practical AI by Practical AI LLC

              Practical AI

              189 Listeners

              The Stack Overflow Podcast by The Stack Overflow Podcast

              The Stack Overflow Podcast

              64 Listeners

              The Pragmatic Engineer by Gergely Orosz

              The Pragmatic Engineer

              52 Listeners