Welcome to importlib_resources documentation!#

importlib_resources is a library which provides for access to resources in Python packages. It provides functionality similar to pkg_resources Basic Resource Access API, but without all of the overhead and performance problems of pkg_resources.

In our terminology, a resource is a file tree that is located alongside an importable Python module. Resources can live on the file system or in a zip file, with support for other loader classes that implement the appropriate API for reading resources.

importlib_resources supplies a backport of importlib.resources, enabling early access to features of future Python versions and making functionality available for older Python versions. Users are encouraged to use the Python standard library where suitable and fall back to this library for future compatibility. Developers looking for detailed API descriptions should refer to the standard library documentation.

The documentation here includes a general usage guide and a migration guide for projects that want to adopt importlib_resources instead of pkg_resources.

For Enterprise

Professional support for importlib_resources is available as part of the Tidelift Subscription. Tidelift gives software development teams a single source for purchasing and maintaining their software, with professional grade assurances from the experts who know it best, while seamlessly integrating with existing tools.

Learn more Request a Demo

Indices and tables#