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.4.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.4.tar.gz.
File metadata
- Download URL: passosh-0.0.4.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 |
c8965e6cad19ab86217389495c3ce8eb5ce35365bef4afb52ca0fc38fb032fad
|
|
| MD5 |
632cb451eb91c753dff721118d4d929a
|
|
| BLAKE2b-256 |
62bb5e2daa1f45b4452b57e1d25547caa25519b55299f2c842201dc48a0cf068
|
File details
Details for the file passosh-0.0.4-py3-none-any.whl.
File metadata
- Download URL: passosh-0.0.4-py3-none-any.whl
- Upload date:
- Size: 6.2 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 |
eedc35aae2219d575ba9a48e9e4e6e721fff353a2f03922d598d77c68265bbdc
|
|
| MD5 |
9abb69d1f4f942cd50578f84b79c6fb5
|
|
| BLAKE2b-256 |
636129e8b71d84eb59adc9771f48092555e97fbe5267df5856332fca17d2fe60
|