Hello World sample app in Python and Flask
This is a small Flask application that implements the OAuth callback flow for BigCommerce Single Click Apps and uses the BigCommerce API to pull a list of products on a BigCommerce store. For information on how to develop apps for BigCommerce stores, see our Developer Portal.
We hope this sample gives you a good starting point for building your next killer app! What follows are steps specific to running and installing this sample application.
localhost
for your hostname, but ultimately you'll need to host your
app on the public Internet.https://<app hostname>/bigcommerce/callback
https://<app hostname>/bigcommerce/load
https://<app hostname>/bigcommerce/uninstall
https://<app hostname>/bigcommerce/remove-user
(if enabling your app for multiple users)Save & Close
on the top right of the dialog.git clone [email protected]:bigcommerce/hello-world-app-python-flask.git
cd hello-world-app-python-flask
virtualenv ENV && source ENV/bin/activate
pip install -r requirements.txt
.env-example
to .env
.env
:BC_CLIENT_ID
and BC_CLIENT_SECRET
to the values obtained from Developer Portal.APP_URL
to https://<app hostname>
.SESSION_SECRET
to a long random string, such as that generated by os.urandom(64)
.from app import db
db.create_all()
python ./app.py
In order to install this app in a BigCommerce store, it must be hosted on the public Internet. You can get started in development
by simply running python app.py
to run it locally, and then use localhost
in your URLs, but ultimately you will need to host
it somewhere to use the app anywhere other than your development system.