Decodes Apple's NSKeyedArchiver that were archived into text or binary plist files and returns a usable Python dict
Project description
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 for packages.
License is LGPL 3.
Sample usage
import NSKeyedUnArchiver
file='/patch/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('/patch/to/file.plist')
my_dict=NSKeyedUnArchiver.unserializeNSKeyedArchiver(file)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file NSKeyedUnArchiver-1.5.tar.gz
.
File metadata
- Download URL: NSKeyedUnArchiver-1.5.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eeda0480021817336e0ffeaca80377c1a8f08ecc5fc06be483b48c44bad414f4 |
|
MD5 | 612715cc2c789178db7ce6a8fed75c41 |
|
BLAKE2b-256 | e8d9227a00737de97609b0b2d161905f03bb8e246df0498ec5735b83166eef8f |
File details
Details for the file NSKeyedUnArchiver-1.5-py3-none-any.whl
.
File metadata
- Download URL: NSKeyedUnArchiver-1.5-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fdb88cd4e603bc3396e91dce9bfba2122ddc5946328b81931532d078d5dbbc3 |
|
MD5 | 80d1e4c7940aa6afad9cb4e7a6a6ce67 |
|
BLAKE2b-256 | 8daa2ad9a9480ae2c6579e2e994a4521dfca426aa423abae5184a5ad2e50ba51 |