1{ lib
2, stdenv
3, buildPythonPackage
4, fetchFromGitHub
5, aiofiles
6, graphene
7, itsdangerous
8, jinja2
9, pyyaml
10, requests
11, ujson
12, python-multipart
13, pytest
14, uvicorn
15, isPy27
16, darwin
17, databases
18, aiosqlite
19}:
20
21buildPythonPackage rec {
22 pname = "starlette";
23
24 version = "0.13.8";
25 disabled = isPy27;
26
27 src = fetchFromGitHub {
28 owner = "encode";
29 repo = pname;
30 rev = version;
31 sha256 = "11i0yd8cqwscixajl734g11vf8pghki11c81chzfh8ifmj6mf9jk";
32 };
33
34 propagatedBuildInputs = [
35 aiofiles
36 graphene
37 itsdangerous
38 jinja2
39 pyyaml
40 requests
41 ujson
42 uvicorn
43 python-multipart
44 databases
45 ] ++ stdenv.lib.optional stdenv.isDarwin [ darwin.apple_sdk.frameworks.ApplicationServices ];
46
47 checkInputs = [
48 pytest
49 aiosqlite
50 ];
51
52 checkPhase = ''
53 pytest --ignore=tests/test_graphql.py
54 '';
55 pythonImportsCheck = [ "starlette" ];
56
57 meta = with lib; {
58 homepage = "https://www.starlette.io/";
59 description = "The little ASGI framework that shines";
60 license = licenses.bsd3;
61 maintainers = with maintainers; [ wd15 ];
62 };
63}