James Fassett
James Fassett

Reputation: 41034

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?

Upvotes: 4

Views: 1683

Answers (1)

Adam Crossland
Adam Crossland

Reputation: 14213

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.

Upvotes: 9

Related Questions