Welcome to importlib_resources¶
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 that is located within an importable Python package. Resources can live on the file system, in a zip file, or in any place that has a loader supporting the appropriate API for reading resources. Directories are not resources.
importlib_resources
is a backport of Python 3.7’s standard library
importlib.resources module for Python 2.7, and 3.4 through 3.6. Users of
Python 3.7 and beyond are encouraged to use the standard library module, and
in fact for these versions, importlib_resources
just shadows that module.
Developers looking for detailed API descriptions should refer to the Python
3.7 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
.
Project details¶
- Project home: https://gitlab.com/python-devs/importlib_resources
- Report bugs at: https://gitlab.com/python-devs/importlib_resources/issues
- Code hosting: https://gitlab.com/python-devs/importlib_resources.git
- Documentation: http://importlib_resources.readthedocs.io/