Plex Media Center for OS X Leopard

5.2.5. YAML — YAML parsing

The YAML module contains functions for parsing YAML-formatted content.

TODO: More information

This module defines the following functions:

YAML.ObjectFromString(string)

Returns a Python object created by parsing the given YAML-formatted string.

Parameter:string (str) – The YAML-formatted data to parse
Returns:A Python object created from the given data
Return type:object
YAML.ObjectFromURL(url, values=None, headers={}, cacheTime=None)

Behaves similarly to YAML.ObjectFromString(), but parses the result of a given HTTP request rather than a given string.

Parameters:
  • url (str) – The URL to request RSS-formatted data from from
  • values (dict) – The values to use if making a POST request
  • headers (dict) – Additional headers to include in the request
  • cacheTime (int) – The maximum number of seconds the response should be cached for
Returns:

A Python object created from the given data

Return type:

object

Previous topic

5.2.4. RSS — RSS feed parsing

Next topic

5.3. Data storage