Since we first released our PHP and Python libraries for Shopify app builders, the landscape has changed:
- We’ve simplified the platform. Managed install, Token Exchange, Client Credentials, UI extensions, framework-agnostic App Bridge, Declarative web hooks, Declarative data definitions.
- AI accelerated everything. We’ve designed a new API around consistent, universal primitives with comprehensive docs and types. This helps us iterate faster across languages. It helps you scaffold framework integrations quickly. And it helps AI assistants provide accurate guidance when you’re stuck.
This convergence changes everything. We can better serve multiple languages. We can move faster, support more of the platform, stay up-to-date and accelerate you to high quality outcomes. There’s an opportunity we couldn’t pursue before: truly universal packages where work in one language benefits the other.
PHP and Python are both battle-tested, continuously improving, and backed by communities that care deeply about craft. We’re not picking favorites. We’re releasing new experimental packages for both PHP and Python simultaneously.
Our guiding principles
To help you understand the new packages, here’s how we’ve approached designing them:
- Built-in best practices: These packages encode the best practices for building Shopify apps. Use the package’s primitives and you’ll naturally build secure, performant apps that merchants love.
- Framework agnostic: Whether you’re using Laravel, Django, Flask, Symfony, FastAPI, or raw PHP/Python, these packages won’t force architectural decisions on you. We provide primitives. You compose them however you wish. We’ve prototyped extensively to make sure that composition can lead to idiomatic patterns.
- Built to stay current: PHP and Python share the same API spec, implementation docs, and test suite. Every fix, every feature, every improvement lands in both simultaneously. Edge cases the Python community finds make the PHP package more robust, and vice versa.
- Gradual adoption: No all-or-nothing rewrites. Your existing code keeps working. Migrate existing routes one at a time, or just use it only for new functionality. Use old and new packages alongside each other. You control the pace.
Feature support
Both packages support the same features.
Request Verification:
- App Home: Requests for embedded app home that use App Bridge
- Webhook requests
- UI Extensions: Requests from UI extensions (POS, Admin, Customer Account)
- App Proxy: Requests from storefronts via App Proxy
- Flow action: Requests from Flow action extensions
Exchange:
- Token Exchange: Use Token Exchange to exchange an ID token for an access token
- Client Credentials: Get access tokens via client credentials
GraphQL:
- Admin GraphQL: Make a request to the Admin GraphQL API. Includes automatic retry handling
And some helpers for app home:
- Patching an ID token: Recover from a situation where the ID token is missing or stale.
- Redirecting: Utilities to redirect inside the iframe, or to break out of the iframe.
Getting started
To get started in PHP please visit https://packagist.org/packages/shopify/shopify-app-php
For Python, please visit https://pypi.org/project/shopifyapp/
Early Access
We’ve released version 0.1.0 of both packages. During early access function signatures, parameter names and result shapes might change. This allows us to set both packages up for long term success. Breaking changes will be announced in the change log alongside new releases.
We’ll use early access to iron out any issues. To help us with that, we’d love you to try the packages and provide feedback. Provide feedback on PHP using this link or provide feedback on python using this link, or you can reply to this topic.
After early access we’ll release V1 which will be as stable as possible.
Scaffolding apps
We’ve confirmed that AI can scaffold apps using the PHP and Python package READMEs as context. It’s not perfect every time and you may need to wrangle it a bit, but in our experience it’s always close. If you create an app or template this way, please share your experience with us and the community!
A final thought
PHP and Python developers have been building powerful, reliable software for decades. We’re not asking you to switch languages. We’re not picking winners. We’re building something that works for both communities for the long term.
Thank you for continuing to build on the Shopify app platform. We look forward to your feedback.
Provide feedback on PHP using this link or provide feedback on python using this link, or you can reply to this topic.