Skip to content

JonnyWaffles/normalize_pkgresources

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Purpose

Normalizes pkg_resources and the newer, better importlib.resources.

importlib.resources.path and pkg_resources.resource_filename are normalized to get_pkg_resource_path. Both APIs safely return a Path object.

legacy pkg_resources are mapped to their importlib equivalents.

resource_filename = resource_path
resource_stream = open_binary
resource_string = read_text

About

Normalize the legacy package_resources API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages