Skip to main content

A package for managing Apple plist files.

Project description

# What is this?

This is a package for reading, writing and managing [Apple plist files](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man5/plist.5.html).

# Installation

```
pip install plists
```

# Examples

## Reading plist files

### Reading V1 (Old Style) plists from file

```
import plists

obj = plists.v1parser.parseFile("path_to_file")

# ... use obj as a normal python object
```

### Reading V1 (Old Style) plists from string

```
import plists

obj = plists.v1parser.parse("some_loaded_string")

# ... use obj as a normal python object
```


### Reading XML plists from file

```
from plists import xmlparser

obj = xmlparser.parseFile("path_to_file")

# ... use obj as a normal python object
```

### Reading XML plists from string

```
from plists import xmlparser

obj = xmlparser.parse("some_loaded_string")

# ... use obj as a normal python object
```

### Reading Binary plists

Coming Soon


## Writing objects to plist files

### Writing to Old style plists

Coming Soon.

### Writing to XML plists

Objects can be written to xml plists with:

```
from plists import xmlparser
from plists import xmlwriter

obj = xmlparser.parseFile(<path_to_plist_file>)

xmlwriter.write(obj, outstream, indentString, level)

```

The parameters are:

* obj - The object being serialized
* outstream - The output stream to which the object will be serialized. If this is None, then a new string outputstream is written to and returned.
* indentString - Indentation string to be used. If this value is None then no indentation or pretification is applied. Otherwise this is used.
* level - The level to start with when serializing. Each child node is indented an extra level (if indentString is not None).

### Writing to Binary plists

Coming Soon.

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

plists-0.0.3.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

plists-0.0.3.macosx-10.10-x86_64.tar.gz (10.1 kB view details)

Uploaded Source

File details

Details for the file plists-0.0.3.tar.gz.

File metadata

  • Download URL: plists-0.0.3.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for plists-0.0.3.tar.gz
Algorithm Hash digest
SHA256 c3ac16d5b6262552ac5da8ac410fa7a85e918e11ff708cf5b4958f240619029b
MD5 5eafa72ce9d4f348aa6399077a322b20
BLAKE2b-256 f6bfd7e74c38a6d8d4993ac2631fc327c3439e06e7d01ebf54f86202393e548f

See more details on using hashes here.

File details

Details for the file plists-0.0.3.macosx-10.10-x86_64.tar.gz.

File metadata

File hashes

Hashes for plists-0.0.3.macosx-10.10-x86_64.tar.gz
Algorithm Hash digest
SHA256 e0643580149d57939d036a1b73f534cecf3598ad2589a3d81a399960d824a9c7
MD5 c53fc563b74ed50f42bb2290f0d917a2
BLAKE2b-256 ed05852f627a7e31301e7bd56b0b5d0291002866296972e0b8b84890ad08626e

See more details on using hashes here.

Supported by

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