Use yaml parser in application core in scripts

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

  • How can I access this parser (what is import) and where can I find its documentation.
  • I would also like to use this parser for scripts running outside the agg mechanism (build scripts, etc.), so how can I access the same import from a script that will be run from the command line?
+4
source share
1 answer

The YAML library is included in the AppEngine SDK. It is located at google_appengine / lib / yaml. You can use it in your AppEngine code just by having import yaml in your code.

To work without the AppEngine application, a quick Google search shows http://pyyaml.org/ the home for many and various Python implementations.

+8
source

Source: https://habr.com/ru/post/1340992/


All Articles