wallet-py3k-0.0.4


توضیحات

Passbook file generator
ویژگی مقدار
سیستم عامل -
نام فایل wallet-py3k-0.0.4
نام wallet-py3k
نسخه کتابخانه 0.0.4
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Egor Orlov
ایمیل نویسنده oeegor@gmail.com
آدرس صفحه اصلی https://github.com/oeegor/wallet-py3k
آدرس اینترنتی https://pypi.org/project/wallet-py3k/
مجوز Copyright (c) 2012 devartis Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Wallet-py3k 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)


نحوه نصب


نصب پکیج whl wallet-py3k-0.0.4:

    pip install wallet-py3k-0.0.4.whl


نصب پکیج tar.gz wallet-py3k-0.0.4:

    pip install wallet-py3k-0.0.4.tar.gz