flask-shopify-utils


Nameflask-shopify-utils JSON
Version 0.1.12 PyPI version JSON
download
home_pageNone
SummaryA Flask extension for Shopify app development
upload_time2024-11-14 01:38:57
maintainerLeo Chen
docs_urlNone
authorLeo Chen
requires_python>=3.8
licenseNone
keywords extension flask flask extension sdk shopify shopify-sdk
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Flask-Shopify-Utils

The utils for Flask Application that build for Shopify Custom App 

---

# Installing

```shell
$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.

```python
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](https://palletsprojects.com/donate)

---

## First time setup

- Download the repository to your local machine.
- Create a virtualenv.

```shell
# Linux/macOS
$ python3 -m venv env
$ . env/bin/active

# Window
$ py -3 -m venv env
$ env/Scripts/active
```

- Install `pip-tools`, `twine` and `build` in the virtualenv. 

```shell
>pip install --upgrade pip
>pip install pip-tools twine build
```

- Install the development dependencies, then install `Flask-ShopifyUtils` in editable mode.

```sheel
$ pip install -r requirements/dev.txt && pip install -e .
```

- Build the wheel
```shell
# new 
>python -m build
# For more reference https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html
```

- Deploy to PyPI

```shell
# 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.

```shell
# 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.

```shell
# 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
[Packing for Python](https://packaging.python.org/en/latest/tutorials/installing-packages/)

# TODO
Add test for `ShopifyUtil` methods
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "flask-shopify-utils",
    "maintainer": "Leo Chen",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "leo.cxy88@gmail.com",
    "keywords": "Extension, Flask, Flask Extension, SDK, Shopify, Shopify-SDK",
    "author": "Leo Chen",
    "author_email": "leo.cxy88@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/40/4e/23888678b3172b8c9c70965c08d9f72746583076932f6380f4dc692d0f8d/flask_shopify_utils-0.1.12.tar.gz",
    "platform": null,
    "description": "# Flask-Shopify-Utils\n\nThe utils for Flask Application that build for Shopify Custom App \n\n---\n\n# Installing\n\n```shell\n$pip install -U flask-shopify-utils\n```\n\n---\n\n## Example / How to ...\n\nPlease check the `example` folder for more details.\n\nRemember, this package is using Flask-SQLAlchemy, so you need to initialize the database first.\n\n```python\nfrom flask import Flask\nfrom flask_sqlalchemy import SQLAlchemy\nfrom flask_shopify_utils import ShopifyUtil\n\napp = Flask(__name__)\n# Init Database\ndb = SQLAlchemy()\ndb.init_app(app)\n\n# Initial Shopify Utils\nutils = ShopifyUtil()\nutils.init_app(app)\n\n# example: register default routes\nutils.enroll_default_route()\n\n```\n\n---\n\n## Donate\n\nWell, I have no idea how this work, just copy it from somewhere.\n\nThe Pallets organization develops and supports Flask and the libraries\nit uses. In order to grow the community of contributors and users, and\nallow the maintainers to devote more time to the projects, [please\ndonate today](https://palletsprojects.com/donate)\n\n---\n\n## First time setup\n\n- Download the repository to your local machine.\n- Create a virtualenv.\n\n```shell\n# Linux/macOS\n$ python3 -m venv env\n$ . env/bin/active\n\n# Window\n$ py -3 -m venv env\n$ env/Scripts/active\n```\n\n- Install `pip-tools`, `twine` and `build` in the virtualenv. \n\n```shell\n>pip install --upgrade pip\n>pip install pip-tools twine build\n```\n\n- Install the development dependencies, then install `Flask-ShopifyUtils` in editable mode.\n\n```sheel\n$ pip install -r requirements/dev.txt && pip install -e .\n```\n\n- Build the wheel\n```shell\n# new \n>python -m build\n# For more reference https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html\n```\n\n- Deploy to PyPI\n\n```shell\n# check\n>twine check dist/*\n# upload\n>twine upload dist/* --skip-existing\n```\n\n## requirements.txt\n\nAll dependencies are managed by `pip-tools`, so you need to install it first.\nAnd you can find them from the `requirements` folder.\n\n```shell\n# development\n>pip-compile --extra=dev --output-file=requirements/dev.txt pyproject.toml\n\n# production\n>pip-compile --output-file=requirements/index.txt pyproject.toml\n````\n\n## Running the tests\n\nMake sure you have install the repository locally.\n\n```shell\n# install the package\n>pip install -e .\n# install the pytest\n>pip install pytest\n# run all tests\n>pytest\n# run tests with output\n>pytest -s\n# run specific test\n>pytest -vs tests/test_init.py\n# run specific test case\n>pytest -vs tests/test_init.py::test_init_app\n```\n\n---\n\n# Reference\n[Packing for Python](https://packaging.python.org/en/latest/tutorials/installing-packages/)\n\n# TODO\nAdd test for `ShopifyUtil` methods",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Flask extension for Shopify app development",
    "version": "0.1.12",
    "project_urls": {
        "Bug Tracker": "https://github.com/leocxy/flask-shopify-utils/issues",
        "Homepage": "https://github.com/leocxy/flask-shopify-utils"
    },
    "split_keywords": [
        "extension",
        " flask",
        " flask extension",
        " sdk",
        " shopify",
        " shopify-sdk"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8356916fdfc7ffd3769b50c65049d3f9e4bb6b1a468a70c045be2a2c9f823c29",
                "md5": "d4954e7efb67968aa0018b8cac5e1287",
                "sha256": "34214a1484f3ab0f150e6fd4d38e0431126b31e3257497113b4ec772cde78d25"
            },
            "downloads": -1,
            "filename": "flask_shopify_utils-0.1.12-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d4954e7efb67968aa0018b8cac5e1287",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 14827,
            "upload_time": "2024-11-14T01:38:43",
            "upload_time_iso_8601": "2024-11-14T01:38:43.830879Z",
            "url": "https://files.pythonhosted.org/packages/83/56/916fdfc7ffd3769b50c65049d3f9e4bb6b1a468a70c045be2a2c9f823c29/flask_shopify_utils-0.1.12-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "404e23888678b3172b8c9c70965c08d9f72746583076932f6380f4dc692d0f8d",
                "md5": "9acbaf9fceed4a5899e60156bbfeaf3b",
                "sha256": "e18dd9bd1fcb64f74674c4c76ea4765b288e66f32439196bca048f44167349ab"
            },
            "downloads": -1,
            "filename": "flask_shopify_utils-0.1.12.tar.gz",
            "has_sig": false,
            "md5_digest": "9acbaf9fceed4a5899e60156bbfeaf3b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 15282,
            "upload_time": "2024-11-14T01:38:57",
            "upload_time_iso_8601": "2024-11-14T01:38:57.833632Z",
            "url": "https://files.pythonhosted.org/packages/40/4e/23888678b3172b8c9c70965c08d9f72746583076932f6380f4dc692d0f8d/flask_shopify_utils-0.1.12.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-14 01:38:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "leocxy",
    "github_project": "flask-shopify-utils",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "flask-shopify-utils"
}
        
Elapsed time: 0.37124s