GitXplorerGitXplorer
b

keyedarchivelib

public
4 stars
2 forks
0 issues

Commits

List of commits on branch main.
Verified
77a888e9c6903acfc97ee18a1cfdffc091e24586

Bump coverage from 7.6.7 to 7.6.8 (#51)

ddependabot[bot] committed 2 months ago
Verified
cf17431898c6954d8098439392d90be3953f6470

Bump coverage from 7.6.5 to 7.6.7 (#50)

ddependabot[bot] committed 2 months ago
Verified
7555740e83b7599ef7b0a2220362f32aa72b106d

Bump coverage from 7.6.4 to 7.6.5 (#49)

ddependabot[bot] committed 2 months ago
Verified
2ae1191842db77921ebf76eaf3b9f27d038e374b

Bump wheel from 0.44.0 to 0.45.0 (#48)

ddependabot[bot] committed 2 months ago
Verified
5a2b016e6107edcbdbec6f809138adfa78ce2d71

Bump pyre-check from 0.9.22 to 0.9.23 (#47)

ddependabot[bot] committed 3 months ago
Verified
64c871d26b53670616b453161f6d49d457b1e80a

Bump mypy from 1.12.1 to 1.13.0 (#46)

ddependabot[bot] committed 3 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))