A Flask extension for Shopify app development
Project description
Flask-Shopify-Utils
The utils for Flask Application that build for Shopify Custom App
Installing
$pip install -U flask-shopify-utils
Example / How to ...
Please check the example
folder for more details.
Remember, this package is using Flask-SQLAlchemy, so you need to initialize the database first.
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_shopify_utils import ShopifyUtil
app = Flask(__name__)
# Init Database
db = SQLAlchemy()
db.init_app(app)
# Initial Shopify Utils
utils = ShopifyUtil()
utils.init_app(app)
# example: register default routes
utils.enroll_default_route()
Donate
Well, I have no idea how this work, just copy it from somewhere.
The Pallets organization develops and supports Flask and the libraries it uses. In order to grow the community of contributors and users, and allow the maintainers to devote more time to the projects, please donate today
First time setup
- Download the repository to your local machine.
- Create a virtualenv.
# Linux/macOS
$ python3 -m venv env
$ . env/bin/active
# Window
$ py -3 -m venv env
$ env/Scripts/active
- Install
pip-tools
,twine
andbuild
in the virtualenv.
>pip install --upgrade pip
>pip install pip-tools twine build
- Install the development dependencies, then install
Flask-ShopifyUtils
in editable mode.
$ pip install -r requirements/dev.txt && pip install -e .
- Build the wheel
# new
>python -m build
# For more reference https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html
- Deploy to PyPI
# check
>twine check dist/*
# upload
>twine upload dist/* --skip-existing
requirements.txt
All dependencies are managed by pip-tools
, so you need to install it first.
And you can find them from the requirements
folder.
# development
>pip-compile --extra=dev --output-file=requirements/dev.txt pyproject.toml
# production
>pip-compile --output-file=requirements/index.txt pyproject.toml
Running the tests
Make sure you have install the repository locally.
# install the package
>pip install -e .
# install the pytest
>pip install pytest
# run all tests
>pytest
# run tests with output
>pytest -s
# run specific test
>pytest -vs tests/test_init.py
# run specific test case
>pytest -vs tests/test_init.py::test_init_app
Reference
TODO
Add test for ShopifyUtil
methods
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file flask_shopify_utils-0.1.12.tar.gz
.
File metadata
- Download URL: flask_shopify_utils-0.1.12.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e18dd9bd1fcb64f74674c4c76ea4765b288e66f32439196bca048f44167349ab |
|
MD5 | 9acbaf9fceed4a5899e60156bbfeaf3b |
|
BLAKE2b-256 | 404e23888678b3172b8c9c70965c08d9f72746583076932f6380f4dc692d0f8d |
File details
Details for the file flask_shopify_utils-0.1.12-py3-none-any.whl
.
File metadata
- Download URL: flask_shopify_utils-0.1.12-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34214a1484f3ab0f150e6fd4d38e0431126b31e3257497113b4ec772cde78d25 |
|
MD5 | d4954e7efb67968aa0018b8cac5e1287 |
|
BLAKE2b-256 | 8356916fdfc7ffd3769b50c65049d3f9e4bb6b1a468a70c045be2a2c9f823c29 |