Search

Home > Python Bytes > #374 Climbing the Python Web Mountain
Podcast: Python Bytes
Episode:

#374 Climbing the Python Web Mountain

Category: Technology
Duration: 00:32:50
Publish Date: 2024-03-11 08:00:00
Description: Topics covered in this episode:
Watch on YouTube

About the show

Sponsored by ScoutAPM: pythonbytes.fm/scout

Connect with the hosts

Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesdays at 11am PT. Older video versions available there too.

Brian #1: 6 ways to improve the architecture of your Python project (using import-linter)

  • Piglei
  • Using import-linter to
    • define architectural layers
    • check to make sure imports don’t violate (import from upper layers)
    • can also check for more contracts, such as
      • forbidden - disallow a specific from/to import
      • independence - list of modules that shouldn’t import from each other
  • Fixing violations
    • a process introduced to set exceptions for each violation in a config file
    • then fix violations 1 at a time (nice approach)
    • use the whole team if you can
  • Common methods for fixing dependency issues
    • Merging and splitting modules
    • Dependency Injection, including using protocols to keep type hints without the need to import just for types
    • Use simpler dependency types
    • Delaying function implementations
      • module global methods set by caller, or adding a simple plugin/callback system
    • Configuration driven
      • Setting import statements in a config file and using import_string() at runtime
    • Replace function calls with event-driven approaches

Michael #2: Mountaineer

  • Mountaineer is a batteries-included web framework for Python and React.
  • Mountaineer focuses on developer productivity above all else, with production speed a close second.
    • Typehints up and down the stack: frontend, backend, and database
    • ️ Trivially easy client[HTML_REMOVED]server communication, data binding, and function calling
    • Optimized server rendering for better accessibility and SEO
    • Static analysis of web pages for strong validation: link validity, data access, etc.
Total Play: 0

Some more Podcasts by Michael Kennedy

500+ Episodes
Talk Python .. 300+     50+