Metadata-Version: 2.4
Name: NSKeyedUnArchiver
Version: 1.5.2
Summary: Decodes Apple's NSKeyedArchiver that were archived into text or binary plist files and returns a usable Python dict
Author-email: Avi Alkalay <avi@unix.sh>
Project-URL: Homepage, https://github.com/avibrazil/NSKeyedUnArchiver
Project-URL: Source, https://github.com/avibrazil/NSKeyedUnArchiver
Project-URL: Issues, https://github.com/avibrazil/NSKeyedUnArchiver/issues/new/choose
Project-URL: Pypi, https://pypi.org/project/NSKeyedUnArchiver
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing :: Markup
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# NSKeyedUnArchiver

Unserializes any binary|text|file|memory plist data and returns a usable Python dict.

Plist files are very common in Apple platforms (macOS, iOS etc). Plist files are used to store data much like XML and JSON files, but can be pure text or binary (convertible with plutil command). Some Plist files were generated by Apple NSKeyedArchiver and contain a serialized version of objects stored in an intricate and complex schema of nested objects. NSKeyedUnArchiver converts it back to an hierarchical form as a Python dict.

Uses only Python 3.8 plistlib, no other dependencies.

Automatically converts well known data types to Python-equivalent data types:

- `NSArray` ➔ `list`
- `NSMutableDictionary`, `NSDictionary` ➔ `dict`
- `NSMutableString`, `NSString` ➔ unwrap the `string`
- `NSMutableData`, `NSData` ➔ unwrap the data
- `NSDate` ➔ `datetime`

Check [pypi](https://pypi.org/project/NSKeyedUnArchiver/) for packages.

See package name for your system package manager at [Repology](https://repology.org/project/python:nskeyedunarchiver/information).

License is LGPL 3.

## Sample usage

```python
import NSKeyedUnArchiver

file='/path/to/file.plist'
my_dict=NSKeyedUnArchiver.unserializeNSKeyedArchiver(file)


data=b'bplist00\xd4\x01\.........'
my_dict=NSKeyedUnArchiver.unserializeNSKeyedArchiver(data)


data='<plist version="1.0">......'
my_dict=NSKeyedUnArchiver.unserializeNSKeyedArchiver(data)


file=PurePath('/path/to/file.plist')
my_dict=NSKeyedUnArchiver.unserializeNSKeyedArchiver(file)
```
