detect-llm-api-keys


Namedetect-llm-api-keys JSON
Version 0.0.3 PyPI version JSON
download
home_page
Summaryscan python files for llm api keys (designed for pre-commit)
upload_time2023-12-14 20:33:40
maintainer
docs_urlNone
authorJoshua Sundance Bailey
requires_python>=3.9
licenseMIT License Copyright (c) 2023 Joshua Sundance Bailey 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 llm api security lint pre-commit
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # detect_llm_api_keys

scan python files for llm api keys (designed for pre-commit)


[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![python](https://img.shields.io/badge/Python-3.9+-3776AB.svg?style=flat&logo=python&logoColor=white)](https://www.python.org)

[![Publish to PyPI](https://github.com/joshuasundance-swca/detect_llm_api_keys/actions/workflows/publish_on_pypi.yml/badge.svg)](https://github.com/joshuasundance-swca/detect_llm_api_keys/actions/workflows/publish_on_pypi.yml)
![GitHub tag (with filter)](https://img.shields.io/github/v/tag/joshuasundance-swca/detect_llm_api_keys)
[![Read the Docs](https://img.shields.io/readthedocs/detect_llm_api_keys)](https://detect-llm-api-keys.readthedocs.io/en/latest/)

![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/joshuasundance-swca/detect_llm_api_keys)
![Code Climate issues](https://img.shields.io/codeclimate/issues/joshuasundance-swca/detect_llm_api_keys)
![Code Climate technical debt](https://img.shields.io/codeclimate/tech-debt/joshuasundance-swca/detect_llm_api_keys)
[![coverage](coverage.svg)](./COVERAGE.md)

[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff)
[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

[![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)
![Known Vulnerabilities](https://snyk.io/test/github/joshuasundance-swca/detect_llm_api_keys/badge.svg)


🤖 This README was written by GPT-4. 🤖


## Introduction
`detect_llm_api_keys` is a vital tool for Python developers, especially those working with large language models (LLMs). It's a pre-commit hook that efficiently scans your Python files to detect and prevent the accidental committing of LLM API keys, enhancing the security of your projects.

## Features
- **Efficient API Key Detection**: Scans for keys from major providers like `Anthropic`, `Anyscale`, `Microsoft Azure`, `LangChain`, `OpenAI`, and `Mistral AI`.
- **Easy Integration**: Seamlessly integrates with your existing Python projects.
- **Support for Various API Key Patterns**: Recognizes a range of patterns, ensuring comprehensive protection.
- **Compatibility with nosec and noqa Comments**: Respects your code's existing security annotations.

## Getting Started
1. **Installation**: Add `detect_llm_api_keys` to your `.pre-commit-config.yaml` file.
2. **Configuration**: Customize the settings as per your project requirements.
3. **Usage**: Automatically scans files upon each commit, flagging potential API key exposures.

## Usage
To use `detect_llm_api_keys` in your project, update your `.pre-commit-config.yaml` as follows:

```.pre-commit-config.yaml
repos:
-   repo: https://github.com/joshuasundance-swca/detect_llm_api_keys
    rev: "0.0.3"
    hooks:
    -   id: detect-llm-api-keys
```

## Collaboration and Contributions
Feedback, suggestions, and contributions are highly welcomed to enhance `detect_llm_api_keys`. Please feel free to open issues or submit pull requests on GitHub.

## License
Distributed under the MIT License. See `LICENSE` for more information.

## Acknowledgements
Special thanks to the Python and Open Source communities for their invaluable support and contributions.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "detect-llm-api-keys",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "llm,api,security,lint,pre-commit",
    "author": "Joshua Sundance Bailey",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/5d/49/1baab6c020ce4788a166c9bb918f5e1ce4815212cdf2bac38fb42a3ea582/detect_llm_api_keys-0.0.3.tar.gz",
    "platform": null,
    "description": "# detect_llm_api_keys\n\nscan python files for llm api keys (designed for pre-commit)\n\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![python](https://img.shields.io/badge/Python-3.9+-3776AB.svg?style=flat&logo=python&logoColor=white)](https://www.python.org)\n\n[![Publish to PyPI](https://github.com/joshuasundance-swca/detect_llm_api_keys/actions/workflows/publish_on_pypi.yml/badge.svg)](https://github.com/joshuasundance-swca/detect_llm_api_keys/actions/workflows/publish_on_pypi.yml)\n![GitHub tag (with filter)](https://img.shields.io/github/v/tag/joshuasundance-swca/detect_llm_api_keys)\n[![Read the Docs](https://img.shields.io/readthedocs/detect_llm_api_keys)](https://detect-llm-api-keys.readthedocs.io/en/latest/)\n\n![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/joshuasundance-swca/detect_llm_api_keys)\n![Code Climate issues](https://img.shields.io/codeclimate/issues/joshuasundance-swca/detect_llm_api_keys)\n![Code Climate technical debt](https://img.shields.io/codeclimate/tech-debt/joshuasundance-swca/detect_llm_api_keys)\n[![coverage](coverage.svg)](./COVERAGE.md)\n\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff)\n[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\n[![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)\n![Known Vulnerabilities](https://snyk.io/test/github/joshuasundance-swca/detect_llm_api_keys/badge.svg)\n\n\n\ud83e\udd16 This README was written by GPT-4. \ud83e\udd16\n\n\n## Introduction\n`detect_llm_api_keys` is a vital tool for Python developers, especially those working with large language models (LLMs). It's a pre-commit hook that efficiently scans your Python files to detect and prevent the accidental committing of LLM API keys, enhancing the security of your projects.\n\n## Features\n- **Efficient API Key Detection**: Scans for keys from major providers like `Anthropic`, `Anyscale`, `Microsoft Azure`, `LangChain`, `OpenAI`, and `Mistral AI`.\n- **Easy Integration**: Seamlessly integrates with your existing Python projects.\n- **Support for Various API Key Patterns**: Recognizes a range of patterns, ensuring comprehensive protection.\n- **Compatibility with nosec and noqa Comments**: Respects your code's existing security annotations.\n\n## Getting Started\n1. **Installation**: Add `detect_llm_api_keys` to your `.pre-commit-config.yaml` file.\n2. **Configuration**: Customize the settings as per your project requirements.\n3. **Usage**: Automatically scans files upon each commit, flagging potential API key exposures.\n\n## Usage\nTo use `detect_llm_api_keys` in your project, update your `.pre-commit-config.yaml` as follows:\n\n```.pre-commit-config.yaml\nrepos:\n-   repo: https://github.com/joshuasundance-swca/detect_llm_api_keys\n    rev: \"0.0.3\"\n    hooks:\n    -   id: detect-llm-api-keys\n```\n\n## Collaboration and Contributions\nFeedback, suggestions, and contributions are highly welcomed to enhance `detect_llm_api_keys`. Please feel free to open issues or submit pull requests on GitHub.\n\n## License\nDistributed under the MIT License. See `LICENSE` for more information.\n\n## Acknowledgements\nSpecial thanks to the Python and Open Source communities for their invaluable support and contributions.\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Joshua Sundance Bailey  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. ",
    "summary": "scan python files for llm api keys (designed for pre-commit)",
    "version": "0.0.3",
    "project_urls": {
        "Homepage": "https://github.com/joshuasundance-swca/detect_llm_api_keys"
    },
    "split_keywords": [
        "llm",
        "api",
        "security",
        "lint",
        "pre-commit"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "69423d6d0ac2060ec4f96b3ea0bf33347f4a1a030aa3581def6f91f313534ee3",
                "md5": "e2b0084f3670c0f6dae5566537c1ccf9",
                "sha256": "ec7224f28ee441954fb7e8da4088754957011428a44a516f827c43f5fc7640bf"
            },
            "downloads": -1,
            "filename": "detect_llm_api_keys-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e2b0084f3670c0f6dae5566537c1ccf9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 6792,
            "upload_time": "2023-12-14T20:33:38",
            "upload_time_iso_8601": "2023-12-14T20:33:38.748533Z",
            "url": "https://files.pythonhosted.org/packages/69/42/3d6d0ac2060ec4f96b3ea0bf33347f4a1a030aa3581def6f91f313534ee3/detect_llm_api_keys-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5d491baab6c020ce4788a166c9bb918f5e1ce4815212cdf2bac38fb42a3ea582",
                "md5": "bbdb2015b0ef3d3d1aaba13e3eeafb3a",
                "sha256": "b6539817f2b84ee7d0817cdbd280e09a53bdb27f0766e41c58079ad579986188"
            },
            "downloads": -1,
            "filename": "detect_llm_api_keys-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "bbdb2015b0ef3d3d1aaba13e3eeafb3a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 6094,
            "upload_time": "2023-12-14T20:33:40",
            "upload_time_iso_8601": "2023-12-14T20:33:40.037763Z",
            "url": "https://files.pythonhosted.org/packages/5d/49/1baab6c020ce4788a166c9bb918f5e1ce4815212cdf2bac38fb42a3ea582/detect_llm_api_keys-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-14 20:33:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "joshuasundance-swca",
    "github_project": "detect_llm_api_keys",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "detect-llm-api-keys"
}
        
Elapsed time: 0.13815s