{"library":"lunary","title":"Lunary Python SDK","description":"Python SDK for Lunary, an open-source platform for managing, monitoring, and improving LLM chatbots. Current version 1.4.41, actively maintained with frequent releases.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install lunary"],"cli":null},"imports":["from lunary import LunaryHandler","from lunary import callback","from lunary import log_event"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import os\nfrom lunary import LunaryHandler\n\n# Set your Lunary API key\nos.environ['LUNARY_PUBLIC_KEY'] = 'your-public-key'\n\nhandler = LunaryHandler(\n    public_key=os.environ.get('LUNARY_PUBLIC_KEY', ''),\n    # Optional: specify a different endpoint\n    # endpoint=\"https://api.lunary.ai\"\n)\n\n# Usage example: track a chat completion\nhandler.track_event(\"chat\", {\n    \"model\": \"gpt-3.5-turbo\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"Hello\"}],\n    \"output\": \"Hi there!\"\n})","lang":"python","description":"Initialize LunaryHandler with your API key and track an event.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}