1{ 2 aiofiles, 3 buildPythonPackage, 4 cryptography, 5 deepdiff, 6 eval-type-backport, 7 fetchFromGitHub, 8 httpx, 9 lib, 10 nest-asyncio, 11 poetry-core, 12 pydantic, 13 pypdf, 14 pytest-asyncio, 15 pytestCheckHook, 16 python, 17 python-dateutil, 18 requests-toolbelt, 19 typing-inspection, 20}: 21 22buildPythonPackage rec { 23 pname = "unstructured-client"; 24 version = "0.42.3"; 25 pyproject = true; 26 27 src = fetchFromGitHub { 28 owner = "Unstructured-IO"; 29 repo = "unstructured-python-client"; 30 tag = "v${version}"; 31 hash = "sha256-n13+ET4w+g9Ldygi+3bgn8X5r5ofMowA4ZJZsqnqIkk="; 32 }; 33 34 preBuild = '' 35 ${python.interpreter} scripts/prepare_readme.py 36 ''; 37 38 build-system = [ poetry-core ]; 39 40 pythonRelaxDeps = [ 41 "pydantic" 42 ]; 43 44 dependencies = [ 45 aiofiles 46 cryptography 47 eval-type-backport 48 httpx 49 nest-asyncio 50 pydantic 51 pypdf 52 python-dateutil 53 requests-toolbelt 54 typing-inspection 55 ]; 56 57 pythonImportsCheck = [ "unstructured_client" ]; 58 59 nativeCheckInputs = [ 60 deepdiff 61 pytest-asyncio 62 pytestCheckHook 63 ]; 64 65 # see test-unit in Makefile 66 enabledTestPaths = [ 67 "_test_unstructured_client" 68 ]; 69 enabledTests = [ 70 "unit" 71 ]; 72 73 meta = { 74 changelog = "https://github.com/Unstructured-IO/unstructured-python-client/blob/${src.tag}/RELEASES.md"; 75 description = "Python Client SDK for Unstructured API"; 76 homepage = "https://github.com/Unstructured-IO/unstructured-python-client"; 77 license = lib.licenses.mit; 78 maintainers = with lib.maintainers; [ dotlambda ]; 79 }; 80}