wallet-py3k


Namewallet-py3k JSON
Version 0.0.4 PyPI version JSON
download
home_pagehttps://github.com/oeegor/wallet-py3k
SummaryPassbook file generator
upload_time2018-12-17 17:01:57
maintainer
docs_urlNone
authorEgor Orlov
requires_python
licenseCopyright (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.
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/oeegor/wallet-py3k",
    "name": "wallet-py3k",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Egor Orlov",
    "author_email": "oeegor@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/d3/bd/2495dd79d9b27c16b3a80d9e225b5d0a3e4c83e278b8d1c1a30bbbb5d577/wallet-py3k-0.0.4.tar.gz",
    "platform": "",
    "description": "# Wallet-py3k\n\nPython 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\n\nThis is a fork of https://github.com/devartis/passbook which doesn't support py3k.\n\n## Getting Started\n\n1. Get a Pass Type Id\n\n   Visit the iOS Provisioning Portal -> Pass Type IDs -> New Pass Type ID\n   Select pass type id -> Configure (Follow steps and download generated pass.cer file)\n   Use Keychain tool to export a Certificates.p12 file (need Apple Root Certificate installed)\n\n2. Generate the necessary certificate and key .pem files\n\n   ```sh\n   openssl pkcs12 -in \"Certificates.p12\" -clcerts -nokeys -out certificate.pem\n   openssl pkcs12 -in \"Certificates.p12\" -nocerts -out key.pem\n   ```\n\n## Typical Usage\n\n```python\n    from wallet.models import Pass, Barcode, StoreCard\n\n    cardInfo = StoreCard()\n    cardInfo.addPrimaryField('name', 'John Doe', 'Name')\n\n    organizationName = 'Your organization'\n    passTypeIdentifier = 'pass.com.your.organization'\n    teamIdentifier = 'AGK5BZEN3E'\n\n    passfile = Pass(cardInfo, \\\n        passTypeIdentifier=passTypeIdentifier, \\\n        organizationName=organizationName, \\\n        teamIdentifier=teamIdentifier)\n\n    passfile.serialNumber = '1234567'\n    passfile.barcode = Barcode(message = 'Barcode message')\n\n    # Including the icon and logo is necessary for the passbook to be valid.\n    passfile.addFile('icon.png', open('images/icon.png', 'rb'))\n    passfile.addFile('logo.png', open('images/logo.png', 'rb'))\n    passfile.create('certificate.pem', 'key.pem', 'wwdr.pem', '123456', 'test.pkpass') # Create and output the Passbook file (.pkpass)\n```\n## Note: Getting WWDR Certificate\n\nCertificate is available @ http://developer.apple.com/certificationauthority/AppleWWDRCA.cer\nIt can be exported from KeyChain into a .pem (e.g. wwdr.pem)\n",
    "bugtrack_url": null,
    "license": "Copyright (c) 2012 devartis\n\nPermission is hereby granted, free of charge, to any\nperson obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the\nSoftware without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice\nshall be included in all copies or substantial portions of\nthe Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY\nKIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE\nWARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR\nPURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS\nOR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\nOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n",
    "summary": "Passbook file generator",
    "version": "0.0.4",
    "project_urls": {
        "Homepage": "https://github.com/oeegor/wallet-py3k"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d3bd2495dd79d9b27c16b3a80d9e225b5d0a3e4c83e278b8d1c1a30bbbb5d577",
                "md5": "e26b44dd8c14c14f7a52f12a6c2caa85",
                "sha256": "9321d287ca876f32ba8052c69cbe9d509fc62c91d3342f3a8e35dafc03ea2332"
            },
            "downloads": -1,
            "filename": "wallet-py3k-0.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "e26b44dd8c14c14f7a52f12a6c2caa85",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6151,
            "upload_time": "2018-12-17T17:01:57",
            "upload_time_iso_8601": "2018-12-17T17:01:57.696246Z",
            "url": "https://files.pythonhosted.org/packages/d3/bd/2495dd79d9b27c16b3a80d9e225b5d0a3e4c83e278b8d1c1a30bbbb5d577/wallet-py3k-0.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2018-12-17 17:01:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "oeegor",
    "github_project": "wallet-py3k",
    "github_not_found": true,
    "lcname": "wallet-py3k"
}
        
Elapsed time: 1.10078s