Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

template_dir and importlib/pkg_resources #176

Open
pvgenuchten opened this issue Aug 11, 2022 · 1 comment
Open

template_dir and importlib/pkg_resources #176

pvgenuchten opened this issue Aug 11, 2022 · 1 comment

Comments

@pvgenuchten
Copy link
Contributor

pvgenuchten commented Aug 11, 2022

Currently the template_dir to a custom schema implementation requires a phisical path on disk
It would be nice if pygeometa would also be able to leverage packaged resources either with importlib or pkg_resources?
any thoughts on this?

@tomkralidis
Copy link
Member

@pvgenuchten does this mean being able to implement a schema via a Python class/factory pattern? i.e.:

xml_string = render_j2_template(mcf_dict, schema_local=my_package.my_module.my_file.MyClass)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants