nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 74 lines 1.5 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonAtLeast, 6 anyio, 7 backoff, 8 httpx, 9 idna, 10 langchain, 11 llama-index, 12 openai, 13 opentelemetry-api, 14 opentelemetry-sdk, 15 opentelemetry-exporter-otlp, 16 packaging, 17 poetry-core, 18 pydantic, 19 requests, 20 wrapt, 21}: 22 23buildPythonPackage (finalAttrs: { 24 pname = "langfuse"; 25 version = "3.12.0"; 26 pyproject = true; 27 28 src = fetchFromGitHub { 29 owner = "langfuse"; 30 repo = "langfuse-python"; 31 tag = "v${finalAttrs.version}"; 32 hash = "sha256-LHKNy5KSJhRhxkrp4+pjD0GGHTooaj7adrRA7I4mbdo="; 33 }; 34 35 # https://github.com/langfuse/langfuse/issues/9618 36 disabled = pythonAtLeast "3.14"; 37 38 build-system = [ poetry-core ]; 39 40 pythonRelaxDeps = [ "packaging" ]; 41 42 dependencies = [ 43 anyio 44 backoff 45 httpx 46 idna 47 opentelemetry-api 48 opentelemetry-sdk 49 opentelemetry-exporter-otlp 50 packaging 51 pydantic 52 requests 53 wrapt 54 ]; 55 56 optional-dependencies = { 57 langchain = [ langchain ]; 58 llama-index = [ llama-index ]; 59 openai = [ openai ]; 60 }; 61 62 pythonImportsCheck = [ "langfuse" ]; 63 64 # tests require network access and openai api key 65 doCheck = false; 66 67 meta = { 68 description = "Instrument your LLM app with decorators or low-level SDK and get detailed tracing/observability"; 69 homepage = "https://github.com/langfuse/langfuse-python"; 70 changelog = "https://github.com/langfuse/langfuse-python/releases/tag/${finalAttrs.src.tag}"; 71 license = lib.licenses.mit; 72 maintainers = with lib.maintainers; [ natsukium ]; 73 }; 74})