GitXplorerGitXplorer
b

keyedarchivelib

public
4 stars
2 forks
0 issues

Commits

List of commits on branch main.
Verified
08dec9000a3a1ba3cd5d446d17411a6ad9096fad

Update ci.yml

bbigfootjon committed 3 months ago
Verified
b47ffa66813f7aac6e41561cd27e2c0b5df0fd34

Update setup.py

bbigfootjon committed 3 months ago
Verified
0ee2da08e78424fd702c7291228e1386be1ea706

Update ci.yml

bbigfootjon committed 3 months ago
Verified
b39bf6107ee4c6cc7cef4853a891f7ed9e28833b

Bump build from 1.2.2 to 1.2.2.post1 (#39)

ddependabot[bot] committed 3 months ago
Verified
3d9d513c552a891a869a30bfc800fb8315e6a66b

Bump build from 1.2.1 to 1.2.2 (#38)

ddependabot[bot] committed 4 months ago
Verified
5927000f8c021070465f271f3c1f4af1119ce123

Bump mypy from 1.11.1 to 1.11.2 (#37)

ddependabot[bot] committed 5 months ago

README

The README file for this repository.

keyedarchivelib

Basic Python (>=3.8) library to generate and parse NSKeyedArchive files.

Installation

Install with pip:

pip3 install keyedarchivelib

Usage

The keyedarchivelib module has the same interface as the plistlib standard library module:

load, loads, dump, and dumps have the same function signatures as plistlib minus the fmt option, which is not available since it's always binary.

The keyedarchivelib module includes type hints.

For convenience, examples are provided below:

Reading (load & loads)

from keyedarchivelib import load

with open("example.plist", 'rb') as fp:
    pl = load(fp)
print(pl["test"])

Writing (dump & dumps)

from keyedarchivelib import dump, dumps

example_dict = {
    "test": 1
}
with open("example.plist", 'wb') as fp:
    dump(example_dict, fp)

# ~~~ OR ~~~

print(dumps(example_dict))