GoogleWalletPassGenerator
Introduction
GoogleWalletPassGenerator is a Python package designed to simplify the process of creating passes for Google Wallet. This package provides an easy-to-use interface for generating various types of passes, including event tickets, boarding passes, loyalty cards, and more, compatible with Google Wallet.
Features
- Easy creation of Google Wallet passes.
- Support for multiple pass types (event tickets, boarding passes, etc.).
- Customizable pass templates.
- Convenient serialization to JSON format compatible with Google Wallet API.
Installation
To install GoogleWalletPassGenerator, run the following command:
pip install GoogleWalletPassGenerator
Usage
Here is a basic example of how to create an EventTicket class
from GoogleWalletPassGenerator.eventticket import EventTicketManager
from GoogleWalletPassGenerator.types import TranslatedString, LocalizedString, EventTicketClass, EventTicketClassId, EventTicketObject, EventTicketObjectId, Barcode, ObjectsToAddToWallet, EventTicketIdentifier
from GoogleWalletPassGenerator.enums import ReviewStatus, State, BarcodeType, BarcodeRenderEncoding
from GoogleWalletPassGenerator.serializer import serialize_to_json
service_account_json = 'path_to_service_account_json'
manager = EventTicketManager(service_account_json)
issuerId = 'ISSUER_ID'
uniqueClassId = 'UNIQUE_CLASS_ID'
uniqueObjectId = 'UNIQUE_OBJECT_ID'
eventTicketClass = serialize_to_json(
EventTicketClass(
id=EventTicketClassId(
issuerId=issuerId,
uniqueId=uniqueClassId
),
issuerName="Crafture",
eventName=LocalizedString(
defaultValue=TranslatedString(
"en-US", "EVENT_NAME"
),
),
reviewStatus=ReviewStatus.UNDER_REVIEW, # Or any other status from the enum
)
)
manager.create_class(eventTicketClass)
Here is a basic example of how to create an EventTicket Object of a class
eventTicketObject = serialize_to_json(
EventTicketObject(
id=EventTicketObjectId(
issuerId=issuerId,
uniqueId=uniqueObjectId
),
classId=EventTicketClassId(
issuerId=issuerId,
uniqueId=uniqueClassId
),
state=State.ACTIVE, # Or any other state from the enum
barcode=Barcode(
type=BarcodeType.QR_CODE, # Or any other barcode from the enum
renderEncoding=BarcodeRenderEncoding.UTF_8, # Or any other render encoding from the enum
value="https://www.crafture.com/",
)
)
)
manager.create_object(eventTicketObject)
You can now create the add to Google Wallet urls:
objectsToAdd = serialize_to_json(
ObjectsToAddToWallet(
[
EventTicketIdentifier(
id=EventTicketObjectId(
issuerId=issuerId,
uniqueId=uniqueObjectId
),
classId=EventTicketClassId(
issuerId=issuerId,
uniqueId=uniqueClassId
),
)
]
)
)
walletUrls = manager.create_add_event_ticket_urls(objectsToAdd)
print(walletUrls)
Metadata
Release files for GoogleWalletPassGenerator 1.1.6
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 |
|---|---|---|---|---|
| GoogleWalletPassGenerator-1.1.6.tar.gz | 7.0 kB | Without provenance | Details for GoogleWalletPassGenerator-1.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| GoogleWalletPassGenerator-1.1.6-py3-none-any.whl | Python 3 | none | any | Details for GoogleWalletPassGenerator-1.1.6-py3-none-any.whl |
Total release size: 15.3 kB
Release files / GoogleWalletPassGenerator-1.1.6.tar.gz
| Download URL | GoogleWalletPassGenerator-1.1.6.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
da08d90b28cf0cc6fed257f774d73b1f680da63e423a7ee9044438ec1d85106d
|
|
BLAKE2b-256 checksum How to use checksums |
61d19ebda40dac6acd70add0213c848e1e50bbeb372bcd172205233538f049d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Release files / GoogleWalletPassGenerator-1.1.6-py3-none-any.whl
| Download URL | GoogleWalletPassGenerator-1.1.6-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d3e9960a7bf5ac82562679d14bf5b412e370131e2a9be9b84bfcffef078642ca
|
|
BLAKE2b-256 checksum How to use checksums |
3b63c14faeae21dcd1911da52205dc11ce6a4a243925ab67a6fd370b0ee680f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Security for GoogleWalletPassGenerator 1.1.6
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.