gen-wrapper


Namegen-wrapper JSON
Version 0.1.1 PyPI version JSON
download
home_pageNone
SummaryA lightweight wrapper for multiple LLM providers with optional LangChain integrations.
upload_time2025-08-19 10:48:52
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseNone
keywords anthropic google langchain llm openai wrapper
VCS
bugtrack_url
requirements pydantic pydantic-settings requests python-dotenv tenacity openai anthropic google-generativeai langchain langchain-openai langchain-anthropic langchain-google-genai pytest pytest-asyncio pytest-mock black isort flake8 mypy prometheus-client aiohttp httpx
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # gen-wrapper

[![PyPI](https://img.shields.io/pypi/v/gen-wrapper.svg)](https://pypi.org/project/gen-wrapper/)
[![Python](https://img.shields.io/pypi/pyversions/gen-wrapper.svg)](https://pypi.org/project/gen-wrapper/)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)

A unified interface for multiple LLM providers (OpenAI, Anthropic, Groq, DeepSeek, Fireworks, Gemini, local).

## Installation

```bash
pip install gen-wrapper
# or with extras
pip install "gen-wrapper[llm-providers,langchain,async]"
```

## Environment

Set needed API keys, e.g. (PowerShell):

```powershell
$env:OPENAI_API_KEY="your_openai_key"
$env:ANTHROPIC_API_KEY="your_anthropic_key"
$env:GROQ_API_KEY="your_groq_key"
$env:DEEPSEEK_API_KEY="your_deepseek_key"
$env:FIREWORKS_API_KEY="your_fireworks_key"
$env:GOOGLE_API_KEY="your_google_key"

# Azure OpenAI (optional)
$env:AZURE_OPENAI_API_KEY="..."
$env:AZURE_OPENAI_ENDPOINT="..."
$env:AZURE_OPENAI_DEPLOYMENT="..."
$env:AZURE_OPENAI_API_VERSION="..."
```

## Quickstart (Python)

```python
from gen_wrapper import LLMWrapper

wrapper = LLMWrapper(provider="openai", model="gpt-4o")
print(wrapper.simple_chat("Hello!"))
```

## CLI

```bash
llm-cli --list-providers
llm-cli --list-models openai
llm-cli --provider openai --prompt "Hello world"
```

## Extras

- llm-providers: OpenAI, Anthropic, Google Generative AI SDKs
- langchain: LangChain core + provider adapters
- async: aiohttp, httpx
- monitoring: prometheus-client

## Links

- Source, docs, and issues: https://github.com/lakshya811/gen_wrapper
- PyPI: https://pypi.org/project/gen-wrapper/

## License

MIT

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "gen-wrapper",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "anthropic, google, langchain, llm, openai, wrapper",
    "author": null,
    "author_email": "Your Name <you@example.com>",
    "download_url": "https://files.pythonhosted.org/packages/94/11/c6aca18c4284bdd1f5e1a14763e8166b352ba1c3a17ec80e777268b9ef21/gen_wrapper-0.1.1.tar.gz",
    "platform": null,
    "description": "# gen-wrapper\n\n[![PyPI](https://img.shields.io/pypi/v/gen-wrapper.svg)](https://pypi.org/project/gen-wrapper/)\n[![Python](https://img.shields.io/pypi/pyversions/gen-wrapper.svg)](https://pypi.org/project/gen-wrapper/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n\nA unified interface for multiple LLM providers (OpenAI, Anthropic, Groq, DeepSeek, Fireworks, Gemini, local).\n\n## Installation\n\n```bash\npip install gen-wrapper\n# or with extras\npip install \"gen-wrapper[llm-providers,langchain,async]\"\n```\n\n## Environment\n\nSet needed API keys, e.g. (PowerShell):\n\n```powershell\n$env:OPENAI_API_KEY=\"your_openai_key\"\n$env:ANTHROPIC_API_KEY=\"your_anthropic_key\"\n$env:GROQ_API_KEY=\"your_groq_key\"\n$env:DEEPSEEK_API_KEY=\"your_deepseek_key\"\n$env:FIREWORKS_API_KEY=\"your_fireworks_key\"\n$env:GOOGLE_API_KEY=\"your_google_key\"\n\n# Azure OpenAI (optional)\n$env:AZURE_OPENAI_API_KEY=\"...\"\n$env:AZURE_OPENAI_ENDPOINT=\"...\"\n$env:AZURE_OPENAI_DEPLOYMENT=\"...\"\n$env:AZURE_OPENAI_API_VERSION=\"...\"\n```\n\n## Quickstart (Python)\n\n```python\nfrom gen_wrapper import LLMWrapper\n\nwrapper = LLMWrapper(provider=\"openai\", model=\"gpt-4o\")\nprint(wrapper.simple_chat(\"Hello!\"))\n```\n\n## CLI\n\n```bash\nllm-cli --list-providers\nllm-cli --list-models openai\nllm-cli --provider openai --prompt \"Hello world\"\n```\n\n## Extras\n\n- llm-providers: OpenAI, Anthropic, Google Generative AI SDKs\n- langchain: LangChain core + provider adapters\n- async: aiohttp, httpx\n- monitoring: prometheus-client\n\n## Links\n\n- Source, docs, and issues: https://github.com/lakshya811/gen_wrapper\n- PyPI: https://pypi.org/project/gen-wrapper/\n\n## License\n\nMIT\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A lightweight wrapper for multiple LLM providers with optional LangChain integrations.",
    "version": "0.1.1",
    "project_urls": {
        "Documentation": "https://github.com/lakshya811/gen_wrapper#readme",
        "Homepage": "https://github.com/lakshya811/gen_wrapper",
        "Issues": "https://github.com/lakshya811/gen_wrapper/issues",
        "Source": "https://github.com/lakshya811/gen_wrapper"
    },
    "split_keywords": [
        "anthropic",
        " google",
        " langchain",
        " llm",
        " openai",
        " wrapper"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2c0add9b888d1758e3316e105b36b36e3bc3d9b3e553bd9d440c4ca71eb1fcfe",
                "md5": "a5d5a65d8c21496e176dfd6f843c8a81",
                "sha256": "773a8209658a47275a30ae227f946034b05e471bee5a65fabe51b2ce2ce7af10"
            },
            "downloads": -1,
            "filename": "gen_wrapper-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a5d5a65d8c21496e176dfd6f843c8a81",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 21081,
            "upload_time": "2025-08-19T10:48:51",
            "upload_time_iso_8601": "2025-08-19T10:48:51.188281Z",
            "url": "https://files.pythonhosted.org/packages/2c/0a/dd9b888d1758e3316e105b36b36e3bc3d9b3e553bd9d440c4ca71eb1fcfe/gen_wrapper-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9411c6aca18c4284bdd1f5e1a14763e8166b352ba1c3a17ec80e777268b9ef21",
                "md5": "194887b28ac32435451af84c967e585c",
                "sha256": "1a3cb276573dd69213c10604e0dfeb1498d67923623dcc937f1712dffca975a8"
            },
            "downloads": -1,
            "filename": "gen_wrapper-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "194887b28ac32435451af84c967e585c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 12652,
            "upload_time": "2025-08-19T10:48:52",
            "upload_time_iso_8601": "2025-08-19T10:48:52.355057Z",
            "url": "https://files.pythonhosted.org/packages/94/11/c6aca18c4284bdd1f5e1a14763e8166b352ba1c3a17ec80e777268b9ef21/gen_wrapper-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-19 10:48:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lakshya811",
    "github_project": "gen_wrapper#readme",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "pydantic",
            "specs": [
                [
                    ">=",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "pydantic-settings",
            "specs": [
                [
                    ">=",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    ">=",
                    "2.25.0"
                ]
            ]
        },
        {
            "name": "python-dotenv",
            "specs": [
                [
                    ">=",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "tenacity",
            "specs": [
                [
                    ">=",
                    "8.2.0"
                ]
            ]
        },
        {
            "name": "openai",
            "specs": [
                [
                    ">=",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "anthropic",
            "specs": [
                [
                    ">=",
                    "0.25.0"
                ]
            ]
        },
        {
            "name": "google-generativeai",
            "specs": [
                [
                    ">=",
                    "0.3.0"
                ]
            ]
        },
        {
            "name": "langchain",
            "specs": [
                [
                    ">=",
                    "0.2.0"
                ]
            ]
        },
        {
            "name": "langchain-openai",
            "specs": [
                [
                    ">=",
                    "0.1.0"
                ]
            ]
        },
        {
            "name": "langchain-anthropic",
            "specs": [
                [
                    ">=",
                    "0.1.0"
                ]
            ]
        },
        {
            "name": "langchain-google-genai",
            "specs": [
                [
                    ">=",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    ">=",
                    "7.0.0"
                ]
            ]
        },
        {
            "name": "pytest-asyncio",
            "specs": [
                [
                    ">=",
                    "0.21.0"
                ]
            ]
        },
        {
            "name": "pytest-mock",
            "specs": [
                [
                    ">=",
                    "3.10.0"
                ]
            ]
        },
        {
            "name": "black",
            "specs": [
                [
                    ">=",
                    "23.0.0"
                ]
            ]
        },
        {
            "name": "isort",
            "specs": [
                [
                    ">=",
                    "5.12.0"
                ]
            ]
        },
        {
            "name": "flake8",
            "specs": [
                [
                    ">=",
                    "6.0.0"
                ]
            ]
        },
        {
            "name": "mypy",
            "specs": [
                [
                    ">=",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "prometheus-client",
            "specs": [
                [
                    ">=",
                    "0.16.0"
                ]
            ]
        },
        {
            "name": "aiohttp",
            "specs": [
                [
                    ">=",
                    "3.8.0"
                ]
            ]
        },
        {
            "name": "httpx",
            "specs": [
                [
                    ">=",
                    "0.24.0"
                ]
            ]
        }
    ],
    "lcname": "gen-wrapper"
}
        
Elapsed time: 1.28006s