contextkit


Namecontextkit JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/AnswerDotAI/contextkit
SummaryReusable contexts for LLMs
upload_time2025-02-03 22:34:36
maintainerNone
docs_urlNone
authorIsaac Flath
requires_python>=3.11
licenseApache Software License 2.0
keywords nbdev jupyter notebook python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # contextkit


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

## Usage

### Installation

    pip install contextkit

### Using

To get context from an LLM, use one of the helper functions to pull it.

If a function pulls a single context snippit it will return the text, if
it return multiple it will return a dictionary.

``` python
import contextkit.read as rd
```

#### Read_X Functions

Each `read_x` function is designed to work with a single argument, which
is the location of the resource. This typically means a URL or a file
path.

``` python
rd.read_url('https://www.answer.ai/')[:200]
```

    'Answer.AI\n\n  * __\n  * __\n\n# Answer.AI - Practical AI R&D\n\n##### Categories\n\nAll (33)\n\nai (20)\n\ncoding (5)\n\ncompany (2)\n\ncourses (1)\n\neducation (1)\n\ninterview (1)\n\nopen-source (14)\n\npolicy (4)\n\nproduct'

Other arguments are always optional, but can be useful at times. For
example, the `heavy` argument in `read_url` allows you to do a heavy
scrape with a contactless browser using `playwrightnb`.

``` python
rd.read_url('https://www.answer.ai/',heavy=True)[:200]
```

    'Answer.AI\n\n  * __\n  * __\n\n# Answer.AI - Practical AI R&D\n\n##### Categories\n\nAll (33)\n\nai (20)\n\ncoding (5)\n\ncompany (2)\n\ncourses (1)\n\neducation (1)\n\ninterview (1)\n\nopen-source (14)\n\npolicy (4)\n\nproduct'

Many have been creates so far, such as

``` python
[o for o in dir(rd) if o.startswith('read_')]
```

    ['read_dir',
     'read_file',
     'read_gdoc',
     'read_gh_file',
     'read_gh_repo',
     'read_gist',
     'read_git_path',
     'read_google_sheet',
     'read_html',
     'read_pdf',
     'read_url',
     'read_yt_transcript']

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/AnswerDotAI/contextkit",
    "name": "contextkit",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "nbdev jupyter notebook python",
    "author": "Isaac Flath",
    "author_email": "isaac.flath@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/71/c1/31a627d8eee8dc9fe9fbd6b656ca1765507034592d6aa40c38fc000a7afc/contextkit-0.0.2.tar.gz",
    "platform": null,
    "description": "# contextkit\n\n\n<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->\n\n## Usage\n\n### Installation\n\n    pip install contextkit\n\n### Using\n\nTo get context from an LLM, use one of the helper functions to pull it.\n\nIf a function pulls a single context snippit it will return the text, if\nit return multiple it will return a dictionary.\n\n``` python\nimport contextkit.read as rd\n```\n\n#### Read_X Functions\n\nEach `read_x` function is designed to work with a single argument, which\nis the location of the resource. This typically means a URL or a file\npath.\n\n``` python\nrd.read_url('https://www.answer.ai/')[:200]\n```\n\n    'Answer.AI\\n\\n  * __\\n  * __\\n\\n# Answer.AI - Practical AI R&D\\n\\n##### Categories\\n\\nAll (33)\\n\\nai (20)\\n\\ncoding (5)\\n\\ncompany (2)\\n\\ncourses (1)\\n\\neducation (1)\\n\\ninterview (1)\\n\\nopen-source (14)\\n\\npolicy (4)\\n\\nproduct'\n\nOther arguments are always optional, but can be useful at times. For\nexample, the `heavy` argument in `read_url` allows you to do a heavy\nscrape with a contactless browser using `playwrightnb`.\n\n``` python\nrd.read_url('https://www.answer.ai/',heavy=True)[:200]\n```\n\n    'Answer.AI\\n\\n  * __\\n  * __\\n\\n# Answer.AI - Practical AI R&D\\n\\n##### Categories\\n\\nAll (33)\\n\\nai (20)\\n\\ncoding (5)\\n\\ncompany (2)\\n\\ncourses (1)\\n\\neducation (1)\\n\\ninterview (1)\\n\\nopen-source (14)\\n\\npolicy (4)\\n\\nproduct'\n\nMany have been creates so far, such as\n\n``` python\n[o for o in dir(rd) if o.startswith('read_')]\n```\n\n    ['read_dir',\n     'read_file',\n     'read_gdoc',\n     'read_gh_file',\n     'read_gh_repo',\n     'read_gist',\n     'read_git_path',\n     'read_google_sheet',\n     'read_html',\n     'read_pdf',\n     'read_url',\n     'read_yt_transcript']\n",
    "bugtrack_url": null,
    "license": "Apache Software License 2.0",
    "summary": "Reusable contexts for LLMs",
    "version": "0.0.2",
    "project_urls": {
        "Homepage": "https://github.com/AnswerDotAI/contextkit"
    },
    "split_keywords": [
        "nbdev",
        "jupyter",
        "notebook",
        "python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9ff97d181276b668c7b5c4af90acf23a52c9b28d638843ef080e24636261fa9f",
                "md5": "5aa72bd40c44732c2b0c2af5e329f022",
                "sha256": "50bf3389b8fe258d218a6614652737442efd060ca355dd9408ea86efcd59077d"
            },
            "downloads": -1,
            "filename": "contextkit-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5aa72bd40c44732c2b0c2af5e329f022",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 9220,
            "upload_time": "2025-02-03T22:34:34",
            "upload_time_iso_8601": "2025-02-03T22:34:34.678151Z",
            "url": "https://files.pythonhosted.org/packages/9f/f9/7d181276b668c7b5c4af90acf23a52c9b28d638843ef080e24636261fa9f/contextkit-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "71c131a627d8eee8dc9fe9fbd6b656ca1765507034592d6aa40c38fc000a7afc",
                "md5": "415787f6bb2afafd111f8268f951229b",
                "sha256": "df847aff0c537f448169906915a2b275c53522e79cf2382c75b36887d5e44894"
            },
            "downloads": -1,
            "filename": "contextkit-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "415787f6bb2afafd111f8268f951229b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 9915,
            "upload_time": "2025-02-03T22:34:36",
            "upload_time_iso_8601": "2025-02-03T22:34:36.346235Z",
            "url": "https://files.pythonhosted.org/packages/71/c1/31a627d8eee8dc9fe9fbd6b656ca1765507034592d6aa40c38fc000a7afc/contextkit-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-03 22:34:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "AnswerDotAI",
    "github_project": "contextkit",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "contextkit"
}
        
Elapsed time: 0.98799s