funcbygpt


Namefuncbygpt JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/emresvd/funcbygpt
Summarytell the function what to do and gpt will write the code
upload_time2023-03-16 18:11:19
maintainer
docs_urlNone
authoremresvd
requires_python
licenseMIT
keywords gpt openai wrapper
VCS
bugtrack_url
requirements aiohttp aiosignal async-timeout asynctest attrs bleach certifi charset-normalizer colorama docutils frozenlist idna importlib-metadata importlib-resources jaraco.classes keyring markdown-it-py mdurl more-itertools multidict openai pkginfo Pygments python-dotenv pywin32-ctypes readme-renderer requests requests-toolbelt rfc3986 rich six tqdm twine typing_extensions urllib3 webencodings yarl zipp
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # funcbygpt



tell the function what to do and gpt will write the code



## install funcbygpt

```bash

pip install funcbygpt

```



## api key

you need to get an api key from [openai](https://openai.com/)<br>

and put it in a file called `.env` in the root of the project.<br>

the file should look like this:

```bash

OPENAI_API_KEY=your_api_key

```



<br><br>



## usage



### hello world

```python

import funcbygpt



@funcbygpt.funcbygpt

def hello():

    return "function that prints hello world"



hello()

```

output:

```

Hello World!

```



<br><br>



### counter

```python

import funcbygpt



@funcbygpt.funcbygpt

def count():

    return "function that counts to 100"



count()

```

output:

```

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100

```



<br><br>



### bubble sort

```python

import funcbygpt



@funcbygpt.funcbygpt

def bubble_sort(array):

    return f"function that sorts array {array} with bubble sort"



bubble_sort([7, 4, 1, 8, 5, 2, 0, 9, 6, 3])

```

output:

```

[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

```



<br><br>



### remove char

```python

import funcbygpt



@funcbygpt.funcbygpt

def remove_char(string, c):

    return f"function that removes the {c} character from the {string} string and returns the result --return"



print(remove_char("hello world", "l"))

```

output:

```

heo word

```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/emresvd/funcbygpt",
    "name": "funcbygpt",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "gpt,openai,wrapper",
    "author": "emresvd",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/ea/1f/44bea8933cd2f5f5b31a242d88a6cfd2e1f0d9cb3b63f12d8b1978230f69/funcbygpt-0.0.2.tar.gz",
    "platform": null,
    "description": "# funcbygpt\r\n\r\n\r\n\r\ntell the function what to do and gpt will write the code\r\n\r\n\r\n\r\n## install funcbygpt\r\n\r\n```bash\r\n\r\npip install funcbygpt\r\n\r\n```\r\n\r\n\r\n\r\n## api key\r\n\r\nyou need to get an api key from [openai](https://openai.com/)<br>\r\n\r\nand put it in a file called `.env` in the root of the project.<br>\r\n\r\nthe file should look like this:\r\n\r\n```bash\r\n\r\nOPENAI_API_KEY=your_api_key\r\n\r\n```\r\n\r\n\r\n\r\n<br><br>\r\n\r\n\r\n\r\n## usage\r\n\r\n\r\n\r\n### hello world\r\n\r\n```python\r\n\r\nimport funcbygpt\r\n\r\n\r\n\r\n@funcbygpt.funcbygpt\r\n\r\ndef hello():\r\n\r\n    return \"function that prints hello world\"\r\n\r\n\r\n\r\nhello()\r\n\r\n```\r\n\r\noutput:\r\n\r\n```\r\n\r\nHello World!\r\n\r\n```\r\n\r\n\r\n\r\n<br><br>\r\n\r\n\r\n\r\n### counter\r\n\r\n```python\r\n\r\nimport funcbygpt\r\n\r\n\r\n\r\n@funcbygpt.funcbygpt\r\n\r\ndef count():\r\n\r\n    return \"function that counts to 100\"\r\n\r\n\r\n\r\ncount()\r\n\r\n```\r\n\r\noutput:\r\n\r\n```\r\n\r\n0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100\r\n\r\n```\r\n\r\n\r\n\r\n<br><br>\r\n\r\n\r\n\r\n### bubble sort\r\n\r\n```python\r\n\r\nimport funcbygpt\r\n\r\n\r\n\r\n@funcbygpt.funcbygpt\r\n\r\ndef bubble_sort(array):\r\n\r\n    return f\"function that sorts array {array} with bubble sort\"\r\n\r\n\r\n\r\nbubble_sort([7, 4, 1, 8, 5, 2, 0, 9, 6, 3])\r\n\r\n```\r\n\r\noutput:\r\n\r\n```\r\n\r\n[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\r\n\r\n```\r\n\r\n\r\n\r\n<br><br>\r\n\r\n\r\n\r\n### remove char\r\n\r\n```python\r\n\r\nimport funcbygpt\r\n\r\n\r\n\r\n@funcbygpt.funcbygpt\r\n\r\ndef remove_char(string, c):\r\n\r\n    return f\"function that removes the {c} character from the {string} string and returns the result --return\"\r\n\r\n\r\n\r\nprint(remove_char(\"hello world\", \"l\"))\r\n\r\n```\r\n\r\noutput:\r\n\r\n```\r\n\r\nheo word\r\n\r\n```\r\n\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "tell the function what to do and gpt will write the code",
    "version": "0.0.2",
    "split_keywords": [
        "gpt",
        "openai",
        "wrapper"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1757fe4cb01c034e3972f381bdc30d1207ddeaaf6193981c03c6cc8e17379003",
                "md5": "abc14c867c11af3691f7b9e0762f2c4c",
                "sha256": "230b4696728a1f7da04f8275b5efe654a3c910ab11477534a11d03352acc2abd"
            },
            "downloads": -1,
            "filename": "funcbygpt-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "abc14c867c11af3691f7b9e0762f2c4c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 2686,
            "upload_time": "2023-03-16T18:11:17",
            "upload_time_iso_8601": "2023-03-16T18:11:17.364547Z",
            "url": "https://files.pythonhosted.org/packages/17/57/fe4cb01c034e3972f381bdc30d1207ddeaaf6193981c03c6cc8e17379003/funcbygpt-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ea1f44bea8933cd2f5f5b31a242d88a6cfd2e1f0d9cb3b63f12d8b1978230f69",
                "md5": "c5e425be6fa60b432aeacfe220d560d5",
                "sha256": "8d32d839a1165094245b9e8d25872d3b3893318db695f1e623af4998ce49577b"
            },
            "downloads": -1,
            "filename": "funcbygpt-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "c5e425be6fa60b432aeacfe220d560d5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 2501,
            "upload_time": "2023-03-16T18:11:19",
            "upload_time_iso_8601": "2023-03-16T18:11:19.198762Z",
            "url": "https://files.pythonhosted.org/packages/ea/1f/44bea8933cd2f5f5b31a242d88a6cfd2e1f0d9cb3b63f12d8b1978230f69/funcbygpt-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-16 18:11:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "emresvd",
    "github_project": "funcbygpt",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "aiohttp",
            "specs": [
                [
                    "==",
                    "3.8.4"
                ]
            ]
        },
        {
            "name": "aiosignal",
            "specs": [
                [
                    "==",
                    "1.3.1"
                ]
            ]
        },
        {
            "name": "async-timeout",
            "specs": [
                [
                    "==",
                    "4.0.2"
                ]
            ]
        },
        {
            "name": "asynctest",
            "specs": [
                [
                    "==",
                    "0.13.0"
                ]
            ]
        },
        {
            "name": "attrs",
            "specs": [
                [
                    "==",
                    "22.2.0"
                ]
            ]
        },
        {
            "name": "bleach",
            "specs": [
                [
                    "==",
                    "6.0.0"
                ]
            ]
        },
        {
            "name": "certifi",
            "specs": [
                [
                    "==",
                    "2022.12.7"
                ]
            ]
        },
        {
            "name": "charset-normalizer",
            "specs": [
                [
                    "==",
                    "3.1.0"
                ]
            ]
        },
        {
            "name": "colorama",
            "specs": [
                [
                    "==",
                    "0.4.6"
                ]
            ]
        },
        {
            "name": "docutils",
            "specs": [
                [
                    "==",
                    "0.19"
                ]
            ]
        },
        {
            "name": "frozenlist",
            "specs": [
                [
                    "==",
                    "1.3.3"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    "==",
                    "3.4"
                ]
            ]
        },
        {
            "name": "importlib-metadata",
            "specs": [
                [
                    "==",
                    "6.0.0"
                ]
            ]
        },
        {
            "name": "importlib-resources",
            "specs": [
                [
                    "==",
                    "5.12.0"
                ]
            ]
        },
        {
            "name": "jaraco.classes",
            "specs": [
                [
                    "==",
                    "3.2.3"
                ]
            ]
        },
        {
            "name": "keyring",
            "specs": [
                [
                    "==",
                    "23.13.1"
                ]
            ]
        },
        {
            "name": "markdown-it-py",
            "specs": [
                [
                    "==",
                    "2.2.0"
                ]
            ]
        },
        {
            "name": "mdurl",
            "specs": [
                [
                    "==",
                    "0.1.2"
                ]
            ]
        },
        {
            "name": "more-itertools",
            "specs": [
                [
                    "==",
                    "9.1.0"
                ]
            ]
        },
        {
            "name": "multidict",
            "specs": [
                [
                    "==",
                    "6.0.4"
                ]
            ]
        },
        {
            "name": "openai",
            "specs": [
                [
                    "==",
                    "0.27.2"
                ]
            ]
        },
        {
            "name": "pkginfo",
            "specs": [
                [
                    "==",
                    "1.9.6"
                ]
            ]
        },
        {
            "name": "Pygments",
            "specs": [
                [
                    "==",
                    "2.14.0"
                ]
            ]
        },
        {
            "name": "python-dotenv",
            "specs": [
                [
                    "==",
                    "0.21.1"
                ]
            ]
        },
        {
            "name": "pywin32-ctypes",
            "specs": [
                [
                    "==",
                    "0.2.0"
                ]
            ]
        },
        {
            "name": "readme-renderer",
            "specs": [
                [
                    "==",
                    "37.3"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.28.2"
                ]
            ]
        },
        {
            "name": "requests-toolbelt",
            "specs": [
                [
                    "==",
                    "0.10.1"
                ]
            ]
        },
        {
            "name": "rfc3986",
            "specs": [
                [
                    "==",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "rich",
            "specs": [
                [
                    "==",
                    "13.3.2"
                ]
            ]
        },
        {
            "name": "six",
            "specs": [
                [
                    "==",
                    "1.16.0"
                ]
            ]
        },
        {
            "name": "tqdm",
            "specs": [
                [
                    "==",
                    "4.65.0"
                ]
            ]
        },
        {
            "name": "twine",
            "specs": [
                [
                    "==",
                    "4.0.2"
                ]
            ]
        },
        {
            "name": "typing_extensions",
            "specs": [
                [
                    "==",
                    "4.5.0"
                ]
            ]
        },
        {
            "name": "urllib3",
            "specs": [
                [
                    "==",
                    "1.26.15"
                ]
            ]
        },
        {
            "name": "webencodings",
            "specs": [
                [
                    "==",
                    "0.5.1"
                ]
            ]
        },
        {
            "name": "yarl",
            "specs": [
                [
                    "==",
                    "1.8.2"
                ]
            ]
        },
        {
            "name": "zipp",
            "specs": [
                [
                    "==",
                    "3.15.0"
                ]
            ]
        }
    ],
    "lcname": "funcbygpt"
}
        
Elapsed time: 0.04517s