yors_pano_action_handle


Nameyors_pano_action_handle JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com//blob/main/packages/yors_pano_action_handle/README.md
SummaryA python library to set comfyui custom nodes action easily for developers in development
upload_time2024-12-23 13:31:57
maintainerNone
docs_urlNone
authoryemiancheng
requires_python<4.0,>=3.10
licenseLICENSE
keywords artist panz mono yors_pano_action_handle
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
  <h1>yors_pano_action_handle</h1>
  <p>
    <strong>🤖 A python library to set comfyui custom nodes action easily for developers in development.</strong>
  </p>
  
  ![PyPI - Version](https://img.shields.io/pypi/v/yors_pano_action_handle)
  ![PyPI - License](https://img.shields.io/pypi/l/yors_pano_action_handle)

</div>

to set comfyui custom nodes action for developers in development:

- set action for some filed in node input easily
- detect if node is enbale easily

## Why

- set your comfyui nodes action easily.
- share commom code in each node.

## 1 - install python package

```bash
pip install yors_pano_action_handle
```

## 2 - use it in your python code

- in some comfyui custom nodes project or module

- code in your `node_xx.py`

```py
from yors_pano_action_handle import node_action_values,action_is_enable,any_type

CURRENT_CATEGORY="ymc/link"
CURRENT_FUNCTION="exec"

# feat(core): node to set it as any type
class NodeSetItAsAny:
    @classmethod
    def INPUT_TYPES(s):
        return {
            "required": {

            },
            "optional":{
                "a": (any_type)
            },
            # "hidden": {
            #     "unique_id": "UNIQUE_ID",
            #     "extra_pnginfo": "EXTRA_PNGINFO",
            # },
        }

    # INPUT_IS_LIST = True
    RETURN_TYPES = (any_type,)
    RETURN_NAMES = ("a")

    FUNCTION = CURRENT_FUNCTION
    CATEGORY = CURRENT_CATEGORY
    NODE_NAME = "as any"
    NODE_DESC = "set it as any type"
    # OUTPUT_NODE = True
    # OUTPUT_IS_LIST = (True,)
    def exec(s, **kwargs):
        # load config from dict with name cnf
        a = kwargs.get("a")
        return (a,)

class NodeTextUpper:
    @classmethod
    def INPUT_TYPES(s):
        return {
            "required": {

            },
            "optional":{
                "text": ("STRING", {"default": ""}),
                "cmd_action": node_action_values,
            },
            # "hidden": {
            #     "unique_id": "UNIQUE_ID",
            #     "extra_pnginfo": "EXTRA_PNGINFO",
            # },
        }

    # INPUT_IS_LIST = True
    RETURN_TYPES = ("STRING","BOOL")
    RETURN_NAMES = ("text","status")

    FUNCTION = CURRENT_FUNCTION
    CATEGORY = CURRENT_CATEGORY
    NODE_NAME = "upper case"
    NODE_DESC = "transform text to upper case"
    # OUTPUT_NODE = True
    # OUTPUT_IS_LIST = (True,)
    def exec(s, **kwargs):
        # load config from dict with name cnf
        text = kwargs.get("text")
        cmd_action = kwargs.get("cmd_action")
        if action_is_enable(cmd_action) == False or cmd  in ["",None]:
          return (text.upper(), False)
        return (text,True)
```

## the dirs of your comfyui nodes repo

```
.
│  .gitignore
│  LICENSE
│  nodes.py
│  requirements.txt
│  __init__.py
└─link # some nodes to link nodes
    __init__.py
    xx.py
    ...
└─utils # some nodes for util process
    __init__.py
    xx.py
    ...
└─image # some nodes for image process
    __init__.py
    xx.py
    ...
```

## Author

ymc-github <ymc.github@gmail.com>

## License

MIT

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com//blob/main/packages/yors_pano_action_handle/README.md",
    "name": "yors_pano_action_handle",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": "artist, panz, mono, yors_pano_action_handle",
    "author": "yemiancheng",
    "author_email": "ymc.github@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/37/12/86462ac33359904322fcb55463c02e7c316341c95c5d450a2b9e8b870f9c/yors_pano_action_handle-0.1.0.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n  <h1>yors_pano_action_handle</h1>\n  <p>\n    <strong>\ud83e\udd16 A python library to set comfyui custom nodes action easily for developers in development.</strong>\n  </p>\n  \n  ![PyPI - Version](https://img.shields.io/pypi/v/yors_pano_action_handle)\n  ![PyPI - License](https://img.shields.io/pypi/l/yors_pano_action_handle)\n\n</div>\n\nto set comfyui custom nodes action for developers in development:\n\n- set action for some filed in node input easily\n- detect if node is enbale easily\n\n## Why\n\n- set your comfyui nodes action easily.\n- share commom code in each node.\n\n## 1 - install python package\n\n```bash\npip install yors_pano_action_handle\n```\n\n## 2 - use it in your python code\n\n- in some comfyui custom nodes project or module\n\n- code in your `node_xx.py`\n\n```py\nfrom yors_pano_action_handle import node_action_values,action_is_enable,any_type\n\nCURRENT_CATEGORY=\"ymc/link\"\nCURRENT_FUNCTION=\"exec\"\n\n# feat(core): node to set it as any type\nclass NodeSetItAsAny:\n    @classmethod\n    def INPUT_TYPES(s):\n        return {\n            \"required\": {\n\n            },\n            \"optional\":{\n                \"a\": (any_type)\n            },\n            # \"hidden\": {\n            #     \"unique_id\": \"UNIQUE_ID\",\n            #     \"extra_pnginfo\": \"EXTRA_PNGINFO\",\n            # },\n        }\n\n    # INPUT_IS_LIST = True\n    RETURN_TYPES = (any_type,)\n    RETURN_NAMES = (\"a\")\n\n    FUNCTION = CURRENT_FUNCTION\n    CATEGORY = CURRENT_CATEGORY\n    NODE_NAME = \"as any\"\n    NODE_DESC = \"set it as any type\"\n    # OUTPUT_NODE = True\n    # OUTPUT_IS_LIST = (True,)\n    def exec(s, **kwargs):\n        # load config from dict with name cnf\n        a = kwargs.get(\"a\")\n        return (a,)\n\nclass NodeTextUpper:\n    @classmethod\n    def INPUT_TYPES(s):\n        return {\n            \"required\": {\n\n            },\n            \"optional\":{\n                \"text\": (\"STRING\", {\"default\": \"\"}),\n                \"cmd_action\": node_action_values,\n            },\n            # \"hidden\": {\n            #     \"unique_id\": \"UNIQUE_ID\",\n            #     \"extra_pnginfo\": \"EXTRA_PNGINFO\",\n            # },\n        }\n\n    # INPUT_IS_LIST = True\n    RETURN_TYPES = (\"STRING\",\"BOOL\")\n    RETURN_NAMES = (\"text\",\"status\")\n\n    FUNCTION = CURRENT_FUNCTION\n    CATEGORY = CURRENT_CATEGORY\n    NODE_NAME = \"upper case\"\n    NODE_DESC = \"transform text to upper case\"\n    # OUTPUT_NODE = True\n    # OUTPUT_IS_LIST = (True,)\n    def exec(s, **kwargs):\n        # load config from dict with name cnf\n        text = kwargs.get(\"text\")\n        cmd_action = kwargs.get(\"cmd_action\")\n        if action_is_enable(cmd_action) == False or cmd  in [\"\",None]:\n          return (text.upper(), False)\n        return (text,True)\n```\n\n## the dirs of your comfyui nodes repo\n\n```\n.\n\u2502  .gitignore\n\u2502  LICENSE\n\u2502  nodes.py\n\u2502  requirements.txt\n\u2502  __init__.py\n\u2514\u2500link # some nodes to link nodes\n    __init__.py\n    xx.py\n    ...\n\u2514\u2500utils # some nodes for util process\n    __init__.py\n    xx.py\n    ...\n\u2514\u2500image # some nodes for image process\n    __init__.py\n    xx.py\n    ...\n```\n\n## Author\n\nymc-github <ymc.github@gmail.com>\n\n## License\n\nMIT\n",
    "bugtrack_url": null,
    "license": "LICENSE",
    "summary": "A python library to set comfyui custom nodes action easily for developers in development",
    "version": "0.1.0",
    "project_urls": {
        "Documentation": "https://github.com//blob/main/packages/yors_pano_action_handle/README.md",
        "Homepage": "https://github.com//blob/main/packages/yors_pano_action_handle/README.md",
        "Repository": "https://github.com/.git",
        "changelog": "https://github.com//blob/main/packages/yors_pano_action_handle/CHANGELOG.md"
    },
    "split_keywords": [
        "artist",
        " panz",
        " mono",
        " yors_pano_action_handle"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "aa280357110b4845e8bfc50f5d4bcc86f68ef42031dfaf42cef10e3f8111ac59",
                "md5": "0cb0f51108459d14bc0ae6e736f94bfb",
                "sha256": "5eea9aee2099d7e7b0bdef87ecdc90bee4b82a90ffcd6e2ed2344595124dcefc"
            },
            "downloads": -1,
            "filename": "yors_pano_action_handle-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0cb0f51108459d14bc0ae6e736f94bfb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 2886,
            "upload_time": "2024-12-23T13:31:54",
            "upload_time_iso_8601": "2024-12-23T13:31:54.266769Z",
            "url": "https://files.pythonhosted.org/packages/aa/28/0357110b4845e8bfc50f5d4bcc86f68ef42031dfaf42cef10e3f8111ac59/yors_pano_action_handle-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "371286462ac33359904322fcb55463c02e7c316341c95c5d450a2b9e8b870f9c",
                "md5": "ed36f75916f79c0db6cb0524dce39d9c",
                "sha256": "3388f0e255aecd2c9df2412918e06de9dc4092b25358f93b165943a0e1a12dc6"
            },
            "downloads": -1,
            "filename": "yors_pano_action_handle-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ed36f75916f79c0db6cb0524dce39d9c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 2344,
            "upload_time": "2024-12-23T13:31:57",
            "upload_time_iso_8601": "2024-12-23T13:31:57.203281Z",
            "url": "https://files.pythonhosted.org/packages/37/12/86462ac33359904322fcb55463c02e7c316341c95c5d450a2b9e8b870f9c/yors_pano_action_handle-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-23 13:31:57",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "yors_pano_action_handle"
}
        
Elapsed time: 1.21358s