-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
String yaml representation of sample #369
Comments
there's also something confusing int he docs for Serializes itself in YAML format.
what is 'orthe subs_folder_path' ? |
yes, import yaml
from peppy import Project
yaml.dump(Project("config.yaml").samples[0].to_dict()) |
I want to do this in a jinja template, so it's not ideal to write to disk and then re-read it. I'm actually not sure it would work |
The line I pasted doesn't write to disk. It converts the sample to dict and then to string representation of YAML. |
ah, I see now. I misread it indeed. unfortunately I can't use |
allow string representation of converted yaml #369
Is there any way for me to get a straight-up yaml representation of a sample? I found
sample.to_yaml()
but this appears to only be able to output to a file.I can also just
print(sample)
, but then I get all this extra stuff too:What I need is just a function that gives me the yaml representation of the sample.
The text was updated successfully, but these errors were encountered: