Skip to main content

Description

RPP is a format used to describe REAPER projects. This package is designed to be RPP parser/emitter and uses PLY as parser framework.

Examples

Import the package:

>>> import rpp

Decode RPP:

>>> r = rpp.loads("""\
<REAPER_PROJECT 0.1 "4.32" 1372525904
  RIPPLE 0
  GROUPOVERRIDE 0 0 0
  AUTOXFADE 1
>
""")
>>> r
Element(tag='REAPER_PROJECT', attrib=(Decimal('0.1'), '4.32', 1372525904), children=[
    Element(tag='RIPPLE', attrib=(0,), children=None),
    Element(tag='GROUPOVERRIDE', attrib=(0, 0, 0), children=None),
    Element(tag='AUTOXFADE', attrib=(1,), children=None)
])

Transform elements into RPP:

>>> from decimal import Decimal
>>> from rpp import Element
>>> rpp.dumps(
...     Element(tag='REAPER_PROJECT', attrib=(Decimal('0.1'), '4.32', 1372525904), children=[
...         Element(tag='RIPPLE', attrib=(0,), children=None),
...         Element(tag='GROUPOVERRIDE', attrib=(0, 0, 0), children=None),
...         Element(tag='AUTOXFADE', attrib=(1,), children=None),
...     ]))
'<REAPER_PROJECT 0.1 4.32 1372525904\n  RIPPLE 0\n  GROUPOVERRIDE 0 0 0\n  AUTOXFADE 1\n>\n'

Element mimics the interface of xml.etree.ElementTree.Element. You can perform quering operations with findall, find, iterfind. Note that attribute and text predicates are not supported.

>>> r.find('.//GROUPOVERRIDE')
Element(tag='GROUPOVERRIDE', attrib=(0, 0, 0), children=None)

Dependencies

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rpp-0.2.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

rpp-0.2-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file rpp-0.2.tar.gz.

File metadata

  • Download URL: rpp-0.2.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rpp-0.2.tar.gz
Algorithm Hash digest
SHA256 f562574e9904a3b3f67583e0f4806597a5467267a597a0595bb2ca2eebec50f1
MD5 b78d25cf3cf53b0b7641a31697663c56
BLAKE2b-256 55ae06133210a256264bf07efb821d12183c52f1fa8e1ace07105cdc890eb01a

See more details on using hashes here.

File details

Details for the file rpp-0.2-py3-none-any.whl.

File metadata

  • Download URL: rpp-0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rpp-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dd5939e40deab0c5e1a90c152ca9f3ee274fc697019138fffd8dfe84802e56e2
MD5 36204e70f7a588134b1e73c32ce620de
BLAKE2b-256 cadefa1b892584e150ffc3fe8cbd651117045644431561d6597a7abfa9be3279

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 Sentry Error logging StatusPage Status page