This project makes it easy to get a Shopify app up and running with Django and the Python Shopify API.
This project contains
this example Shopify app,
which simply displays basic information about the shop's products
and orders. This project contains two django apps, shopify_app
which handles authentication (meant to be reusable) and home
which contains the example code to demonstrate how to use the API
(meant to be modified or replaced to create your Shopify App).
If you don't have an API key yet, create a Shopify Partner account and create an app. You can also create test shops once you're logged in as a partner.
When you create your app in the Shopify Partner Account, set the return URL to http://localhost:8000/login/finalize
-
Obtain your applications API Key and Shared Secret, and modify
shopify_settings.py
to use these values. -
Install the pre-requisites:
pip install Django ShopifyAPI
or
easy_install Django ShopifyAPI
-
Create the database
python manage.py syncdb
-
Start the server
python manage.py runserver
-
Visit http://localhost:8000 to view the example.
-
Download and unzip the pre-configured zip file for App Engine.
Applications for the App Engine need to be self-contained, so the required libraries are included in the zip file along with the projects source code.
To migrate an existing project to App Engine, just copy the following directories from zip file to your projects root directory:
Or follow the links to download the source code for any of the projects, and run
python setup.py build
in the projects root directory, then movebuild/lib/*
into the root of this project. -
Create an application with Google App Engine, and modify the application line in
app.yaml
with the application ID registered with Google App Engine. -
Install the App Engine SDK
-
Obtain your applications API Key and Shared Secret, and modify
shopify_settings.py
to use these values. -
Start the server
python manage.py runserver
-
Visit http://localhost:8000 to view the example.
-
When you are ready to deploy your application, update the return URL on Shopify to point to your App Engine domain name (e.g. https://APPLICATION-ID.appspot.com/login/finalize).
Then upload the application:
appcfg.py update .
Read up on the possible API calls: http://api.shopify.com
Learn how to use the shopify_python_api library: http://wiki.shopify.com/Using_the_shopify_python_api
Ask technical questions on Stack Overflow: http://stackoverflow.com/questions/tagged/shopify
Read and edit the wiki on Shopify App Developement: http://wiki.shopify.com/Shopify_App_Development