Announcing importlib_resources 0.1

Barry Warsaw barry at
Thu Dec 7 12:48:07 EST 2017

Brett and I have been working on a little skunkworks project for a few weeks, and it’s now time to announce the first release.  We’re calling it importlib_resources and its intent is to replace the “Basic Resource Access” APIs of pkg_resources with more efficient implementations based directly on importlib.

importlib_resources 0.1 provides support for Python 2.7, and 3.4-3.7.  It defines an ABC that loaders can implement to provide direct access to resources inside packages.  importlib_resources has fallbacks for file system and zip file loaders, so it should work out of the box in most of the places that pkg_resources is currently used.  We even have a migration guide for folks who want to drop pkg_resources altogether and adopt importlib_resources.  importlib_resources explicitly does not support pkg_resources features like entry points, working sets, etc.  Still, we think the APIs provided will be good enough for most current use cases.

We are calling it “importlib_resources” because we intend to port this into Python 3.7 under a new importlib.resources subpackage, so starting with Python 3.7, you will get this for free.  The API is going to officially be provisional, but I’ve already done an experimental port of at least one big application (I’ll let you guess which one :) and it’s fairly straightforward, if not completely mechanical unfortunately.  Take a look at the migration guide for details:

We also intend to include the ABC in Python 3.7:

You can of course `pip install importlib_resources`.

We’re hosting the project on GitLab, and welcome feedback, bug fixes, improvements, etc!

 * Project home:
 * Report bugs at:
 * Code hosting:
 * Documentation:

-Barry and Brett

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <>

More information about the Python-announce-list mailing list