Podbean logo
  • Discover
  • Podcast Features
    • Podcast Hosting

      Start your podcast with all the features you need.

    • Podbean AI Podbean AI

      AI-Enhanced Audio Quality and Content Generation.

    • Blog to Podcast

      Repurpose your blog into an engaging podcast.

    • Video to Podcast

      Convert YouTube playlists to podcasts, videos to audios.

  • Monetization
    • Ads Marketplace

      Join Ads Marketplace to earn through podcast sponsorships.

    • PodAds

      Manage your ads with dynamic ad insertion capability.

    • Apple Podcasts Subscriptions Integration

      Monetize with Apple Podcasts Subscriptions via Podbean.

    • Live Streaming

      Earn rewards and recurring income from Fan Club membership.

  • Podbean App
    • Podcast Studio

      Easy-to-use audio recorder app.

    • Podcast App

      The best podcast player & podcast app.

  • Help and Support
    • Help Center

      Get the answers and support you need.

    • Podbean Academy

      Resources and guides to launch, grow, and monetize podcast.

    • Podbean Blog

      Stay updated with the latest podcasting tips and trends.

    • What’s New

      Check out our newest and recently released features!

    • Podcasting Smarter

      Podcast interviews, best practices, and helpful tips.

  • Popular Topics
    • How to Start a Podcast

      The step-by-step guide to start your own podcast.

    • How to Start a Live Podcast

      Create the best live podcast and engage your audience.

    • How to Monetize a Podcast

      Tips on making the decision to monetize your podcast.

    • How to Promote Your Podcast

      The best ways to get more eyes and ears on your podcast.

    • Podcast Advertising 101

      Everything you need to know about podcast advertising.

    • Mobile Podcast Recording Guide

      The ultimate guide to recording a podcast on your phone.

    • How to Use Group Recording

      Steps to set up and use group recording in the Podbean app.

  • All Arts Business Comedy Education
  • Fiction Government Health & Fitness History Kids & Family
  • Leisure Music News Religion & Spirituality Science
  • Society & Culture Sports Technology True Crime TV & Film
  • Live
  • How to Start a Podcast
  • How to Start a Live Podcast
  • How to Monetize a podcast
  • How to Promote Your Podcast
  • How to Use Group Recording
  • Log in
  • Start your podcast for free
  • Podcasting
    • Podcast Features
      • Podcast Hosting

        Start your podcast with all the features you need.

      • Podbean AI Podbean AI

        AI-Enhanced Audio Quality and Content Generation.

      • Blog to Podcast

        Repurpose your blog into an engaging podcast.

      • Video to Podcast

        Convert YouTube playlists to podcasts, videos to audios.

    • Monetization
      • Ads Marketplace

        Join Ads Marketplace to earn through podcast sponsorships.

      • PodAds

        Manage your ads with dynamic ad insertion capability.

      • Apple Podcasts Subscriptions Integration

        Monetize with Apple Podcasts Subscriptions via Podbean.

      • Live Streaming

        Earn rewards and recurring income from Fan Club membership.

    • Podbean App
      • Podcast Studio

        Easy-to-use audio recorder app.

      • Podcast App

        The best podcast player & podcast app.

  • Advertisers
  • Enterprise
  • Pricing
  • Resources
    • Help and Support
      • Help Center

        Get the answers and support you need.

      • Podbean Academy

        Resources and guides to launch, grow, and monetize podcast.

      • Podbean Blog

        Stay updated with the latest podcasting tips and trends.

      • What’s New

        Check out our newest and recently released features!

      • Podcasting Smarter

        Podcast interviews, best practices, and helpful tips.

    • Popular Topics
      • How to Start a Podcast

        The step-by-step guide to start your own podcast.

      • How to Start a Live Podcast

        Create the best live podcast and engage your audience.

      • How to Monetize a Podcast

        Tips on making the decision to monetize your podcast.

      • How to Promote Your Podcast

        The best ways to get more eyes and ears on your podcast.

      • Podcast Advertising 101

        Everything you need to know about podcast advertising.

      • Mobile Podcast Recording Guide

        The ultimate guide to recording a podcast on your phone.

      • How to Use Group Recording

        Steps to set up and use group recording in the Podbean app.

  • Discover
  • Log in
    Sign up free
