Generate passes (.pkpass) files for Apple Wallet
Project description
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(),
'icon@2x.png': open("icon@2x.png", '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>'
)
)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
passosh-0.0.3.tar.gz
(5.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file passosh-0.0.3.tar.gz.
File metadata
- Download URL: passosh-0.0.3.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a5ce5524cca7b1748cc83e4c9963a57e7a31fe6b8f2f3764536025df7a4cc8a
|
|
| MD5 |
fe33c7f67b756a0b69bbb7d762f9973c
|
|
| BLAKE2b-256 |
e2a415241a591c1ea1f323d4b448b9eb100d6e0abc1bb4d07c8048ff8a1c4a48
|
File details
Details for the file passosh-0.0.3-py3-none-any.whl.
File metadata
- Download URL: passosh-0.0.3-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3835c5d63b90c37719ed9ec5868a12fd8bc2b5bad10320b9f1e2285099a31efd
|
|
| MD5 |
588581ca355deba1b8377e69129f0ce4
|
|
| BLAKE2b-256 |
d7173ea8eb63a245de88c567ce95df0867c89e3a73f2e24b7226ee2f376ad3be
|