1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pydantic
5, starlette
6, pytestCheckHook
7, pytest-asyncio
8, aiosqlite
9, databases
10, flask
11, httpx
12, passlib
13, peewee
14, python-jose
15, sqlalchemy
16}:
17
18buildPythonPackage rec {
19 pname = "fastapi";
20 version = "0.65.0";
21 format = "flit";
22
23 src = fetchFromGitHub {
24 owner = "tiangolo";
25 repo = "fastapi";
26 rev = version;
27 sha256 = "sha256-DPfijCGORF3ThZblqaYTKN0H8+wlhtdIS8lfKfJl/bY=";
28 };
29
30 postPatch = ''
31 substituteInPlace pyproject.toml \
32 --replace "starlette ==" "starlette >="
33 '';
34
35 propagatedBuildInputs = [
36 starlette
37 pydantic
38 ];
39
40 checkInputs = [
41 aiosqlite
42 databases
43 flask
44 httpx
45 passlib
46 peewee
47 python-jose
48 pytestCheckHook
49 pytest-asyncio
50 sqlalchemy
51 ];
52
53 # disabled tests require orjson which requires rust nightly
54 pytestFlagsArray = [ "--ignore=tests/test_default_response_class.py" ];
55 disabledTests = [ "test_get_custom_response" ];
56
57 meta = with lib; {
58 homepage = "https://github.com/tiangolo/fastapi";
59 description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production";
60 license = licenses.mit;
61 maintainers = with maintainers; [ wd15 ];
62 };
63}