[Distutils] distlib updated with resources API

Vinay Sajip vinay_sajip at yahoo.co.uk
Sun Sep 23 17:57:39 CEST 2012


I've updated distlib[1] with a resources API - functionality for accessing data
files co-located with code in Python packages. This is missing from the stdlib
and currently people use pkg_resources to achieve this.

The design and implementation allows for accessing resources from packages
imported from the file system or from .zip files, and is intended to be
extensible to other PEP 302-compliant import systems.

The update includes:

A short tutorial showing how to use the API. [2]
A discussion of the design of the API. [3]
Reference documentation for the API. [4]

I'd be interested in any and all feedback on this - be it on design, code, docs.
Please regard it as very much a first draft - it would appear to cover pretty
much the same functionality as the corresponding part of pkg_resources [5].

Regards,

Vinay Sajip

[1] https://bitbucket.org/vinay.sajip/distlib/
[2] http://distlib.readthedocs.org/en/latest/tutorial.html#using-the-resource-api
[3] http://distlib.readthedocs.org/en/latest/internals.html#the-resources-api
[4]
http://distlib.readthedocs.org/en/latest/reference.html#the-distlib-resources-package
[5] http://packages.python.org/distribute/pkg_resources.html#basic-resource-access



More information about the Distutils-SIG mailing list