GitXplorerGitXplorer
b

keyedarchivelib

public
4 stars
2 forks
0 issues

Commits

List of commits on branch main.
Verified
b39c2a14b73435b5cac2f10334cc165c227b8a2a

Bump mypy from 1.12.0 to 1.12.1 (#45)

ddependabot[bot] committed 3 months ago
Verified
5890f0fa465c2f8c3740f8abe416e6d5f58f4d6f

Bump coverage from 7.6.3 to 7.6.4 (#44)

ddependabot[bot] committed 3 months ago
Verified
bbd3988542bfe26eb391d046bc8f1f4b945cf9e2

Bump mypy from 1.11.2 to 1.12.0 (#43)

ddependabot[bot] committed 3 months ago
Verified
711ced2baa2bb8c387d69a598509c9850630a034

Bump coverage from 7.6.2 to 7.6.3 (#42)

ddependabot[bot] committed 3 months ago
Verified
6e29dce47e659e33d92fbac186b2bbb6a5edd61a

Bump coverage from 7.6.1 to 7.6.2 (#41)

ddependabot[bot] committed 3 months ago
Verified
56456e24988a305c9cf23d6a048a5f3cbae81fcc

Bump black from 24.8.0 to 24.10.0 (#40)

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))