1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 hatchling, 6 pytestCheckHook, 7 mock, 8 pyyaml, 9 10 # for passthru.tests 11 asgi-csrf, 12 connexion, 13 fastapi, 14 gradio, 15 starlette, 16}: 17 18buildPythonPackage rec { 19 pname = "python-multipart"; 20 version = "0.0.20"; 21 pyproject = true; 22 23 src = fetchFromGitHub { 24 owner = "Kludex"; 25 repo = "python-multipart"; 26 tag = version; 27 hash = "sha256-y8wLGRvc7xSmkSyK77Tl5V6mMneS+dtmqBLZOhvmRSY="; 28 }; 29 30 build-system = [ hatchling ]; 31 32 pythonImportsCheck = [ "python_multipart" ]; 33 34 nativeCheckInputs = [ 35 pytestCheckHook 36 mock 37 pyyaml 38 ]; 39 40 passthru.tests = { 41 inherit 42 asgi-csrf 43 connexion 44 fastapi 45 gradio 46 starlette 47 ; 48 }; 49 50 meta = with lib; { 51 changelog = "https://github.com/Kludex/python-multipart/blob/${src.tag}/CHANGELOG.md"; 52 description = "Streaming multipart parser for Python"; 53 homepage = "https://github.com/Kludex/python-multipart"; 54 license = licenses.asl20; 55 maintainers = with maintainers; [ ris ]; 56 }; 57}