Python Plugin System: Load Modules Dynamically With "importlib"

Опубликовано: 27 Сентябрь 2017
на канале: Real Python
38,798
815

https://dbader.org/python-tricks ► Unleash the "Power of Python" with actionable tips and code snippets

In this video you'll learn how to load Python modules dynamically in your application using the "importlib" module from the Python standard library.

Given a user-configurable string like "plugins.my_plugin" we'll dynamically load a Python module while the application is already running and then call methods on imported module.

This programming technique is highly useful for writing configurable plugin systems that can make your applications user-extensible. I'll walk you through an end-to-end example demonstrating this technique so that you can apply it in your own Python programs.

FREE COURSE – "5 Thoughts on Mastering Python" https://dbader.org/python-mastery

SUBSCRIBE TO THIS CHANNEL: https://dbader.org/youtube

* *

► Python Developer MUGS, T-SHIRTS & MORE: https://nerdlettering.com

► PythonistaCafe – A peer-to-peer learning community for Python developers: https://www.pythonistacafe.com

FREE Python Coding Tutorials & News:
» Python Tutorials: https://dbader.org
» Python News on Twitter:   / @dbader_org  
» Weekly Tips for Pythonistas: https://dbader.org/newsletter
» Subscribe to this channel: https://dbader.org/youtube


На этой странице сайта вы можете посмотреть видео онлайн Python Plugin System: Load Modules Dynamically With "importlib" длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Real Python 27 Сентябрь 2017, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 38,798 раз и оно понравилось 815 зрителям. Приятного просмотра!