literalai


Nameliteralai JSON
Version 0.1.106 PyPI version JSON
download
home_pageNone
SummaryAn SDK for observability in Python applications
upload_time2025-01-17 10:11:17
maintainerNone
docs_urlNone
authorLiteral AI
requires_pythonNone
licenseApache License 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Literal AI client

## Installation

```bash
pip install literalai
```

## Usage

The full documentation is available [here](https://docs.getliteral.ai/python-client).

Create a `.env` file with the `LITERAL_API_KEY` environment variable set to your API key.

```python
from literalai import LiteralClient
from dotenv import load_dotenv

load_dotenv()

literalai_client = LiteralClient()

@literalai_client.step(type="run")
def my_step(input):
    return f"World"


@literalai_client.thread
def main():
    print(my_step("Hello"))


main()
client.flush_and_stop()
print("Done")
```

## Development setup

```bash
pip install -r requirements-dev.txt
```



            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "literalai",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Literal AI",
    "author_email": "contact@literalai.com",
    "download_url": "https://files.pythonhosted.org/packages/77/e2/dcf15267483e7eaf7b6fb23bc50143f2a4cb9ad2a3a68a4cf140d1170651/literalai-0.1.106.tar.gz",
    "platform": null,
    "description": "# Literal AI client\n\n## Installation\n\n```bash\npip install literalai\n```\n\n## Usage\n\nThe full documentation is available [here](https://docs.getliteral.ai/python-client).\n\nCreate a `.env` file with the `LITERAL_API_KEY` environment variable set to your API key.\n\n```python\nfrom literalai import LiteralClient\nfrom dotenv import load_dotenv\n\nload_dotenv()\n\nliteralai_client = LiteralClient()\n\n@literalai_client.step(type=\"run\")\ndef my_step(input):\n    return f\"World\"\n\n\n@literalai_client.thread\ndef main():\n    print(my_step(\"Hello\"))\n\n\nmain()\nclient.flush_and_stop()\nprint(\"Done\")\n```\n\n## Development setup\n\n```bash\npip install -r requirements-dev.txt\n```\n\n\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "An SDK for observability in Python applications",
    "version": "0.1.106",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "77e2dcf15267483e7eaf7b6fb23bc50143f2a4cb9ad2a3a68a4cf140d1170651",
                "md5": "ac92c7f924e3b80a4d9fcc3528d4ef7f",
                "sha256": "b8af9c178b07257ef985bf1cbf14b2b0b08e541f80af9d26163e3f848ee00b2f"
            },
            "downloads": -1,
            "filename": "literalai-0.1.106.tar.gz",
            "has_sig": false,
            "md5_digest": "ac92c7f924e3b80a4d9fcc3528d4ef7f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 65460,
            "upload_time": "2025-01-17T10:11:17",
            "upload_time_iso_8601": "2025-01-17T10:11:17.739066Z",
            "url": "https://files.pythonhosted.org/packages/77/e2/dcf15267483e7eaf7b6fb23bc50143f2a4cb9ad2a3a68a4cf140d1170651/literalai-0.1.106.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-17 10:11:17",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "literalai"
}
        
Elapsed time: 0.43984s