OpenStep Parser
raw JSON → 2.0.3 verified Fri May 01 auth: no python
Parses OpenStep plist files into Python objects. Current version 2.0.3, requires Python >=3.10. Releases are infrequent, focused on bug fixes.
pip install openstep-parser Common errors
error AttributeError: module 'openstep_parser' has no attribute 'loads' ↓
cause Installed version is older than 2.0.0, which didn't have the loads function.
fix
Update to version >=2.0.0: pip install --upgrade openstep-parser
error TypeError: string indices must be integers ↓
cause Passing a string that is not a valid plist format; parser returns a list or dict but code expects indexing.
fix
Check the structure of your plist string. Ensure it begins with '(' for arrays or '{' for dicts.
Warnings
gotcha The parser is case-sensitive for boolean values: 'YES' and 'NO' must be uppercase. ↓
fix Ensure booleans in plist are 'YES'/'NO' (all caps). Lowercase will be treated as strings.
gotcha Data types are limited: only dict, list, str, int, float, bool, and None (via '<null>'). Other plist types are not supported. ↓
fix If your plist contains date or binary data, convert them beforehand or use a different parser.
deprecated The 'OpenstepParser' class constructor is deprecated; use the top-level functions instead. ↓
fix Use loads() or load() instead of instantiating OpenstepParser directly.
Imports
- loads
from openstep_parser import loads - load
from openstep_parser import load - OpenStepParser wrong
from openstep_parser import OpenStepParser as OldNamecorrectfrom openstep_parser import OpenStepParser
Quickstart
from openstep_parser import loads
plist_str = """({
key = value;
number = 42;
}) """
result = loads(plist_str)
print(result)
# Expected: {'key': 'value', 'number': 42}