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="you_filename.pkpass",
sign=dict(
cert_pem=b'<pem cert content>',
key=b'<key content'>,
password=b'<key\'s password>',
wwdr=b'<wwdr cet content>'
)
)
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.2.tar.gz
(5.5 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.2.tar.gz.
File metadata
- Download URL: passosh-0.0.2.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11417fec6c008fed700751bafd80691c955391df2b2820785e3c755029ed0f70
|
|
| MD5 |
929f9f5d776733969fb665ad97392598
|
|
| BLAKE2b-256 |
35cab343d3e25b333f931347f9bbc8e73de0d8aa02b10d185819c3a3b4a9aa8b
|
File details
Details for the file passosh-0.0.2-py3-none-any.whl.
File metadata
- Download URL: passosh-0.0.2-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 |
886783661d02dc2c3306236971726207331c35f839fd398b69db5bf490686d3c
|
|
| MD5 |
bae8d8c1a385657512dbbcbcb0810f6e
|
|
| BLAKE2b-256 |
c1f2a8c7cea232a3e43d9c820b55cde7390dec248be7595a4ede3ad1cac46093
|