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
1 view
2149
647
11 months ago 02:28:51 4
2023 International Opera Awards - Teatr Wielki, Warsaw
12 months ago 00:03:19 3
The Zen of Python
1 year ago 00:02:35 1
Chopin is Poland
2 years ago 00:09:59 1
Hip-Hop History Orchestrated by JIMEK
2 years ago 00:02:06 30
Three Days Grace – EXPLOSIONS Tour Part 1
4 years ago 00:28:42 1
Barry Warsaw - Get your resources faster, with - PyCon 2018