Open
Description
The problem
I'm using importlib.resources.files
to load resources from python. I'd like to have dependency inference support for resource
targets I load.
The solution
It would be nice to have the support implemented in rust.
Specifically, I want the anchor
argument to work with an import:
import my_package
from importlib.resources import files
files(my_package).joinpath('path/to/my_resource.txt')
and __package__
:
from importlib.resources import files
files(__package__).joinpath('path/to/my_resource.txt')
Alternatives
The support could be added in python, but it will be slow and it would duplicate the AST parsing and analysis.
Activity