Metadata-Version: 2.1
Name: langfuse
Version: 2.44.0
Summary: A client library for accessing langfuse
License: MIT
Author: langfuse
Author-email: developers@langfuse.com
Requires-Python: >=3.8.1,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Provides-Extra: langchain
Provides-Extra: llama-index
Provides-Extra: openai
Requires-Dist: anyio (>=4.4.0,<5.0.0)
Requires-Dist: backoff (>=1.10.0)
Requires-Dist: httpx (>=0.15.4,<1.0)
Requires-Dist: idna (>=3.7,<4.0)
Requires-Dist: langchain (>=0.0.309) ; extra == "langchain"
Requires-Dist: llama-index (>=0.10.12,<2.0.0) ; extra == "llama-index"
Requires-Dist: openai (>=0.27.8) ; extra == "openai"
Requires-Dist: packaging (>=23.2,<24.0)
Requires-Dist: pydantic (>=1.10.7,<3.0)
Requires-Dist: wrapt (>=1.14,<2.0)
Description-Content-Type: text/markdown

# Langfuse Python SDK
[](https://opensource.org/licenses/MIT)
[](https://github.com/langfuse/langfuse-python/actions/workflows/ci.yml?query=branch%3Amain)
[](https://pypi.python.org/pypi/langfuse)
[](https://github.com/langfuse/langfuse)
[](https://discord.gg/7NXusRtqYU)
[](https://www.ycombinator.com/companies/langfuse)
## Installation
> [!IMPORTANT]
> The SDK was rewritten in v2 and released on December 17, 2023. Refer to the [v2 migration guide](https://langfuse.com/docs/sdk/python/low-level-sdk#upgrading-from-v1xx-to-v2xx) for instructions on updating your code.
```
pip install langfuse
```
## Docs
- Decorators: https://langfuse.com/docs/sdk/python/decorators
- Low-level SDK: https://langfuse.com/docs/sdk/python/low-level-sdk
- Langchain integration: https://langfuse.com/docs/integrations/langchain/tracing
## Interfaces
Interfaces:
- `@observe()` decorator ([docs](https://langfuse.com/docs/sdk/python/decorators))
- Low-level tracing SDK ([docs](https://langfuse.com/docs/sdk/python/low-level-sdk))
- Wrapper of Langfuse public API
Integrations
- OpenAI SDK ([docs](https://langfuse.com/docs/integrations/openai))
- LlamaIndex ([docs](https://langfuse.com/docs/integrations/llama-index))
- LangChain ([docs](https://langfuse.com/docs/integrations/langchain))