mirascope


Namemirascope JSON
Version 1.9.2 PyPI version JSON
download
home_pageNone
SummaryLLM abstractions that aren't obstructions
upload_time2024-11-15 15:51:28
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT License Copyright (c) 2023 Mirascope, Inc. 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 agents anthropic artificial intelligence bedrock cohere developer tools gemini groq llm llm tools mistral openai prompt engineering pydantic vertex
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center" justiry="start">
    <a href="https://mirascope.com">
        <img align="bottom" src="https://github.com/Mirascope/mirascope/assets/99370834/e403d7ee-f8bc-4df1-b2d0-33763f021c89" alt="Frog Logo" width="84"/><br><img align="bottom" src="https://uploads-ssl.webflow.com/65a6fd6a1c3b2704d6217d3d/65b5674e9ceef563dc57eb11_Medium%20length%20hero%20headline%20goes%20here.svg" width="400" alt="Mirascope"/>
    </a>
</div>

<p align="center">
    <a href="https://github.com/Mirascope/mirascope/actions/workflows/tests.yml" target="_blank"><img src="https://github.com/Mirascope/mirascope/actions/workflows/tests.yml/badge.svg?branch=main" alt="Tests"/></a>
    <a href="https://codecov.io/github/Mirascope/mirascope" target="_blank"><img src="https://codecov.io/github/Mirascope/mirascope/graph/badge.svg?token=HAEAWT3KC9" alt="Coverage"/></a>
    <a href="https://mirascope.com/WELCOME" target="_blank"><img src="https://img.shields.io/badge/docs-available-brightgreen" alt="Docs"/></a>
    <a href="https://pypi.python.org/pypi/mirascope" target="_blank"><img src="https://img.shields.io/pypi/v/mirascope.svg" alt="PyPI Version"/></a>
    <a href="https://pypi.python.org/pypi/mirascope" target="_blank"><img src="https://img.shields.io/pypi/pyversions/mirascope.svg" alt="Stars"/></a>
    <a href="https://github.com/Mirascope/mirascope/blog/dev/LICENSE"><img src="https://img.shields.io/github/license/Mirascope/mirascope.svg" alt="License"/></a>
    <a href="https://github.com/Mirascope/mirascope/stargazers" target="_blank"><img src="https://img.shields.io/github/stars/Mirascope/mirascope.svg" alt="Stars"/></a>
</p>

---

