1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 6 # build-system 7 pdm-backend, 8 9 # local dependencies 10 black, 11 mypy, 12 13 # dependencies 14 grpcio, 15 grpclib, 16 httpx-sse, 17 httpx-ws, 18 httpx, 19 mmh3, 20 openai, 21 pillow, 22 protobuf, 23 pydantic, 24 python-dateutil, 25 rich, 26 typing-extensions, 27 28 # optional dependencies 29 fastapi, 30 gitignore-parser, 31 openapi-spec-validator, 32 prance, 33 safetensors, 34 tabulate, 35 torch, 36 tqdm, 37}: 38 39let 40 asyncstdlib-fw = buildPythonPackage rec { 41 pname = "asyncstdlib_fw"; 42 version = "3.13.2"; 43 pyproject = true; 44 45 src = fetchPypi { 46 inherit pname version; 47 hash = "sha256-Ua0JTCBMWTbDBA84wy/W1UmzkcmA8h8foJW2X7aAah8="; 48 }; 49 50 build-system = [ 51 pdm-backend 52 ]; 53 54 dependencies = [ 55 black 56 mypy 57 ]; 58 59 pythonImportsCheck = [ 60 "asyncstdlib" 61 ]; 62 }; 63 64 betterproto-fw = buildPythonPackage rec { 65 pname = "betterproto_fw"; 66 version = "2.0.3"; 67 pyproject = true; 68 69 src = fetchPypi { 70 inherit version pname; 71 hash = "sha256-ut5GchUiTygHhC2hj+gSWKCoVnZrrV8KIKFHTFzba5M="; 72 }; 73 74 build-system = [ 75 pdm-backend 76 ]; 77 78 dependencies = [ 79 grpclib 80 python-dateutil 81 typing-extensions 82 ]; 83 84 pythonImportsCheck = [ 85 "betterproto" 86 ]; 87 88 }; 89in 90buildPythonPackage rec { 91 pname = "fireworks-ai"; 92 version = "0.17.16"; 93 pyproject = true; 94 95 # no source available 96 src = fetchPypi { 97 pname = "fireworks_ai"; 98 inherit version; 99 hash = "sha256-WblcAaYjnzwPS4n5rixNHbHLNGTE3bTPXvQ9lYZ1f9A="; 100 }; 101 102 build-system = [ 103 pdm-backend 104 ]; 105 106 pythonRelaxDeps = [ 107 "protobuf" 108 ]; 109 110 dependencies = [ 111 asyncstdlib-fw 112 betterproto-fw 113 grpcio 114 grpclib 115 httpx 116 httpx 117 httpx-sse 118 httpx-sse 119 httpx-ws 120 httpx-ws 121 mmh3 122 openai 123 pillow 124 pillow 125 protobuf 126 pydantic 127 pydantic 128 python-dateutil 129 rich 130 typing-extensions 131 ]; 132 133 optional-dependencies = { 134 flumina = [ 135 fastapi 136 gitignore-parser 137 openapi-spec-validator 138 prance 139 safetensors 140 tabulate 141 torch 142 tqdm 143 ]; 144 }; 145 146 # no tests available 147 doCheck = false; 148 149 pythonImportsCheck = [ 150 "fireworks" 151 ]; 152 153 meta = { 154 description = "Client library for the Fireworks.ai platform"; 155 homepage = "https://pypi.org/project/fireworks-ai/"; 156 license = lib.licenses.mit; 157 maintainers = with lib.maintainers; [ sarahec ]; 158 }; 159}