Anyway to render jinja templates like all.yml or group vars using ansible api?

Would like to access the all.yml, group_vars variables outside the context of a playbook?

Ideally through the api
Less ideal output a rendered all.yml, then i’ll read it afterwards.

Just use pyyaml to import the file?

Need it to work with variables / filters / boolean logic, etc. It’s not a static file.