28 buildPythonPackage rec {
33 disabled = pythonOlder "3.7";
35 src = fetchFromGitHub {
38 rev = "refs/tags/${version}";
39 hash = "sha256-DzvmJpWJANIoc5lvWAD0b2bhbKdDEpNL2l3TqXSZSnc=";
52 propagatedBuildInputs =
60 ++ lib.optionals (pythonOlder "3.8") [
65 optional-dependencies = {
66 postgresql = [ asyncpg ];
67 postgres = [ asyncpg ];
70 sqlite = [ aiosqlite ];
72 crypto = [ cryptography ];
85 nativeCheckInputs = [ pytestCheckHook ];
92 ] ++ optional-dependencies.all;
94 disabledTestPaths = [ "benchmarks/test_benchmark_*.py" ];
97 # TypeError: Object of type bytes is not JSON serializable
98 "test_bulk_operations_with_json"
100 # Tests require a database
101 "test_model_multiple_instances_of_same_table_in_schema"
102 "test_load_all_multiple_instances_of_same_table_in_schema"
103 "test_filter_groups_with_instances_of_same_table_in_schema"
104 "test_model_multiple_instances_of_same_table_in_schema"
105 "test_right_tables_join"
106 "test_multiple_reverse_related_objects"
107 "test_related_with_defaults"
108 "test_model_creation"
109 "test_default_orders_is_applied_on_related_two_fields"
110 "test_default_orders_is_applied_from_relation"
113 "test_queryset_methods"
114 "test_queryset_update"
115 "test_selecting_subset"
116 "test_selecting_subset_of_through_model"
117 "test_simple_queryset_values"
118 "test_queryset_values_nested_relation"
119 "test_queryset_simple_values_list"
120 "test_queryset_nested_relation_values_list"
121 "test_queryset_nested_relation_subset_of_fields_values_list"
124 "test_nested_flatten_and_exception"
125 "test_queryset_values_multiple_select_related"
126 "test_querysetproxy_values"
127 "test_querysetproxy_values_list"
128 "test_reverse_many_to_many_cascade"
129 "test_not_saved_raises_error"
130 "test_not_existing_raises_error"
131 "test_assigning_related_objects"
132 "test_quering_of_the_m2m_models"
133 "test_removal_of_the_relations"
134 "test_selecting_related"
135 "test_adding_unsaved_related"
136 "test_removing_unsaved_related"
137 "test_quering_of_related_model_works_but_no_result"
140 pythonImportsCheck = [ "ormar" ];
143 description = "Async ORM with fastapi in mind and pydantic validation";
144 homepage = "https://github.com/collerek/ormar";
145 changelog = "https://github.com/collerek/ormar/releases/tag/${version}";
146 license = licenses.mit;
147 maintainers = with maintainers; [ andreasfelix ];