Mirascope is a powerful, flexible, and user-friendly library that simplifies the process of working with LLMs through a unified interface that works across various supported providers, including [OpenAI](https://openai.com/), [Anthropic](https://www.anthropic.com/), [Mistral](https://mistral.ai/), [Gemini](https://gemini.google.com), [Groq](https://groq.com/), [Cohere](https://cohere.com/), [LiteLLM](https://www.litellm.ai/), [Azure AI](https://azure.microsoft.com/en-us/solutions/ai), [Vertex AI](https://cloud.google.com/vertex-ai), and [Bedrock](https://aws.amazon.com/bedrock/).

Whether you're generating text, extracting structured information, or developing complex AI-driven agent systems, Mirascope provides the tools you need to streamline your development process and create powerful, robust applications.

## 30 Second Quickstart

Install Mirascope, specifying the provider(s) you intend to use, and set your API key:

```bash
pip install "mirascope[openai]"
export OPENAI_API_KEY=XXXXX
```

Make your first call to an LLM to extract the title and author of a book from unstructured text:

```python
from mirascope.core import openai
from pydantic import BaseModel

class Book(BaseModel):
    title: str
    author: str

@openai.call("gpt-4o-mini", response_model=Book)
def extract_book(text: str) -> str:
    return f"Extract {text}"

book = extract_book("The Name of the Wind by Patrick Rothfuss")
assert isinstance(book, Book)
print(book)
# Output: title='The Name of the Wind' author='Patrick Rothfuss'
```

## Tutorials

Check out our [quickstart tutorial](https://mirascope.com/tutorials/getting_started/quickstart) and many other tutorials for an interactive way to getting started with Mirascope.

## Usage

For a complete guide on how to use all of the various features Mirascope has to offer, read through our [Learn](https://mirascope.com/learn) documentation.

## Versioning

Mirascope usesĀ [Semantic Versioning](https://semver.org/).

## Licence

This project is licensed under the terms of theĀ [MIT License](https://github.com/Mirascope/mirascope/blob/dev/LICENSE).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mirascope",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "William Bakst <william@mirascope.com>",
    "keywords": "agents, anthropic, artificial intelligence, bedrock, cohere, developer tools, gemini, groq, llm, llm tools, mistral, openai, prompt engineering, pydantic, vertex",
    "author": null,
    "author_email": "William Bakst <william@mirascope.com>, Brendan Kao <brendan@mirascope.com>",
    "download_url": "https://files.pythonhosted.org/packages/64/09/3c482ce3c5cf2815df4ec6fdd75f30a48eb583f9d64b45bdc4fea1362359/mirascope-1.9.2.tar.gz",
    "platform": null,
    "description": "<div align=\"center\" justiry=\"start\">\n    <a href=\"https://mirascope.com\">\n        <img align=\"bottom\" src=\"https://github.com/Mirascope/mirascope/assets/99370834/e403d7ee-f8bc-4df1-b2d0-33763f021c89\" alt=\"Frog Logo\" width=\"84\"/><br><img align=\"bottom\" src=\"https://uploads-ssl.webflow.com/65a6fd6a1c3b2704d6217d3d/65b5674e9ceef563dc57eb11_Medium%20length%20hero%20headline%20goes%20here.svg\" width=\"400\" alt=\"Mirascope\"/>\n    </a>\n</div>\n\n<p align=\"center\">\n    <a href=\"https://github.com/Mirascope/mirascope/actions/workflows/tests.yml\" target=\"_blank\"><img src=\"https://github.com/Mirascope/mirascope/actions/workflows/tests.yml/badge.svg?branch=main\" alt=\"Tests\"/></a>\n    <a href=\"https://codecov.io/github/Mirascope/mirascope\" target=\"_blank\"><img src=\"https://codecov.io/github/Mirascope/mirascope/graph/badge.svg?token=HAEAWT3KC9\" alt=\"Coverage\"/></a>\n    <a href=\"https://mirascope.com/WELCOME\" target=\"_blank\"><img src=\"https://img.shields.io/badge/docs-available-brightgreen\" alt=\"Docs\"/></a>\n    <a href=\"https://pypi.python.org/pypi/mirascope\" target=\"_blank\"><img src=\"https://img.shields.io/pypi/v/mirascope.svg\" alt=\"PyPI Version\"/></a>\n    <a href=\"https://pypi.python.org/pypi/mirascope\" target=\"_blank\"><img src=\"https://img.shields.io/pypi/pyversions/mirascope.svg\" alt=\"Stars\"/></a>\n    <a href=\"https://github.com/Mirascope/mirascope/blog/dev/LICENSE\"><img src=\"https://img.shields.io/github/license/Mirascope/mirascope.svg\" alt=\"License\"/></a>\n    <a href=\"https://github.com/Mirascope/mirascope/stargazers\" target=\"_blank\"><img src=\"https://img.shields.io/github/stars/Mirascope/mirascope.svg\" alt=\"Stars\"/></a>\n</p>\n\n---\n\nMirascope is a powerful, flexible, and user-friendly library that simplifies the process of working with LLMs through a unified interface that works across various supported providers, including [OpenAI](https://openai.com/), [Anthropic](https://www.anthropic.com/), [Mistral](https://mistral.ai/), [Gemini](https://gemini.google.com), [Groq](https://groq.com/), [Cohere](https://cohere.com/), [LiteLLM](https://www.litellm.ai/), [Azure AI](https://azure.microsoft.com/en-us/solutions/ai), [Vertex AI](https://cloud.google.com/vertex-ai), and [Bedrock](https://aws.amazon.com/bedrock/).\n\nWhether you're generating text, extracting structured information, or developing complex AI-driven agent systems, Mirascope provides the tools you need to streamline your development process and create powerful, robust applications.\n\n## 30 Second Quickstart\n\nInstall Mirascope, specifying the provider(s) you intend to use, and set your API key:\n\n```bash\npip install \"mirascope[openai]\"\nexport OPENAI_API_KEY=XXXXX\n```\n\nMake your first call to an LLM to extract the title and author of a book from unstructured text:\n\n```python\nfrom mirascope.core import openai\nfrom pydantic import BaseModel\n\nclass Book(BaseModel):\n    title: str\n    author: str\n\n@openai.call(\"gpt-4o-mini\", response_model=Book)\ndef extract_book(text: str) -> str:\n    return f\"Extract {text}\"\n\nbook = extract_book(\"The Name of the Wind by Patrick Rothfuss\")\nassert isinstance(book, Book)\nprint(book)\n# Output: title='The Name of the Wind' author='Patrick Rothfuss'\n```\n\n## Tutorials\n\nCheck out our [quickstart tutorial](https://mirascope.com/tutorials/getting_started/quickstart) and many other tutorials for an interactive way to getting started with Mirascope.\n\n## Usage\n\nFor a complete guide on how to use all of the various features Mirascope has to offer, read through our [Learn](https://mirascope.com/learn) documentation.\n\n## Versioning\n\nMirascope uses\u00a0[Semantic Versioning](https://semver.org/).\n\n## Licence\n\nThis project is licensed under the terms of the\u00a0[MIT License](https://github.com/Mirascope/mirascope/blob/dev/LICENSE).\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Mirascope, Inc.  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": "LLM abstractions that aren't obstructions",
    "version": "1.9.2",
    "project_urls": {
        "Changelog": "https://github.com/Mirascope/mirascope/releases",
        "Documentation": "https://mirascope.com/WELCOME",
        "Homepage": "https://mirascope.com",
        "Issues": "https://github.com/Mirascope/mirascope/issues",
        "Repository": "https://github.com/Mirascope/mirascope"
    },
    "split_keywords": [
        "agents",
        " anthropic",
        " artificial intelligence",
        " bedrock",
        " cohere",
        " developer tools",
        " gemini",
        " groq",
        " llm",
        " llm tools",
        " mistral",
        " openai",
        " prompt engineering",
        " pydantic",
        " vertex"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a0a25eda89bdf102015775728f2f0f30c3b09689a5666be9c7bb53e7c916981d",
                "md5": "dbd0bb6ed40d2168676d486e372f9949",
                "sha256": "cd758ee73136583fc847eb94b4b58289d040af102877311d91f24fe403d062f9"
            },
            "downloads": -1,
            "filename": "mirascope-1.9.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dbd0bb6ed40d2168676d486e372f9949",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 262297,
            "upload_time": "2024-11-15T15:51:26",
            "upload_time_iso_8601": "2024-11-15T15:51:26.153390Z",
            "url": "https://files.pythonhosted.org/packages/a0/a2/5eda89bdf102015775728f2f0f30c3b09689a5666be9c7bb53e7c916981d/mirascope-1.9.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "64093c482ce3c5cf2815df4ec6fdd75f30a48eb583f9d64b45bdc4fea1362359",
                "md5": "faac992d6e348cae6976b03c802f81ce",
                "sha256": "8fff1ea662427c413a0af751cd9a86909464bef1c95f41375ea07a6ed601e681"
            },
            "downloads": -1,
            "filename": "mirascope-1.9.2.tar.gz",
            "has_sig": false,
            "md5_digest": "faac992d6e348cae6976b03c802f81ce",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 60308905,
            "upload_time": "2024-11-15T15:51:28",
            "upload_time_iso_8601": "2024-11-15T15:51:28.162373Z",
            "url": "https://files.pythonhosted.org/packages/64/09/3c482ce3c5cf2815df4ec6fdd75f30a48eb583f9d64b45bdc4fea1362359/mirascope-1.9.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-15 15:51:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Mirascope",
    "github_project": "mirascope",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "mirascope"
}
        
Elapsed time: 1.87861s