Skip to main content

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:

  • NSArraylist
  • NSMutableDictionary, NSDictionarydict
  • NSMutableString, NSString ➔ unwrap the string
  • NSMutableData, NSData ➔ unwrap the data
  • NSDatedatetime

Check pypi for packages.

See package name for your system package manager at Repology.

License is LGPL 3.

Sample usage

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)

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

nskeyedunarchiver-1.5.2.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nskeyedunarchiver-1.5.2-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file nskeyedunarchiver-1.5.2.tar.gz.

File metadata

  • Download URL: nskeyedunarchiver-1.5.2.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for nskeyedunarchiver-1.5.2.tar.gz
Algorithm Hash digest
SHA256 d9a2d5d48ea9e2c78d31bfbfc4a97c02794192f3b4548342d727d54bdd20beba
MD5 16a67ee6b3b77f51c329a2339b3229f1
BLAKE2b-256 50688e48609f2c3554917d3c305e5ec9ba8f3d1ddcadba221d52c1f63b713ded

See more details on using hashes here.

File details

Details for the file nskeyedunarchiver-1.5.2-py3-none-any.whl.

File metadata

File hashes

Hashes for nskeyedunarchiver-1.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0e52044d137e01e15ab2b18a8f76ed14b2c3555da61190f4679e52892a37cfa0
MD5 5e961834881aeb1043edf7d003c6a1cb
BLAKE2b-256 c8c95d3c2d9a308310118dca63a0b763d09a12006a6f5d762dbe5e385aeaa318

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page