app-store-server-library
The App Store Server Library
What it is and what it does
This is Apple's official Python library for integrating server-side App Store operations into Python applications. It wraps the App Store Server API, App Store Server Notifications, Retention Messaging API, and Advanced Commerce API, handling the cryptographic details of JWT signing, signed data verification, and receipt parsing so developers don't have to implement these protocols manually.
The library manages authentication to Apple's servers using private keys, verifies cryptographically signed notifications and receipts from Apple, extracts transaction history, and generates promotional offer signatures. It depends on cryptography, PyJWT, requests, and related libraries to handle the underlying security operations. Developers use it to validate purchases, manage subscriptions, respond to subscription events, and create time-limited promotional pricing—all the server-side tasks needed to monetize iOS apps.
Use it for:
- Validate in-app purchase receipts and transaction history from iOS apps in your backend.
- Listen to and verify signed App Store Server Notifications (subscription events, refunds, etc.) via webhooks.
- Generate cryptographically signed promotional offer codes for time-limited subscription discounts.
- Query transaction history for a user to reconcile subscriptions and detect refunds or cancellations.
- Implement retention messaging campaigns by integrating with Apple's Retention Messaging API.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides Python bindings to Apple's App Store Server API, handling in-app purchases, subscriptions, notifications, and promotional offers with cryptographic verification of signed data from Apple.
Yes. This is Apple's official library, actively maintained, with no known vulnerabilities, low install friction, and a permissive MIT license. Install it if you are building a Python backend for an iOS app that uses in-app purchases or subscriptions and need to validate receipts and handle App Store notifications server-side.
Install
app-store-server-library on PyPI
pip
pip install app-store-server-libraryuv
uv add app-store-server-librarypoetry
poetry add app-store-server-libraryInstalling app-store-server-library
Before you install
Low install friction with a pure-Python wheel and well-maintained dependencies. The package is actively maintained and requires Python 3.7 or later, with no compiled extensions to build.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both commercial and open-source projects.
Quickstart
pip install app-store-server-library
from app-store-server-library import AppStoreServerAPIClient
from app-store-server-library import Environment
private_key = read_private_key("/path/to/SubscriptionKey_ABCDEFGHIJ.p8")
client = AppStoreServerAPIClient(private_key, key_id, issuer_id, bundle_id, Environment.SANDBOX)
response = client.request_test_notification()
Requires an In-App Purchase key (p8 file) and issuer ID obtained from App Store Connect with Admin role; Python 3.7 or later.
Verify before relying
- Whether the async HTTPX support (optional dependency) is production-ready and what versions of httpx it requires.
- Performance characteristics when handling high-volume transaction history queries or concurrent API calls.
- Exact scope of the Advanced Commerce API support mentioned in the description.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4,>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 7 — attrs, PyJWT, requests, cryptography, pyOpenSSL, asn1, cattrs |
| Maintenance | actively maintained — 74 days since the last release |
| First released | |
| Downloads | 985,937/month — #4,573 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: app_store_server_library-3.1.2-py3-none-any.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
pyobjc-framework-StoreKitProvides Python bindings to Apple's StoreKit…
permissive · top 15,000 on PyPI
aioapnsaioapns sends push notifications to iOS devices…
permissive · top 5,000 on PyPI
wallet-py3kGenerates Apple Wallet (.pkpass) files from…
unclear · top 15,000 on PyPI
pyapns-clientSends Apple Push Notifications to iOS, macOS,…
permissive · top 5,000 on PyPI
pushover-completeA Python client library for the Pushover…
permissive · top 15,000 on PyPI
apns2-upSends push notifications to iOS devices through…
permissive · top 15,000 on PyPI
sigstoreSigstore is a Python tool for generating and…
permissive · top 5,000 on PyPI
standardwebhooksProvides webhook payload verification and…
permissive · top 5,000 on PyPI
urbanairshipPython library for integrating Airship's push…
permissive · top 15,000 on PyPI
pyobjc-framework-PushKitProvides Python bindings to Apple's PushKit…
permissive · top 15,000 on PyPI