Skip to main content
# 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

Objects can be written to old style plists with:

```
from plists import v1parser
from plists import v1writer

obj = v1parser.parseFile(<path_to_plist_file>)

v1writer.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 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.

Metadata

Release files for plists 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for plists 0.0.4
File Size Uploaded Provenance Actions
plists-0.0.4.tar.gz 7.4 kB Without provenance Details for plists-0.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for plists 0.0.4
File Interpreter ABI Platform Actions
plists-0.0.4.macosx-10.10-x86_64.tar.gz Details for plists-0.0.4.macosx-10.10-x86_64.tar.gz

Total release size: 18.6 kB

Release files / plists-0.0.4.tar.gz

Download URL plists-0.0.4.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d48b2390c27d957cf54791001f679f1c96d2652b599a85a3d9d2cc4567c02ce0
BLAKE2b-256 checksum
How to use checksums
711b24d3f3885744b41e4d58774bce89b3a20966960cd41c9d3d787485e01e1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / plists-0.0.4.macosx-10.10-x86_64.tar.gz

Download URL plists-0.0.4.macosx-10.10-x86_64.tar.gz
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3e3304cf055166665dba4766e1e16f36bdc67a2cfac7833efe9b3dc39b8d71dd
BLAKE2b-256 checksum
How to use checksums
25ba73ffcb29cb6287c820504d5ce7c23173a37deeafb201643e8e59c140911d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for plists 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page