Skip to main content

PassKit Python gRPC SDK

PyPI Python License: MIT

Generated Python clients and message types for the PassKit gRPC API. Use the SDK to build integrations for membership and loyalty cards, coupons, event tickets, boarding passes, and the other PassKit services.

Requirements

  • Python 3.9 or newer
  • A PassKit account and API credentials for live API calls

Install

python -m pip install passkit-python-grpc-sdk

Pin a specific release when reproducible installs are important:

python -m pip install passkit-python-grpc-sdk==1.1.162

The package installs the compatible gRPC, Protocol Buffers, Google API annotations, and OpenAPI annotation runtimes automatically.

Use the SDK

Import the generated messages and service stubs for the PassKit product you want to use:

import grpc

from passkit.io.common.common_objects_pb2 import Id
from passkit.io.member.a_rpc_pb2_grpc import MembersStub

with open("certs/ca-chain.pem", "rb") as file:
    root_certificate = file.read()
with open("certs/key.pem", "rb") as file:
    private_key = file.read()
with open("certs/certificate.pem", "rb") as file:
    certificate_chain = file.read()

credentials = grpc.ssl_channel_credentials(
    root_certificates=root_certificate,
    private_key=private_key,
    certificate_chain=certificate_chain,
)
channel = grpc.secure_channel(
    "grpc.pub1.passkit.io:443",
    credentials,
)
members = MembersStub(channel)

program = members.getProgram(Id(id="YOUR_PROGRAM_ID"))
print(program)

For complete credential setup and runnable membership, coupon, event-ticket, and flight examples, see the PassKit Python quickstart.

Main modules

  • passkit.io.member
  • passkit.io.single_use_coupons
  • passkit.io.event_tickets
  • passkit.io.flights
  • passkit.io.core
  • passkit.io.analytics
  • passkit.io.scheduler
  • passkit.io.raw

The generated method names intentionally match the PassKit API definitions.

Development

python -m pip install -e ".[dev]"
python -m unittest discover -s tests -v
python -m build
python -m twine check dist/*

Documentation and support

Licence

Distributed under the MIT Licence.

Metadata

Release files for passkit-python-grpc-sdk 1.1.162

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for passkit-python-grpc-sdk 1.1.162
File Size Uploaded
passkit_python_grpc_sdk-1.1.162.tar.gz 148.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for passkit-python-grpc-sdk 1.1.162
File Interpreter ABI Platform
passkit_python_grpc_sdk-1.1.162-py3-none-any.whl Python 3 none any Details

Total release size: 379.3 kB

Release files / passkit_python_grpc_sdk-1.1.162.tar.gz

Download URL passkit_python_grpc_sdk-1.1.162.tar.gz
Size 148.2 kB
Tags Source
SHA-256 checksum
How to use checksums
dc9bb20f99b6c337e1d28c1045740a20fc7c86fb6d27bb63432003cef2cce19b
BLAKE2b-256 checksum
How to use checksums
2b1a0f49119e6e3b4a4d17ed611fdd51c4f1fa4c8fb8d996d820a6692e596b88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Release files / passkit_python_grpc_sdk-1.1.162-py3-none-any.whl

Download URL passkit_python_grpc_sdk-1.1.162-py3-none-any.whl
Size 231.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
65300a96b0b3f208bf39f0e467fd4d6db0e9814a00216c58f0ccbe53434a0a7f
BLAKE2b-256 checksum
How to use checksums
a5f87bb23b882ea46685fe3ed0cd8cc7e7b7a07d1658bc58201d5d178a616f85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page