Python library to read/write [Apple Wallet](http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/PassKit_PG/Chapters/Introduction.html#//apple_ref/doc/uid/TP40012195-CH1-SW1) (.pkpass) files
This is a fork of https://github.com/devartis/passbook which doesn't support py3k.
## Getting Started
1. Get a Pass Type Id
Visit the iOS Provisioning Portal -> Pass Type IDs -> New Pass Type ID
Select pass type id -> Configure (Follow steps and download generated pass.cer file)
Use Keychain tool to export a Certificates.p12 file (need Apple Root Certificate installed)
2. Generate the necessary certificate and key .pem files
```sh
openssl pkcs12 -in "Certificates.p12" -clcerts -nokeys -out certificate.pem
openssl pkcs12 -in "Certificates.p12" -nocerts -out key.pem
```
## Typical Usage
```python
from wallet.models import Pass, Barcode, StoreCard
cardInfo = StoreCard()
cardInfo.addPrimaryField('name', 'John Doe', 'Name')
organizationName = 'Your organization'
passTypeIdentifier = 'pass.com.your.organization'
teamIdentifier = 'AGK5BZEN3E'
passfile = Pass(cardInfo, \
passTypeIdentifier=passTypeIdentifier, \
organizationName=organizationName, \
teamIdentifier=teamIdentifier)
passfile.serialNumber = '1234567'
passfile.barcode = Barcode(message = 'Barcode message')
# Including the icon and logo is necessary for the passbook to be valid.
passfile.addFile('icon.png', open('images/icon.png', 'rb'))
passfile.addFile('logo.png', open('images/logo.png', 'rb'))
passfile.create('certificate.pem', 'key.pem', 'wwdr.pem', '123456', 'test.pkpass') # Create and output the Passbook file (.pkpass)
```
## Note: Getting WWDR Certificate
Certificate is available @ http://developer.apple.com/certificationauthority/AppleWWDRCA.cer
It can be exported from KeyChain into a .pem (e.g. wwdr.pem)
Metadata
Release files for wallet-py3k 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wallet-py3k-0.0.4.tar.gz | 6.2 kB | Without provenance | Details for wallet-py3k-0.0.4.tar.gz |
Release files / wallet-py3k-0.0.4.tar.gz
| Download URL | wallet-py3k-0.0.4.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9321d287ca876f32ba8052c69cbe9d509fc62c91d3342f3a8e35dafc03ea2332
|
|
BLAKE2b-256 checksum How to use checksums |
d3bd2495dd79d9b27c16b3a80d9e225b5d0a3e4c83e278b8d1c1a30bbbb5d577
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.7
|
Security for wallet-py3k 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.