Name | yunke_langfuse JSON |
Version |
2.7.6
JSON |
| download |
home_page | |
Summary | A client library for accessing langfuse |
upload_time | 2024-01-30 05:28:17 |
maintainer | |
docs_url | None |
author | langfuse |
requires_python | >=3.8.1,<4.0 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Langfuse Python SDK
[![MIT License](https://img.shields.io/badge/License-MIT-red.svg?style=flat-square)](https://opensource.org/licenses/MIT)
[![CI test status](https://img.shields.io/github/actions/workflow/status/langfuse/langfuse-python/ci.yml?style=flat-square&label=All%20tests)](https://github.com/langfuse/langfuse-python/actions/workflows/ci.yml?query=branch%3Amain)
[![PyPI Version](https://img.shields.io/pypi/v/langfuse.svg?style=flat-square&label=pypi+langfuse)](https://pypi.python.org/pypi/langfuse)
[![GitHub Repo stars](https://img.shields.io/github/stars/langfuse/langfuse?style=flat-square&logo=GitHub&label=langfuse%2Flangfuse)](https://github.com/langfuse/langfuse)
[![Discord](https://img.shields.io/discord/1111061815649124414?style=flat-square&logo=Discord&logoColor=white&label=Discord&color=%23434EE4)](https://discord.gg/7NXusRtqYU)
[![YC W23](https://img.shields.io/badge/Y%20Combinator-W23-orange?style=flat-square)](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#upgrading-from-v1xx-to-v2xx) for instructions on updating your code.
```
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](tests/test_langchain.py) to run them.
### Update openapi spec
1. Generate Fern Python SDK in [langfuse](https://github.com/langfuse/langfuse) and copy the files generated in `generated/python` into the `langfuse/api` folder in this repo.
2. Execute the linter by running `poetry run ruff format .`
3. Rebuild and deploy the package to PyPi.
### Publish release
1. `poetry version patch`
- `poetry version prepatch` for pre-release versions
2. `poetry install`
3. `poetry build`
4. `git commit -am "chore: release v{version}"`
5. `git push`
6. `git tag v{version}`
7. `git push --tags`
8. `poetry publish`
- Create PyPi API token: https://pypi.org/manage/account/token/
- Setup: `poetry config pypi-token.pypi your-api-token`
9. Create a release on GitHub with the changelog
Raw data
{
"_id": null,
"home_page": "",
"name": "yunke_langfuse",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8.1,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "langfuse",
"author_email": "developers@langfuse.com",
"download_url": "https://files.pythonhosted.org/packages/67/e7/3e2e8b212976048b4ded9a285363a149ca180f9d25cc22bbd2aadc846e45/yunke_langfuse-2.7.6.tar.gz",
"platform": null,
"description": "# Langfuse Python SDK\n\n[![MIT License](https://img.shields.io/badge/License-MIT-red.svg?style=flat-square)](https://opensource.org/licenses/MIT)\n[![CI test status](https://img.shields.io/github/actions/workflow/status/langfuse/langfuse-python/ci.yml?style=flat-square&label=All%20tests)](https://github.com/langfuse/langfuse-python/actions/workflows/ci.yml?query=branch%3Amain)\n[![PyPI Version](https://img.shields.io/pypi/v/langfuse.svg?style=flat-square&label=pypi+langfuse)](https://pypi.python.org/pypi/langfuse)\n[![GitHub Repo stars](https://img.shields.io/github/stars/langfuse/langfuse?style=flat-square&logo=GitHub&label=langfuse%2Flangfuse)](https://github.com/langfuse/langfuse)\n[![Discord](https://img.shields.io/discord/1111061815649124414?style=flat-square&logo=Discord&logoColor=white&label=Discord&color=%23434EE4)](https://discord.gg/7NXusRtqYU)\n[![YC W23](https://img.shields.io/badge/Y%20Combinator-W23-orange?style=flat-square)](https://www.ycombinator.com/companies/langfuse)\n\n## Installation\n\n> [!IMPORTANT]\n> The SDK was rewritten in v2 and released on December 17, 2023. Refer to the [v2 migration guide](https://langfuse.com/docs/sdk/python#upgrading-from-v1xx-to-v2xx) for instructions on updating your code.\n\n```\npip install langfuse\n```\n\nFull documentation: https://docs.langfuse.com/sdk/python\n\nLangchain documentation: https://docs.langfuse.com/langchain\n\n## Development\n\n### Add Poetry plugins\n\n```\npoetry self add poetry-dotenv-plugin\npoetry self add poetry-bumpversion\n```\n\n### Install dependencies\n\n```\npoetry install --all-extras\n```\n\n### Add Pre-commit\n\n```\npoetry run pre-commit install\n```\n\n### Tests\n\n#### Setup\n\n- Add .env based on .env.example\n\n#### Run\n\n- Run all\n ```\n poetry run pytest -s -v --log-cli-level=INFO\n ```\n- Run a specific test\n ```\n poetry run pytest -s -v --log-cli-level=INFO tests/test_sdk.py::test_flush\n ```\n- E2E tests involving OpenAI and Serp API are usually skipped, remove skip decorators in [tests/test_langchain.py](tests/test_langchain.py) to run them.\n\n### Update openapi spec\n\n1. Generate Fern Python SDK in [langfuse](https://github.com/langfuse/langfuse) and copy the files generated in `generated/python` into the `langfuse/api` folder in this repo.\n2. Execute the linter by running `poetry run ruff format .`\n3. Rebuild and deploy the package to PyPi.\n\n### Publish release\n\n1. `poetry version patch`\n - `poetry version prepatch` for pre-release versions\n2. `poetry install`\n3. `poetry build`\n4. `git commit -am \"chore: release v{version}\"`\n5. `git push`\n6. `git tag v{version}`\n7. `git push --tags`\n8. `poetry publish`\n - Create PyPi API token: https://pypi.org/manage/account/token/\n - Setup: `poetry config pypi-token.pypi your-api-token`\n9. Create a release on GitHub with the changelog\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A client library for accessing langfuse",
"version": "2.7.6",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ec11d8654d796611294984b59fa3a0f1d7f793e071921edb97a646604e3b676b",
"md5": "168cd0c277aa9f60020cac17c9b9db6b",
"sha256": "0d5eb5ee9e416a97616cbfe70495112698d17fe42a24f719eb434de1547cec9b"
},
"downloads": -1,
"filename": "yunke_langfuse-2.7.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "168cd0c277aa9f60020cac17c9b9db6b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8.1,<4.0",
"size": 98381,
"upload_time": "2024-01-30T05:28:16",
"upload_time_iso_8601": "2024-01-30T05:28:16.045998Z",
"url": "https://files.pythonhosted.org/packages/ec/11/d8654d796611294984b59fa3a0f1d7f793e071921edb97a646604e3b676b/yunke_langfuse-2.7.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "67e73e2e8b212976048b4ded9a285363a149ca180f9d25cc22bbd2aadc846e45",
"md5": "557581759db52d09a5db1dfb523f41c9",
"sha256": "a5542123c31bfb6d26f9d9dc865d912bf52167edcdd16318038747c2b1ebabf7"
},
"downloads": -1,
"filename": "yunke_langfuse-2.7.6.tar.gz",
"has_sig": false,
"md5_digest": "557581759db52d09a5db1dfb523f41c9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8.1,<4.0",
"size": 40387,
"upload_time": "2024-01-30T05:28:17",
"upload_time_iso_8601": "2024-01-30T05:28:17.467396Z",
"url": "https://files.pythonhosted.org/packages/67/e7/3e2e8b212976048b4ded9a285363a149ca180f9d25cc22bbd2aadc846e45/yunke_langfuse-2.7.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-30 05:28:17",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "yunke_langfuse"
}