mirascope


Namemirascope JSON
Version 1.13.0 PyPI version JSON
download
home_pageNone
SummaryLLM abstractions that aren't obstructions
upload_time2024-12-14 00:51:18
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/b0/46/a5cd4a2743787faba4564a2128e78c1902e58bb20381953741d1d40d66bb/mirascope-1.13.0.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.13.0",
    "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": null,
            "digests": {
                "blake2b_256": "81a7417fde2885fea6e5015e4527420f76720cd84cfe3c127b045a5246189433",
                "md5": "33211546e24e35b21a77be0137fba8e2",
                "sha256": "ddfb5728c5656b0a6c1c9b3d544c41668fc919f29a52be699045ca68236f3437"
            },
            "downloads": -1,
            "filename": "mirascope-1.13.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "33211546e24e35b21a77be0137fba8e2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 273288,
            "upload_time": "2024-12-14T00:51:11",
            "upload_time_iso_8601": "2024-12-14T00:51:11.660851Z",
            "url": "https://files.pythonhosted.org/packages/81/a7/417fde2885fea6e5015e4527420f76720cd84cfe3c127b045a5246189433/mirascope-1.13.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b046a5cd4a2743787faba4564a2128e78c1902e58bb20381953741d1d40d66bb",
                "md5": "d5669574798c77da7b2257f42b5fdf96",
                "sha256": "91f5d1eadea8fadd07c81230560f5714519b81e87e04233955990d5b7ac7a46d"
            },
            "downloads": -1,
            "filename": "mirascope-1.13.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d5669574798c77da7b2257f42b5fdf96",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 65686641,
            "upload_time": "2024-12-14T00:51:18",
            "upload_time_iso_8601": "2024-12-14T00:51:18.195682Z",
            "url": "https://files.pythonhosted.org/packages/b0/46/a5cd4a2743787faba4564a2128e78c1902e58bb20381953741d1d40d66bb/mirascope-1.13.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-14 00:51:18",
    "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: 0.42599s