1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 hatchling,
6 pytestCheckHook,
7 mock,
8 pyyaml,
9 six,
10
11 # for passthru.tests
12 asgi-csrf,
13 connexion,
14 fastapi,
15 gradio,
16 starlette,
17}:
18
19buildPythonPackage rec {
20 pname = "python-multipart";
21 version = "0.0.9";
22 pyproject = true;
23
24 src = fetchPypi {
25 pname = "python_multipart";
26 inherit version;
27 hash = "sha256-A/VGiMZj8beXcQXwIQQ7B5MVHkyxwanUoR/BPWIsQCY=";
28 };
29
30 nativeBuildInputs = [ hatchling ];
31
32 propagatedBuildInputs = [ six ];
33
34 pythonImportsCheck = [ "multipart" ];
35
36 nativeCheckInputs = [
37 pytestCheckHook
38 mock
39 pyyaml
40 ];
41
42 passthru.tests = {
43 inherit
44 asgi-csrf
45 connexion
46 fastapi
47 gradio
48 starlette
49 ;
50 };
51
52 meta = with lib; {
53 description = "A streaming multipart parser for Python";
54 homepage = "https://github.com/andrew-d/python-multipart";
55 license = licenses.asl20;
56 maintainers = with maintainers; [ ris ];
57 };
58}