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 --all-extras
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/pythoninto thelangfuse/apifolder in this repo. - Rebuild and deploy the package to PyPi.
Publish release
poetry version patchpoetry version prepatchfor pre-release versions
poetry installpoetry buildgit commit -am "chore: release v{version}"git pushgit tag v{version}git push --tagspoetry publish- Create PyPi API token: https://pypi.org/manage/account/token/
- Setup:
poetry config pypi-token.pypi your-api-token
- Create a release on GitHub with the changelog
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 Distribution
langfuse-1.13.2.tar.gz
(33.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
langfuse-1.13.2-py3-none-any.whl
(77.7 kB
view details)
File details
Details for the file langfuse-1.13.2.tar.gz.
File metadata
- Download URL: langfuse-1.13.2.tar.gz
- Upload date:
- Size: 33.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.0 Darwin/23.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ada040076f2df2fda33ca696fbfa532ea486ff85e27e5eebeb71aba760a5770
|
|
| MD5 |
37c9169d2edd84e3b72f8f615f5e97f4
|
|
| BLAKE2b-256 |
aefe7fb323b2f4e0be45c08cdbc2049a70acfe045798c314ff0c4e1a5d717043
|
File details
Details for the file langfuse-1.13.2-py3-none-any.whl.
File metadata
- Download URL: langfuse-1.13.2-py3-none-any.whl
- Upload date:
- Size: 77.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.0 Darwin/23.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f64b857f8985ab7f43519b55ad5fe11d57d0224bc18de4cdbfc9aa981600268d
|
|
| MD5 |
017375e851d96a2ea7312a7f9109f529
|
|
| BLAKE2b-256 |
4b0fb6f539e8b6e81cd3f3686c3548a8d9d444b2d940a7d6ad1587f802b9502e
|