passbook
Python library to create Apple Passbook (.pkpass) files
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.5%) to scientific vocabulary
Keywords from Contributors
Repository
Python library to create Apple Passbook (.pkpass) files
Basic Info
- Host: GitHub
- Owner: devartis
- License: mit
- Language: Python
- Default Branch: master
- Homepage: http://www.devartis.com/
- Size: 106 KB
Statistics
- Stars: 289
- Watchers: 23
- Forks: 112
- Open Issues: 14
- Releases: 0
Metadata Files
README.md
Passbook
Python library to create Apple Wallet (.pkpass) files (Apple Wallet has previously been known as Passbook in iOS 6 to iOS 8).
See the Wallet Topic Page and the Wallet Developer Guide for more information about Apple Wallet.
If you need the server side implementation (API / WebServices) in django you should check http://github.com/devartis/django-passbook.
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
shell
$ openssl pkcs12 -in "Certificates.p12" -clcerts -nokeys -out certificate.pem
3) Generate the key.pem
shell
$ openssl pkcs12 -in "Certificates.p12" -nocerts -out private.key
You will be asked for an export password (or export phrase). In this example it will be 123456, the script will use this as an argument to output the desired .pkpass
4) Ensure you have M2Crypto installed
sudo easy_install M2Crypto
Typical Usage
```python
!/usr/bin/env python
from passbook.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'))
Create and output the Passbook file (.pkpass)
password = '123456' passfile.create('certificate.pem', 'private.key', 'wwdr.pem', password , 'test.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).
Testing
You can run the tests with py.test or optionally with coverage support
(install pytest-cov first):
py.test --cov
You can also generate a HTML report of the coverage:
py.test --cov-report html
You can run the tests against multiple versions of Python by running tox
which you need to install first.
Credits
Developed by devartis.
Contributors
Martin Bächtold
Owner
- Name: devartis
- Login: devartis
- Kind: organization
- Email: info@devartis.com
- Location: Buenos Aires, Argentina
- Website: https://www.devartis.com
- Repositories: 76
- Profile: https://github.com/devartis
We craft web applications for great businesses
GitHub Events
Total
- Watch event: 16
- Fork event: 4
Last Year
- Watch event: 16
- Fork event: 4
Committers
Last synced: almost 3 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Fernando Aramendi | f****o@d****m | 27 |
| Poli | p****i@d****m | 26 |
| Martin Bächtold | m****n@b****e | 18 |
| derfenix | d****x@g****m | 8 |
| wasauce | w****l@g****m | 4 |
| 23min | p****r@2****m | 3 |
| John Sterling | j****g@c****m | 3 |
| Ian Lewis | I****s@g****m | 2 |
| Jorge Izquierdo | i****7@g****m | 2 |
| Toby Berster | w****r@g****m | 2 |
| otrok | c****9@g****m | 2 |
| Fernando Aramendi | f****i@m****) | 1 |
| Riegie Godwin Jeyaranchen | r****n@l****a | 1 |
| Julián Gutiérrez | j****1@g****m | 1 |
| Sergey Pronin | q****n@g****m | 1 |
| Nicolas Innocenti | n****s@s****m | 1 |
| Sylvain Emery | g****b@e****c | 1 |
| Joachim Jablon | e****m@g****m | 1 |
| Zebas Barrios | z****s@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 33
- Total pull requests: 35
- Average time to close issues: 9 months
- Average time to close pull requests: 2 months
- Total issue authors: 23
- Total pull request authors: 20
- Average comments per issue: 2.09
- Average comments per pull request: 0.83
- Merged pull requests: 29
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- mbaechtold (4)
- thijstriemstra (3)
- agn-7 (2)
- sanjubhambhani (2)
- imjaypatel (2)
- rgranadosd (2)
- ogonbat (2)
- XMLSDK (1)
- isc-JianjieYu (1)
- wzjjwxy (1)
- akatreyt (1)
- rawmean (1)
- davidcorry (1)
- Cut3cumber (1)
- TheSentinel (1)
Pull Request Authors
- mbaechtold (7)
- poligarcia (4)
- derfenix (3)
- 23min (3)
- agn-7 (2)
- johnksterling (2)
- freeridre (1)
- ianlewis (1)
- jugutier (1)
- wannabehero (1)
- janmasarik (1)
- izqui (1)
- nicoinn (1)
- sylvainemery (1)
- wasauce (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 425 last-month
- Total dependent packages: 0
- Total dependent repositories: 2
- Total versions: 9
- Total maintainers: 1
pypi.org: passbook
Passbook file generator
- Homepage: http://github.com/devartis/passbook/
- Documentation: https://passbook.readthedocs.io/
- License: Copyright (c) 2012 devartis
-
Latest release: 1.0.2
published about 10 years ago
Rankings
Maintainers (1)
Dependencies
- M2Crypto * test
- path.py * test
- pytest * test
- tox-travis * test
- M2Crypto *