tanbro / pyyaml-include

yaml include other yaml
https://pypi.org/project/pyyaml-include/
GNU General Public License v3.0
77 stars 20 forks source link

Idea: include from remote storages (notably git) #31

Closed adaptivegarage closed 7 months ago

adaptivegarage commented 1 year ago

Hi, I like this project very much, this is exactly what I need for one of mine. The only thing I would miss is ability to include from remote storage types (especially git). I thought I would ask whether you would consider this to be a good idea before I'll start programming something by my own or before making a pull request here if you would agree.

I also might appreciate comments support that is present in ruamel. How feasible do you think it would be to port your library to ruamel?

Thanks a lot, kind regards Roman

tanbro commented 1 year ago

In fact, i do have similar problems, and create a simple library jinjyaml for that:

Jinja's include directive provides the feature, and there are some libraries support s3, git ... eg: https://pypi.org/project/jinja2-git/, https://github.com/veselosky/jinja2_s3loader.

ruamel is a great YAML library. But i think this repo is just a small extending of PyYAML, and no plan for ruamel till now.

tanbro commented 1 year ago

Maybe a simple HTTP remote file loader could be added to the library

tanbro commented 7 months ago

commit 7d2c2ca (2.0a1) introduced fsspec as the file opener. Now it can include from remote storage