Skip to main content

A package for managing 'Apple PList'-files in XML-format.

Project description

What is this?

This is a package for reading, writing and managing Apple PLIST-files, in XML-Format, with Python 3.

Installation

pip3 install pyplist

Examples

Reading plist files

Reading XML-PLists from file

from pyplist import XMLParser

obj = XMLParser.parseFile("path_to_file")

# ... use obj as a normal python object

Reading XML-PLists from string

from pyplist 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 XML-PLists to file

Objects can be written to xml plists with:

from pyplist import XMLParser
from pyplist import XMLWriter

obj = XMLParser.parseFile(<path_to_plist_file>)

with open(<path_to_output_file>, 'wt') as outstream:
  XMLWriter.write(obj, outstream[, indentString=None, level=0])
  outstream.close()

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyplist-0.0.5-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file pyplist-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: pyplist-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for pyplist-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 49e4bac83eaf690765b953f2e78358dcc823d3fcc788077bb37039f31f8d9b96
MD5 8d0af96af311d82b0d6160aaa22dbb2c
BLAKE2b-256 728751d07bda35b307029530402087f2cbb2cc8fc68c857f367bc60613e1d7ff

See more details on using hashes here.

Supported by

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