1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
{
lib,
aiosqlite,
anyio,
asgi-lifespan,
async-timeout,
buildPythonPackage,
daphne,
fastapi,
fetchFromGitHub,
granian,
httpx,
portend,
psutil,
pytest-asyncio,
pytestCheckHook,
setuptools,
sqlalchemy,
starlette,
tenacity,
testcontainers,
uvicorn,
}:
buildPythonPackage rec {
pname = "sse-starlette";
version = "3.0.3";
pyproject = true;
src = fetchFromGitHub {
owner = "sysid";
repo = "sse-starlette";
tag = "v${version}";
hash = "sha256-2QCagK4OIVJJ54uedJFVjcGyRo2j1415iNjDIa67/mo=";
};
build-system = [ setuptools ];
dependencies = [
anyio
];
optional-dependencies = {
daphne = [ daphne ];
examples = [
aiosqlite
fastapi
sqlalchemy
starlette
uvicorn
]
++ sqlalchemy.optional-dependencies.asyncio;
granian = [ granian ];
uvicorn = [ uvicorn ];
};
nativeCheckInputs = [
asgi-lifespan
async-timeout
fastapi
httpx
portend
psutil
pytest-asyncio
pytestCheckHook
tenacity
testcontainers
uvicorn
];
pythonImportsCheck = [ "sse_starlette" ];
disabledTests = [
# AssertionError
"test_stop_server_with_many_consumers"
# require docker
"test_sse_server_termination"
];
__darwinAllowLocalNetworking = true;
meta = {
description = "Server Sent Events for Starlette and FastAPI";
homepage = "https://github.com/sysid/sse-starlette";
changelog = "https://github.com/sysid/sse-starlette/blob/${src.tag}/CHANGELOG.md";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ fab ];
};
}
|