Skip to main content

PyRealPro

The pyrealpro module provides classes that can be used to build a representation of a song, and render it in the import URL format used by the iRealPro app. It assumes that you have a passing familiarity with the iRealPro import format, but hopefully makes it easier to programmatically construct an iRealPro song than resorting to brute-force string concatenation.

Concepts

The Song class is used to define a song that you wish to import into iRealPro. In addition to basic information like title, composer, key, and style, a song's measures property may contain a list of Measure objects.

A Measure object's chords property will have one or more chord names, as well as additional properties that describe time signature (as a TimeSignature object), barlines, endings, rehearsal marks, and text to be displayed underneath.

The TimeSignature class provides simple objects used by the Measure class to properly format the output ultimately used by the Song class to generate an iRealPro URL.

Example

from pyrealpro import Song, Measure, TimeSignature

s = Song(title="Automation Blues", composer="pyrealpro", key='G', style='New Orleans Swing',
                 composer_name_first="Otto",
                 composer_name_last="Matonne")

s.measures.append(Measure(chords='G7', barline_open='{', staff_text='Generated by pyrealpro'))
s.measures.append(Measure(chords='G7'))
s.measures.append(Measure(chords='G7'))
s.measures.append(Measure(chords='G7', barline_close=']'))

s.measures.append(Measure(chords='C7', barline_open='['))
s.measures.append(Measure(chords='C7'))
s.measures.append(Measure(chords='G7'))
s.measures.append(Measure(chords='G7', barline_close=']'))

s.measures.append(Measure(chords='D7', barline_open='['))
s.measures.append(Measure(chords='C7'))

s.measures.append(Measure(chords='G7', ending='N1'))
s.measures.append(Measure(chords='D7', barline_close='}'))

s.measures.append(Measure(chords='G7', ending='N2'))
s.measures.append(Measure(chords='G7', barline_close='Z'))

print(s.url())

The above program will output the following URL, which can be imported into iRealPro:

irealbook://Automation%20Blues=Matonne%20Otto=New%20Orleans%20Swing=G=n=%7BT44%3CGenerated%20by%20pyrealpro%3EG7%20%20%20%7CG7%20%20%20%7CG7%20%20%20%7CG7%20%20%20%5D%5BC7%20%20%20%7CC7%20%20%20%7CG7%20%20%20%7CG7%20%20%20%5D%5BD7%20%20%20%7CC7%20%20%20%7CN1G7%20%20%20%7CD7%20%20%20%7DN2G7%20%20%20%7CG7%20%20%20Z

iReal Pro File Format Reference

https://irealpro.com/ireal-pro-file-format/

Metadata

Release files for pyrealpro 0.2.0

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

Source distribution (sdist)

Source distribution for pyrealpro 0.2.0
File Size Uploaded Provenance Actions
pyrealpro-0.2.0.tar.gz 10.0 kB Without provenance Details for pyrealpro-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyrealpro 0.2.0
File Interpreter ABI Platform Actions
pyrealpro-0.2.0-py3-none-any.whl Python 3 none any Details for pyrealpro-0.2.0-py3-none-any.whl

Total release size: 15.8 kB

Release files / pyrealpro-0.2.0.tar.gz

Download URL pyrealpro-0.2.0.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8cd8be2a5c78fa77062472db3c3fa80ae196c0abcc01772ee217920a3f10939e
BLAKE2b-256 checksum
How to use checksums
3107596f65d26c890ff2bef1233940c209b736590ee7f1d177f7a86e1fb14372
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.0

Release files / pyrealpro-0.2.0-py3-none-any.whl

Download URL pyrealpro-0.2.0-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a1847e954c205567990e9258b106c69353e07831f8948a74073c49c3a54f04e
BLAKE2b-256 checksum
How to use checksums
e04e51e6eebc02e1a3e442ae19df25ba32c363ef8dbbce01d3a63f285427cedc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.0

Security for pyrealpro 0.2.0

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