A client library for accessing langfuse
Project description
Langfuse Python SDK
pip install langfuse
Full documentation: https://docs.langfuse.com/sdk/python
Langchain documentation: https://docs.langfuse.com/langchain
Development
Add Poetry plugins
poetry self add poetry-dotenv-plugin
poetry self add poetry-bumpversion
Install dependencies
poetry install
Add Pre-commit
poetry run pre-commit install
Tests
Setup
- Add .env based on .env.example
Run
- Run all
poetry run pytest -s -v --log-cli-level=INFO
- Run a specific test
poetry run pytest -s -v --log-cli-level=INFO tests/test_sdk.py::test_flush
- E2E tests involving OpenAI and Serp API are usually skipped, remove skip decorators in tests/test_langchain.py to run them.
Update openapi spec
- Generate Fern Python SDK in langfuse and copy the files generated in
generated/python
into thelangfuse/api
folder in this repo. - Rebuild and deploy the package to PyPi.
Publish release
poetry version patch
poetry version prepatch
for pre-release versions
poetry build
poetry publish
- Create PyPi API token: https://pypi.org/manage/account/token/
- Setup:
poetry config pypi-token.pypi your-api-token
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
langfuse-1.0.32-py3-none-any.whl
(59.1 kB
view hashes)
Close
Hashes for langfuse-1.0.32-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5104171978c80a2a8403a896fd9dacc5f9e248d6003758a1794df435ada313d4 |
|
MD5 | bdc046485501e6483e5fe4c460512bb2 |
|
BLAKE2b-256 | 33596abdb779ccd6faa98c203d9af4c63b5fbfb85a5a72a6076acc10cd871bc3 |