Skip to main content

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>'
    )
)

Release files for passosh 0.0.4

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

Source distribution (sdist)

Source distribution for passosh 0.0.4
File Size Uploaded
passosh-0.0.4.tar.gz 5.6 kB Details

Built distribution (wheel)

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

Total release size: 11.8 kB

Release files / passosh-0.0.4.tar.gz

Download URL passosh-0.0.4.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c8965e6cad19ab86217389495c3ce8eb5ce35365bef4afb52ca0fc38fb032fad
BLAKE2b-256 checksum
How to use checksums
62bb5e2daa1f45b4452b57e1d25547caa25519b55299f2c842201dc48a0cf068
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.13

Release files / passosh-0.0.4-py3-none-any.whl

Download URL passosh-0.0.4-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eedc35aae2219d575ba9a48e9e4e6e721fff353a2f03922d598d77c68265bbdc
BLAKE2b-256 checksum
How to use checksums
636129e8b71d84eb59adc9771f48092555e97fbe5267df5856332fca17d2fe60
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.13

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

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