The Real Python Podcast

The Real Python Podcast

Technology

Constructing Python Library APIs & Tackling Jinja Templating

Constructing Python Library APIs & Tackling Jinja Templating

2023-07-14
Download Right click and do "save link as"

What principles should you consider when designing a Python library? How do you construct a library API that’s understandable and easy to use? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder’s Weekly articles and projects.

We share an article about building library APIs. The piece provides advice for package structure, naming, error handling, and more. The author guides you toward Pythonic principles by comparing clunky vs elegant design examples.

Christopher discusses his recent video course on Jinja templating. The course covers creating text files with programmatic content and employing rich templates to structure the front end of Python web applications.

We cover several other articles and projects from the Python community, including several news updates, reasons why membership tests are fast for the range() function, CLI tools hidden in the Python standard library, a thread about the right way to install Python, recipes for using the Polars library, and a project for feature flags within Django.

This week’s episode is brought to you by Snyk.

Course Spotlight: Jinja Templating

With Jinja, you can build rich templates that power the front end of your web applications. But you can use Jinja without a web framework running in the background. Anytime you want to create text files with programmatic content, Jinja can help you out.

Topics:

  • 00:00:00 – Introduction
  • 00:02:16 – PyLadies Conference (Dec 2023) Call for Volunteers
  • 00:02:32 – PSF Board Election Results
  • 00:03:47 – PSF Announces New Security Developer in Residence
  • 00:04:39 – Django Security Releases Issued
  • 00:04:50 – Deprecation of bdist_egg Uploads to PyPI
  • 00:05:54 – Why Are Membership Tests So Fast for range() in Python?
  • 00:11:51 – CLI Tools Hidden in the Python Standard Library
  • 00:15:59 – Sponsor: Snyk
  • 00:16:49 – Designing Pythonic Library APIs
  • 00:28:27 – Jinja Templating
  • 00:32:49 – Kill a Developer in 4 Words or Less
  • 00:37:28 – Video Course Spotlight
  • 00:38:51 – What is “the right way” to install Python on a new M2 MacBook?
  • 00:44:11 – polars-cookbook: Recipes for Using Python’s Polars Library
  • 00:46:48 – waffle: Feature Flags for Django
  • 00:49:54 – Thanks and goodbye

News:

  • PyLadies Conference (Dec 2023) Call for Volunteers
  • PSF Board Election Results
  • PSF Announces New Security Developer in Residence
  • I Am the First PSF Security Developer-in-Residence – Seth was recently hired as the first security developer in residence at the PSF. His blog post talks about what his responsibilities are and how he defines success for the position.
  • Deputy CPython Developer in Residence - Python Software Foundation - Career Page
  • Django Security Releases Issued: 4.2.3, 4.1.10, and 3.2.20
  • Deprecation of bdist_egg Uploads to PyPI – PEP 715 has been accepted and as of August 1, 2023, the .egg format will no longer be accepted as an upload. Existing eggs on PyPI will remain in place.

Show Links:

  • Why Are Membership Tests So Fast for range() in Python? – In Python, range() is most commonly used in for loops. However, ranges have some other use cases too, as they share many properties with lists. In this tutorial, you’ll explore why it’s so fast to perform a membership test on a Python range.
  • CLI Tools Hidden in the Python Standard Library – There are several modules in Python that are directly callable from the command line, including the ability to gzip and pretty-print JSON. This article introduces you to what options are available and how Simon discovered them.
  • Designing Pythonic Library APIs – This article summarizes principles that Ben has found useful when designing Python library APIs. Topics include structure, naming, error handling, and type annotations.
  • Jinja Templating – With Jinja, you can build rich templates that power the front end of your web applications. But you can use Jinja without a web framework running in the background. Anytime you want to create text files with programmatic content, Jinja can help you out.

Discussion:

  • Kill a Developer in 4 Words or Less - Twitter
  • What is “the right way” to install Python on a new M2 MacBook? - Twitter

