importlib_resources is a library which provides for access toresourcesin Python packages. It provides functionality similar topkg_resourcesBasic Resource Access API, but without all of the overhead and performanceproblems ofpkg_resources.
In our terminology, aresource is a file tree that is located alongside animportablePython module. Resources can live on the file system or in azip file, with support for otherloader classes that implement the appropriateAPI for reading resources.
importlib_resources supplies a backport ofimportlib.resources,enabling early access to features of future Python versions and makingfunctionality available for older Python versions. Users are encouraged touse the Python standard library where suitable and fall back tothis library for future compatibility. Developers looking for detailed APIdescriptions should refer to the standard library documentation.
The documentation here includes a generalusage guide and amigration guide for projects that want to adoptimportlib_resources instead ofpkg_resources.
Contents:
Professional support for importlib_resources is available as part of theTidelift Subscription.Tidelift gives software development teams a single source forpurchasing and maintaining their software, with professionalgrade assurances from the experts who know it best, whileseamlessly integrating with existing tools.