llmify-decorator


Namellmify-decorator JSON
Version 0.0.2 PyPI version JSON
download
home_pageNone
SummaryLibrary for replacing function calls with LLM inference.
upload_time2025-08-18 16:35:33
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT License Copyright (c) 2025 Drew Ross Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords experimental llm nlp openai prototyping python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <img width="270" alt="ChatGPT Image Aug 16, 2025, 07_57_39 PM" src="https://github.com/user-attachments/assets/7af38c8f-4cd2-4ad8-9512-9d81c8afa1a8" />
</p>


<div align="center">
  
  <a href="https://www.python.org/">![Static Badge](https://img.shields.io/badge/python-3.9+-pink)</a>
  <a href="https://github.com/dross20/llmify/blob/main/LICENSE">![GitHub license](https://img.shields.io/badge/license-MIT-yellow.svg)</a>
  <a href="https://github.com/openai/openai-python">![OpenAI API](https://img.shields.io/badge/-OpenAI%20API-eee?style=flat-square&logo=openai&logoColor=412991)</a>
 
</div>

---
Replace a function call with LLM inference. Sends the source code and arguments to an LLM, which then predicts what the output should be.

> [!CAUTION]
> Please, for the love of all things good and holy, do not use this in any sort of production setting. This library should only be used for experimentation or prototyping.

## 📦 Installation
```bash
pip install git+https://github.com/dross20/llmify
```
## 💻 Quickstart
To use `llmify`, simply apply it as a decorator to a function like so:
```python
from llmify import llmify

@llmify()
def add(a, b):
  return a + b

result = add(1, 2)
print(result) # Output: 3 (probably)
```
To change the model used for inference, pass in a value for the `model` keyword argument:
```python
@llmify(model="gpt-5")
def add(a, b):
  ...
```
You can also use `llmify` on function stubs, so long as they have docstrings or comments:
```python
@llmify()
def greet_user(name):
  """Greet the user in a friendly manner."""
  ...

greeting = greet_user("Mortimer")
print(greeting) # Output: "Hello, Mortimer!"
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "llmify-decorator",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "experimental, llm, nlp, openai, prototyping, python",
    "author": null,
    "author_email": "Drew Ross <drewross@ku.edu>",
    "download_url": "https://files.pythonhosted.org/packages/4d/07/a5164e328bc079184036eaeee95b6cacddb9c75cf0e1d4e2a8cd9a852485/llmify_decorator-0.0.2.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n  <img width=\"270\" alt=\"ChatGPT Image Aug 16, 2025, 07_57_39 PM\" src=\"https://github.com/user-attachments/assets/7af38c8f-4cd2-4ad8-9512-9d81c8afa1a8\" />\n</p>\n\n\n<div align=\"center\">\n  \n  <a href=\"https://www.python.org/\">![Static Badge](https://img.shields.io/badge/python-3.9+-pink)</a>\n  <a href=\"https://github.com/dross20/llmify/blob/main/LICENSE\">![GitHub license](https://img.shields.io/badge/license-MIT-yellow.svg)</a>\n  <a href=\"https://github.com/openai/openai-python\">![OpenAI API](https://img.shields.io/badge/-OpenAI%20API-eee?style=flat-square&logo=openai&logoColor=412991)</a>\n \n</div>\n\n---\nReplace a function call with LLM inference. Sends the source code and arguments to an LLM, which then predicts what the output should be.\n\n> [!CAUTION]\n> Please, for the love of all things good and holy, do not use this in any sort of production setting. This library should only be used for experimentation or prototyping.\n\n## \ud83d\udce6 Installation\n```bash\npip install git+https://github.com/dross20/llmify\n```\n## \ud83d\udcbb Quickstart\nTo use `llmify`, simply apply it as a decorator to a function like so:\n```python\nfrom llmify import llmify\n\n@llmify()\ndef add(a, b):\n  return a + b\n\nresult = add(1, 2)\nprint(result) # Output: 3 (probably)\n```\nTo change the model used for inference, pass in a value for the `model` keyword argument:\n```python\n@llmify(model=\"gpt-5\")\ndef add(a, b):\n  ...\n```\nYou can also use `llmify` on function stubs, so long as they have docstrings or comments:\n```python\n@llmify()\ndef greet_user(name):\n  \"\"\"Greet the user in a friendly manner.\"\"\"\n  ...\n\ngreeting = greet_user(\"Mortimer\")\nprint(greeting) # Output: \"Hello, Mortimer!\"\n```\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2025 Drew Ross\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.",
    "summary": "Library for replacing function calls with LLM inference.",
    "version": "0.0.2",
    "project_urls": {
        "Repository": "https://github.com/dross20/llmify"
    },
    "split_keywords": [
        "experimental",
        " llm",
        " nlp",
        " openai",
        " prototyping",
        " python"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9425010639ad99dd859929b841288d3a579b355285df9c2fa8b8b3d92a543493",
                "md5": "7037798a490951a4ab0897eed990044f",
                "sha256": "738ecacb4af3cf3ed199d467c2ee631b773b29809363d6898d8c123e75c43ac7"
            },
            "downloads": -1,
            "filename": "llmify_decorator-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7037798a490951a4ab0897eed990044f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 6853,
            "upload_time": "2025-08-18T16:35:31",
            "upload_time_iso_8601": "2025-08-18T16:35:31.776766Z",
            "url": "https://files.pythonhosted.org/packages/94/25/010639ad99dd859929b841288d3a579b355285df9c2fa8b8b3d92a543493/llmify_decorator-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "4d07a5164e328bc079184036eaeee95b6cacddb9c75cf0e1d4e2a8cd9a852485",
                "md5": "27ae51d6feecacc5dca517098a7d9079",
                "sha256": "1f08f74e0706da6deac845a761282ab60721b5275548f9cec8e760636b47e2ee"
            },
            "downloads": -1,
            "filename": "llmify_decorator-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "27ae51d6feecacc5dca517098a7d9079",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 5367,
            "upload_time": "2025-08-18T16:35:33",
            "upload_time_iso_8601": "2025-08-18T16:35:33.201705Z",
            "url": "https://files.pythonhosted.org/packages/4d/07/a5164e328bc079184036eaeee95b6cacddb9c75cf0e1d4e2a8cd9a852485/llmify_decorator-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-18 16:35:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dross20",
    "github_project": "llmify",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "llmify-decorator"
}
        
Elapsed time: 0.99556s