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

Solving Problems and Saving Time in Chemistry With Python
2025-07-04
Structuring Python Scripts & Exciting Non-LLM Software Trends
2025-06-27
Scaling Python Web Applications With Kubernetes and Karpenter
2025-06-20
Starting With marimo Notebooks & Python App Config Management
2025-06-13
Rodrigo Girão Serrão: Python Training, itertools, and Idioms
2025-06-06
Python Thread Safety & Managing Projects With uv
2025-05-30
DjangoCon Europe 2025: Live Recording From Dublin
2025-05-23
Going Beyond requirements.txt With pylock.toml and PEP 751
2025-05-16
Experiments With Gen AI, Knowledge Graphs, Workflows, and Python
2025-05-09
Exploring DuckDB & Comparing Python Expressions vs Statements
2025-04-18
Learning Intermediate Python With a Deep Dive Course
2025-04-11
GUIs & TUIs: Choosing a User Interface for Your Python Project
2025-04-04
A Decade of Automating the Boring Stuff With Python
2025-03-21
Manage Projects With pyproject.toml & Explore Polars LazyFrames
2025-03-14
Eric Matthes: Maybe Don't Start With Unit Tests
2025-03-07
Deciphering Python Jargon & Compiling Python 1.0
2025-02-28
Telling Effective Stories With Your Python Visualizations
2025-02-21
Behavior-Driven vs Test-Driven Development & Using Regex in Python
2025-02-14
Charlie Marsh: Accelerating Python Tooling With Ruff and uv
2025-02-07
Testing Your Python Code Base: Unit vs. Integration
2025-01-31
  • ←
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • →
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