Metadata-Version: 2.4
Name: python-lilypad
Version: 0.0.29
Summary: An open-source prompt engineering framework.
Project-URL: Homepage, https://lilypad.so
Project-URL: Documentation, https://lilypad.so/docs
Project-URL: Repository, https://github.com/Mirascope/lilypad
Project-URL: Issues, https://github.com/Mirascope/lilypad/issues
Project-URL: Changelog, https://github.com/Mirascope/lilypad/releases
Author-email: William Bakst <william@mirascope.io>, Brendan Kao <brendan@mirascope.io>
Maintainer-email: William Bakst <william@mirascope.io>
License: Copyright (c) 2024-2025 Mirascope
        
        This software is licensed as follows:
        
        - The contents and code of any `ee` directory or sub-directory of this repository are licensed under the license defined in `ee/LICENSE`.
        - All third party components incorporated into the Lilypad Software are licensed under the original license provided by the owner of the applicable component.
        - The contents and code outside of the above mentioned directories or restrictions above are available under the "MIT" license as defined below.
        
        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.
License-File: LICENSE
Keywords: artificial intelligence,developer tools,evaluation,llm,llm tools,prompt engineering
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: OpenTelemetry
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Requires-Dist: alembic-postgresql-enum>=1.6.0
Requires-Dist: alembic>=1.14.0
Requires-Dist: cachetools>=5.5.1
Requires-Dist: cryptography>=43.0.3
Requires-Dist: fastapi[standard]>=0.114.0
Requires-Dist: itsdangerous>=2.2.0
Requires-Dist: libcst>=1.6.0
Requires-Dist: mirascope>=1.20.1
Requires-Dist: opentelemetry-api>=1.30.0
Requires-Dist: opentelemetry-instrumentation>=0.51b0
Requires-Dist: opentelemetry-sdk>=1.30.0
Requires-Dist: pillow>=10.4.0
Requires-Dist: posthog>=3.8.3
Requires-Dist: psycopg2-binary>=2.9.9
Requires-Dist: pydantic-settings>=2.6.1
Requires-Dist: python-jose[cryptography]>=3.3.0
Requires-Dist: requests>=2.32.3
Requires-Dist: resend>=2.6.0
Requires-Dist: ruff>=0.9.5
Requires-Dist: sqlmodel>=0.0.22
Requires-Dist: typer>=0.12.5
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.36.0; extra == 'anthropic'
Provides-Extra: bedrock
Requires-Dist: aioboto3>=13.2.0; extra == 'bedrock'
Requires-Dist: boto3-stubs[bedrock-runtime]>=1.35.82; extra == 'bedrock'
Requires-Dist: boto3>=1.35.36; extra == 'bedrock'
Requires-Dist: types-aioboto3[bedrock-runtime]>=13.2.0.post3; extra == 'bedrock'
Provides-Extra: gemini
Requires-Dist: google-generativeai<1,>=0.4.0; extra == 'gemini'
Requires-Dist: pillow<11,>=10.4.0; extra == 'gemini'
Provides-Extra: google
Requires-Dist: google-genai<2,>=1.3.0; extra == 'google'
Requires-Dist: pillow<11,>=10.4.0; extra == 'google'
Provides-Extra: mistral
Requires-Dist: mistralai<2,>=1.0.0; extra == 'mistral'
Provides-Extra: openai
Requires-Dist: openai>=1.57.0; extra == 'openai'
Provides-Extra: outlines
Requires-Dist: outlines>=0.1.11; extra == 'outlines'
Provides-Extra: vertex
Requires-Dist: google-cloud-aiplatform>=1.74.0; extra == 'vertex'
Description-Content-Type: text/markdown

# Lilypad

An open-source LLM engineering platform built on these principles:

- Building with LLMs introduces non-determinisim to your code, which requires...
- Tracking all input/output pairs and the exact version of the code that produced them so you can...
- Continuously evaluate and optimize your code, which requires...
- Involving business users and domain experts.

> [!IMPORTANT]
> __Lilypad is still in beta__
>
> This means that things like the user interface, database schemas, etc. are still subject to change. We do not yet recommend fully relying on this project in production, but we've found it works quite well in its current stage.
>
> If you're interested in participating in the closed beta of Lilypad Pro, [join our community](https://join.slack.com/t/mirascope-community/shared_invite/zt-2ilqhvmki-FB6LWluInUCkkjYD3oSjNA) and DM William Bakst :)
>
> We also welcome contributions with open arms! If you're interested in [contributing](https://github.com/Mirascope/lilypad/tree/main/CONTRIBUTING.md), just do it! We're here to help.

## Quickstart

To get started with Lilypad:

1. Create an account at <https://app.lilypad.so>. You can also [run Lilypad locally](https://lilypad.so/self-hosting) if you'd prefer.
2. Navigate to [your organization settings](https://app.lilypad.so/settings/org)
3. Create a project, and then create an API key for that project.
    a. Save your `LILYPAD_PROJECT_ID` and `LILYPAD_API_KEY` (e.g. in a `.env` file).
4. Install Lilypad: `uv add "python-lilypad[openai]"  # specify your provider of choice`
5. Run your first generation:

```python
import os

import lilypad
from openai import OpenAI  # use your provider of choice

os.environ["LILYPAD_PROJECT_ID"] = "..."
os.environ["LILYPAD_API_KEY"] = "..."
os.environ["OPENAI_API_KEY"] = "..."

lilypad.configure()    # Automatically trace LLM API calls
client = OpenAI()


@lilypad.generation()  # Automatically version non-deterministic functions
def answer_question(question: str) -> str | None:
    completion = client.chat.completions.create(
        model="gpt-4o",
        messages=[
            {"role": "system", "content": "You are a helpful assistant."},
            {"role": "user", "content": f"Answer this question: {question}"},
        ],
    )
    return completion.choices[0].message.content


answer = answer_question("What is the capital of France?")
print(answer)
# > The capital of France is Paris.
```

And that's it! Now you've versioned and traced your first non-deterministic function with Lilypad.

## Usage

We are actively working on this library and it's documentation, which you can find [here](https://lilypad.so/docs)

## Versioning

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

## License

This project uses a dual-license model:

### Open-Source License (MIT)

Except for the contents and code contained in any `ee` directory or sub-directory of this repository, which is covered by a commercial license (see below), all code in this repository is licensed under the terms of the [MIT License](https://github.com/Mirascope/lilypad/tree/main/LICENSE).

### Enterprise Edition (EE) License

The contents and code of any `ee` directory or sub-directory of this repository are licensed under the Enterprise Edition (EE) License. This content and code is only available to users using the Lilypad App or those with a valid Enterprise Edition (EE) License. See [ee/LICENSE](https://github.com/Mirascope/lilypad/tree/main/ee/LICENSE) for the full terms.

__Self-Hosting:__

For those looking to self-host the Enterprise Edition (EE) of Lilypad, please reach out to <sales@mirascope.com>.

You can find more information about self-hosting [here](https://lilypad.so/self-hosting).
