1{
2 buildPythonPackage,
3 lib,
4 fetchFromGitHub,
5 hatchling,
6 hypothesis,
7 faker,
8 msgspec,
9 sqlalchemy,
10 aiosqlite,
11 typing-extensions,
12 pymongo,
13 pytest-asyncio,
14 pydantic,
15 pytestCheckHook,
16 email-validator,
17 pytest-lazy-fixtures,
18}:
19
20buildPythonPackage rec {
21 pname = "polyfactory";
22 version = "2.19.0";
23 pyproject = true;
24
25 src = fetchFromGitHub {
26 owner = "litestar-org";
27 repo = "polyfactory";
28 tag = "v${version}";
29 hash = "sha256-0VsH2J+vEk3cF7AYvirnXPupSLE2EGrp9FF+/EOWAbw=";
30 };
31
32 build-system = [ hatchling ];
33
34 dependencies = [
35 faker
36 typing-extensions
37 hypothesis
38 pydantic
39 sqlalchemy
40 msgspec
41 pymongo
42 aiosqlite
43 email-validator
44 ];
45
46 nativeCheckInputs = [
47 pytestCheckHook
48 pytest-asyncio
49 ];
50
51 disabledTests = [
52 # Unsupported type: LiteralAlias
53 "test_type_alias"
54 ];
55
56 pythonImporeCheck = [ "polyfactory" ];
57
58 meta = {
59 homepage = "https://polyfactory.litestar.dev/";
60 platforms = lib.platforms.unix;
61 maintainers = with lib.maintainers; [ bot-wxt1221 ];
62 changelog = "https://github.com/litestar-org/polyfactory/releases/tag/v${version}";
63 description = "Simple and powerful factories for mock data generation";
64 license = lib.licenses.mit;
65 };
66}