at 23.05-pre 1.9 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pydantic 5, starlette 6, pytestCheckHook 7, pytest-asyncio 8, aiosqlite 9, databases 10, flask 11, httpx 12, hatchling 13, orjson 14, passlib 15, peewee 16, python-jose 17, sqlalchemy 18, trio 19, pythonOlder 20}: 21 22buildPythonPackage rec { 23 pname = "fastapi"; 24 version = "0.85.2"; 25 format = "pyproject"; 26 27 disabled = pythonOlder "3.7"; 28 29 src = fetchFromGitHub { 30 owner = "tiangolo"; 31 repo = pname; 32 rev = "refs/tags/${version}"; 33 hash = "sha256-j3Set+xWNcRqbn90DJOJQhMrJYI3msvWHlFvN1habP0="; 34 }; 35 36 nativeBuildInputs = [ 37 hatchling 38 ]; 39 40 postPatch = '' 41 substituteInPlace pyproject.toml \ 42 --replace "starlette==" "starlette>=" 43 ''; 44 45 propagatedBuildInputs = [ 46 starlette 47 pydantic 48 ]; 49 50 checkInputs = [ 51 aiosqlite 52 databases 53 flask 54 httpx 55 orjson 56 passlib 57 peewee 58 python-jose 59 pytestCheckHook 60 pytest-asyncio 61 sqlalchemy 62 trio 63 ] ++ passlib.optional-dependencies.bcrypt; 64 65 pytestFlagsArray = [ 66 # ignoring deprecation warnings to avoid test failure from 67 # tests/test_tutorial/test_testing/test_tutorial001.py 68 "-W ignore::DeprecationWarning" 69 ]; 70 71 disabledTestPaths = [ 72 # Disabled tests require orjson which requires rust nightly 73 "tests/test_default_response_class.py" 74 # Don't test docs and examples 75 "docs_src" 76 ]; 77 78 disabledTests = [ 79 "test_get_custom_response" 80 # Failed: DID NOT RAISE <class 'starlette.websockets.WebSocketDisconnect'> 81 "test_websocket_invalid_data" 82 "test_websocket_no_credentials" 83 # TypeError: __init__() missing 1...starlette-releated 84 "test_head" 85 "test_options" 86 "test_trace" 87 ]; 88 89 pythonImportsCheck = [ 90 "fastapi" 91 ]; 92 93 meta = with lib; { 94 description = "Web framework for building APIs"; 95 homepage = "https://github.com/tiangolo/fastapi"; 96 license = licenses.mit; 97 maintainers = with maintainers; [ wd15 ]; 98 }; 99}