Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use app engine yaml parser in scripts

I have some configuration files I want to write in yaml and read in a Python script running on Google app engine. Given that app engine uses app.yaml, index.yaml among others it seems reasonable to assume there is a python yaml parser available.

  1. How can I gain access to this parser (what is the import) and where can I find its documentation.
  2. I'd also like to use this parser for scripts running outside of agg engine (build scripts and such) so how can I gain access to the same import from a script that will run from the command line?
like image 744
James Fassett Avatar asked Jan 21 '23 10:01

James Fassett


1 Answers

The YAML library is included with the AppEngine SDK. It is located in google_appengine/lib/yaml. You should be able to use it in your AppEngine code just by having import yaml in your code.

For non-AppEngine work, a quick Google search reveals http://pyyaml.org/ home to many and various Python implementations.

like image 93
Adam Crossland Avatar answered Jan 29 '23 19:01

Adam Crossland