Last updated:
0 purchases
passosh 0.0.4
Passosh
Generate passes (.pkpass) files for Apple Wallet
Install
pip install passosh
Usage
from passosh.fields import *
from passosh.pesso import Passosh, Content
from passosh.signature import create_pkpass
passosh = Passosh(
organizationName="<Your org>",
passTypeIdentifier="pass.your.org",
teamIdentifier="XXXXX",
serialNumber="YYYYYYYYYY",
foregroundColor='#FFFFFF',
labelColor='#FFFFFF',
media={
'icon.png': open("icon.png", 'rb').read(),
'[email protected]': open("[email protected]", 'rb').read(),
'logo.png': open("logo.png", 'rb').read(),
'background.png': open("background.png", 'rb').read(),
},
barcodes=[
Barcode(
message="https://google.com",
format=BarcodeFormat.QR
)
],
eventTicket=Content(
headerFields=[
HeaderField(
key='date',
value='19/12/23',
textAlignment=TextAlignment.RIGHT,
changeMessage='changed: %d'
)
],
primaryFields=[
PrimaryField(
key='title',
value='Title here'
)
],
secondaryFields=[
SecondaryField(
key='place',
value='Yatta Ramen BBQ, Warsaw',
label='PLACE'
),
SecondaryField(
key='user',
value='Nikola Teslovich',
label='GUEST',
textAlignment=TextAlignment.RIGHT.value,
changeMessage="Guest name is changed: %@"
),
],
),
)
create_pkpass(
passosh=passosh,
filename="your_filename.pkpass",
sign=dict(
cert_pem=b'<content of certificate.pem>',
key=b'<key content>',
password=b'<key\'s password>',
wwdr=b'<content of wwdr.pem>'
)
)
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.