Projects:

  • polars-cookbook: Recipes for Using Python’s Polars Library
  • waffle: Feature Flags for Django

Additional Links:

  • PSF Board of Directors Nominees - 2023 - YouTube
  • pandas-cookbook: Recipes for using Python’s pandas library

Level up your Python skills with our expert-led courses:

  • Getting Started With Django: Building a Portfolio App
  • Deploy Your Python Script on the Web With Flask
  • Jinja Templating

Support the podcast & join our community of Pythonistas

view more

More Episodes

Surveying Comprehension Constructs & Python Parallelism Infighting
2023-01-06
2022 Real Python Tutorial & Video Course Wrap Up
2022-12-23
Start Using a Build System & Continuous Integration in Python
2022-12-16
Package Python Code With pyproject.toml & Listing Files With pathlib
2022-12-09
Preparing Data to Measure True Machine Learning Model Performance
2022-12-02
Building Python REST APIs With Flask & Structuring Pull Requests
2022-11-25
Moving Projects Away From Passwords With WebAuthn and Python
2022-11-18
Creating Tic-Tac-Toe With an AI Player & Shortcuts for Python Decorators
2022-11-11
Exploring the New Features of Python 3.11
2022-11-04
Fostering an Internal Python Community & Managing the 3.11 Release
2022-10-21
Using an Ellipsis in Python & Goals for CPython 3.12
2022-10-14
Using a Memory Profiler in Python & What It Can Teach You
2022-10-07
Explaining Access Control Using Python & Cautiously Handling Pickles
2022-09-30
Python as an Efficiency Tool for Non-Developers
2022-09-23
Improve Matplotlib With Style Sheets & Python Async for the Web
2022-09-16
Exploring Recursion in Python With Al Sweigart
2022-09-09
Creating a Python Code Completer & More Abstract Syntax Tree Projects
2022-09-02
Configuring a Coding Environment on Windows & Using TOML With Python
2022-08-19
Moving NLP Forward With Transformer Models and Attention
2022-08-12
Inspiring Young People to Learn Python With Mission Encodeable
2022-08-05
  • ←
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • →
012345678910111213141516171819

Get this podcast on your
phone, FREE

Download Podbean app on App Store Download Podbean app on Google Play

Create your
podcast in
minutes

  • Full-featured podcast site
  • Unlimited storage and bandwidth
  • Comprehensive podcast stats
  • Distribute to Apple Podcasts, Spotify, and more
  • Make money with your podcast
Get started

It is Free

  • Podcast Services

    • Podcast Features
    • Pricing
    • Enterprise Solution
    • Private Podcast
    • The Podcast App
    • Live Stream
    • Audio Recorder
    • Remote Recording
    • Podbean AI
  •  
    • Create a Podcast
    • Video Podcast
    • Start Podcasting
    • Start Radio Talk Show
    • Education Podcast
    • Church Podcast
    • Nonprofit Podcast
    • Get Sermons Online
    • Free Audiobooks
  • MONETIZATION & MORE

    • Podcast Advertising
    • Dynamic Ads Insertion
    • Apple Podcasts Subscriptions
    • Switch to Podbean
    • YouTube to Podcast
    • Blog to Podcast
    • Submit Your Podcast
    • Podbean Plugins
    • Developers
  • KNOWLEDGE BASE

    • How to Start a Podcast
    • How to Start a Live Podcast
    • How to Monetize a Podcast
    • How to Promote Your Podcast
    • Mobile Podcast Recording Guide
    • How to Use Group Recording
    • Podcast Advertising 101
  • Support

    • Support Center
    • What’s New
    • Free Webinars
    • Podcast Events
    • Podbean Academy
    • Podbean Amplified Podcast
    • Badges
    • Resources
  • Podbean

    • About Us
    • Podbean Blog
    • Careers
    • Press and Media
    • Green Initiative
    • Affiliate Program
    • Contact Us
  • Privacy Policy
  • Cookie Policy
  • Terms of Use
  • Consent Preferences
  • Copyright © 2015-2025 Podbean.com