Barry Warsaw - Get your resources faster, with - PyCon 2018

Speaker: Barry Warsaw Resources are files that live within Python packages. Think test data files, certificates, templates, translation catalogs, and other static files you want to access from Python code. Sometimes you put these static files in a package directory within your source tree, and then locate them by importing the package and using its `__file__` attribute. But this doesn’t work for zip files! You could use `pkg_resources`, an API that comes with `setuptools` and hides the differences between files on the file system and files in a zip file. This is great because you don’t have to use `__file__`, but it’s not so great because `pkg_resources` is a big library and can have potentially severe performance problems, even at import time. Welcome to ``, a new module and API in Python 3.7 that is also available as a standalone library for older versions of Python. `` is build on top of Python’s existing import system, so
Back to Top