I think I might have confused things further, my apologies. I see 3 related but distinct feature requests here:
1) Allow a directory to be a resource in and of itself, and provide APIs for working with "directory-type" resources. 2) Allow resources with "/" in the name, and provide APIs to interact with such resources as if the were filesystem directories, remaining agnostic as to whether they actually are filesystem directories, to the best extent possible. This is similar to how cloud storage providers like Amazon S3 handle slashes in names. This would mean that you can put resources in subdirectories of package directories that are not themselves subpackages. 3) Provide APIs for working with resources within packages in a fashion that more closely resembles directory and subdirectory relationships. I am not sure exactly what this would entail. As discussed above, (1) is a significant deviation from the existing model of "resources" as described in the docs and implemented in importlib.resources, so it's probably not a viable option. I am not sure what (3) would consist of, but I imagine that there is continued room for improvement over importlib.resources.files(). (2) seems like a useful feature, if only because it seems more natural to write "assets/images/foo.png" in resource "my_app.data", as opposed to "foo.png" in resource "my_app.data.assets.images". But as stated above, maybe it's too little benefit to warrant changing the model where in a directory is analogous to a package. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/QUY6HNSLQQPVEJK7DW76NV76YT7LOTS6/ Code of Conduct: http://python.org/psf/codeofconduct/