easyapi-django 1.35.2__tar.gz → 1.36.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. {easyapi_django-1.35.2/easyapi_django.egg-info → easyapi_django-1.36.0}/PKG-INFO +2 -3
  2. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/README.md +1 -1
  3. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/calc.py +135 -57
  4. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/custom.py +2 -0
  5. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/errors.py +1 -0
  6. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/rules/rules.py +5 -1
  7. {easyapi_django-1.35.2 → easyapi_django-1.36.0/easyapi_django.egg-info}/PKG-INFO +2 -3
  8. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi_django.egg-info/requires.txt +0 -1
  9. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/pyproject.toml +1 -2
  10. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/LICENSE +0 -0
  11. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/MANIFEST.in +0 -0
  12. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/__init__.py +0 -0
  13. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/account_access/__init__.py +0 -0
  14. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/account_access/access.py +0 -0
  15. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/account_access/apps.py +0 -0
  16. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/account_access/migrations/__init__.py +0 -0
  17. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/account_access/models.py +0 -0
  18. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/account_access/policy.py +0 -0
  19. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/account_access/resources.py +0 -0
  20. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/account_access/settings_helper.py +0 -0
  21. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/accounts/__init__.py +0 -0
  22. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/accounts/creator.py +0 -0
  23. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/api_keys.py +0 -0
  24. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/auth.py +0 -0
  25. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/base.py +0 -0
  26. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/bearer.py +0 -0
  27. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/billing/__init__.py +0 -0
  28. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/billing/apps.py +0 -0
  29. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/billing/constants.py +0 -0
  30. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/billing/management/__init__.py +0 -0
  31. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/billing/management/commands/__init__.py +0 -0
  32. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/billing/management/commands/billing.py +0 -0
  33. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/billing/migrations/__init__.py +0 -0
  34. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/billing/models.py +0 -0
  35. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/billing/plans.py +0 -0
  36. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/billing/resources.py +0 -0
  37. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/blocking.py +0 -0
  38. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/calc_resource.py +0 -0
  39. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/catalog.py +0 -0
  40. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/client_ip.py +0 -0
  41. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/constants.py +0 -0
  42. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/core/__init__.py +0 -0
  43. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/core/endpoint.py +0 -0
  44. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/core/resource.py +0 -0
  45. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/custom_models.py +0 -0
  46. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/custom_rules.py +0 -0
  47. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/dashboards/__init__.py +0 -0
  48. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/dashboards/aggregate.py +0 -0
  49. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/dashboards/compose.py +0 -0
  50. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/dashboards/models.py +0 -0
  51. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/dates.py +0 -0
  52. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/edge.py +0 -0
  53. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/exception.py +0 -0
  54. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/filters.py +0 -0
  55. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/gen/__init__.py +0 -0
  56. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/gen/cli.py +0 -0
  57. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/gen/config.py +0 -0
  58. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/gen/generator.py +0 -0
  59. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/gen/inspector/__init__.py +0 -0
  60. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/gen/inspector/base.py +0 -0
  61. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/gen/inspector/mysql.py +0 -0
  62. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/gen/inspector/postgres.py +0 -0
  63. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/gen/templates/README.md.j2 +0 -0
  64. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/gen/templates/asgi.py.j2 +0 -0
  65. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/gen/templates/env.example.j2 +0 -0
  66. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/gen/templates/gitignore.j2 +0 -0
  67. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/gen/templates/manage.py.j2 +0 -0
  68. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/gen/templates/module/models.py.j2 +0 -0
  69. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/gen/templates/module/resources.py.j2 +0 -0
  70. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/gen/templates/requirements.txt.j2 +0 -0
  71. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/gen/templates/router/endpoints.py.j2 +0 -0
  72. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/gen/templates/router/urls.py.j2 +0 -0
  73. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/gen/templates/run.sh.j2 +0 -0
  74. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/gen/templates/settings/env.py.j2 +0 -0
  75. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/gen/templates/settings/settings.py.j2 +0 -0
  76. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/helpers.py +0 -0
  77. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/labels/__init__.py +0 -0
  78. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/labels/management/__init__.py +0 -0
  79. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/labels/management/commands/__init__.py +0 -0
  80. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/labels/management/commands/export_labels.py +0 -0
  81. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/management/__init__.py +0 -0
  82. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/management/commands/__init__.py +0 -0
  83. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/management/commands/mcp_serve.py +0 -0
  84. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/mcp/__init__.py +0 -0
  85. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/mcp/protocol.py +0 -0
  86. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/mcp/schema.py +0 -0
  87. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/mcp/server.py +0 -0
  88. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/mcp/testing.py +0 -0
  89. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/mcp/tool.py +0 -0
  90. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/mcp/tools.py +0 -0
  91. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/middleware.py +0 -0
  92. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/__init__.py +0 -0
  93. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/_common.py +0 -0
  94. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/apps.py +0 -0
  95. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/cimd.py +0 -0
  96. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/clients.py +0 -0
  97. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/codes.py +0 -0
  98. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/consent_csrf.py +0 -0
  99. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/constants.py +0 -0
  100. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/devices.py +0 -0
  101. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/discovery.py +0 -0
  102. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/locale/es_ES/LC_MESSAGES/django.mo +0 -0
  103. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/locale/es_ES/LC_MESSAGES/django.po +0 -0
  104. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
  105. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/locale/pt_BR/LC_MESSAGES/django.po +0 -0
  106. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/logos.py +0 -0
  107. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/migrations/__init__.py +0 -0
  108. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/models.py +0 -0
  109. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/resolver.py +0 -0
  110. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/resources/__init__.py +0 -0
  111. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/resources/authorize.py +0 -0
  112. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/resources/connections.py +0 -0
  113. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/resources/device.py +0 -0
  114. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/resources/device_authorization.py +0 -0
  115. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/resources/register.py +0 -0
  116. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/resources/revoke.py +0 -0
  117. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/resources/switch_account.py +0 -0
  118. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/resources/token.py +0 -0
  119. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/routes.py +0 -0
  120. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/session.py +0 -0
  121. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/settings_helper.py +0 -0
  122. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/templates/easyapi_oauth/consent.html +0 -0
  123. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/templates/easyapi_oauth/device.html +0 -0
  124. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/templates/easyapi_oauth/switch_account.html +0 -0
  125. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/oauth/tokens.py +0 -0
  126. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/openapi.py +0 -0
  127. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/orm/__init__.py +0 -0
  128. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/partner/__init__.py +0 -0
  129. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/partner/partner.py +0 -0
  130. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/partner/resources.py +0 -0
  131. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/rate_limit.py +0 -0
  132. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/redis_config.py +0 -0
  133. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/routes.py +0 -0
  134. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/rules/__init__.py +0 -0
  135. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/rules/audit.py +0 -0
  136. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/rules/authenticator.py +0 -0
  137. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/rules/cache.py +0 -0
  138. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/rules/context.py +0 -0
  139. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/rules/errors.py +0 -0
  140. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/rules/mcp.py +0 -0
  141. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/rules/operations.py +0 -0
  142. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/rules/policy.py +0 -0
  143. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/rules/registry.py +0 -0
  144. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/rules/rest.py +0 -0
  145. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/rules/selection.py +0 -0
  146. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/rules/writes.py +0 -0
  147. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/schemas.py +0 -0
  148. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/security.py +0 -0
  149. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/security_evidence.py +0 -0
  150. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/security_log.py +0 -0
  151. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/security_store.py +0 -0
  152. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/sensitive.py +0 -0
  153. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/serializer.py +0 -0
  154. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/session.py +0 -0
  155. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/settings_helper.py +0 -0
  156. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/signin/__init__.py +0 -0
  157. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/signin/apps.py +0 -0
  158. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/signin/codes.py +0 -0
  159. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/signin/constants.py +0 -0
  160. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/signin/crypto.py +0 -0
  161. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/signin/device.py +0 -0
  162. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/signin/federated.py +0 -0
  163. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/signin/login.py +0 -0
  164. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/signin/migrations/__init__.py +0 -0
  165. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/signin/models.py +0 -0
  166. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/signin/passkey.py +0 -0
  167. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/signin/resources.py +0 -0
  168. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/signin/settings_helper.py +0 -0
  169. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/signin/store.py +0 -0
  170. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/signin/two_factor.py +0 -0
  171. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/tenant/__init__.py +0 -0
  172. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/tenant/db_router.py +0 -0
  173. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/tenant/registry.py +0 -0
  174. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/tenant/tenant.py +0 -0
  175. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/tokens.py +0 -0
  176. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi/util.py +0 -0
  177. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi_django.egg-info/SOURCES.txt +0 -0
  178. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi_django.egg-info/dependency_links.txt +0 -0
  179. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi_django.egg-info/entry_points.txt +0 -0
  180. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/easyapi_django.egg-info/top_level.txt +0 -0
  181. {easyapi_django-1.35.2 → easyapi_django-1.36.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: easyapi-django
3
- Version: 1.35.2
3
+ Version: 1.36.0
4
4
  Summary: Zero-effort REST API (and MCP server) generator from Django models.
5
5
  Author-email: Stamatios Stamou Jr <bushier.outsets.0c@icloud.com>
6
6
  License-Expression: MIT
@@ -16,7 +16,6 @@ Description-Content-Type: text/markdown
16
16
  License-File: LICENSE
17
17
  Requires-Dist: Django>=5.0
18
18
  Requires-Dist: redis>=4.5
19
- Requires-Dist: pandas<3.0
20
19
  Requires-Dist: pytz
21
20
  Requires-Dist: jsonschema>=4
22
21
  Requires-Dist: pydantic>=2
@@ -175,7 +174,7 @@ So I cleaned up **easyapi** and put it on GitHub. REST is the core; MCP is an op
175
174
  - **Empty and null are told apart.** Filters `isnull`/`isnotnull` match NULL only; `isempty`/`isnotempty` also take `''` on text fields; none of them takes a `value` (on a custom field, both mean no value). Writes store `''` as NULL on text fields with `null=True, blank=True`.
176
175
  - **Dates are calendar days.** Named periods (`today`, `this_month`, `last_7_days`, ...) take no `value`; `last_7_days` is 7 days including today and `next_7_days` today and the 6 after it. A `YYYY-MM-DD` value is the whole calendar day. Days are cut in the user's timezone, or in the session account's with `FILTER_TIMEZONE = 'account'` (same day for every user and for background jobs), in filters, segments and `/aggregate`.
177
176
  - **One filter field over several columns.** A value kept in more than one place (a category on the record, or on its split lines) filters as one field: declare `filter_aliases = {'category_id': ['category_id', 'lines__category_id']}` on the Django model. A rule on the alias matches when any target does; a negative rule (`not_*`) or `isnull`/`isempty` matches when every target does ("no category is X"). It applies wherever conditions run: `?filter=`, saved filters and `/aggregate`. The whitelists (`filter_fields`, `AGGREGATE_FIELDS`) check the alias name, not its targets.
178
- - **`/aggregate` returns readable charts.** `limit` counts the groups of the first non-date field (default and ceiling `AGGREGATE_MAX_GROUPS`, 50; above it a 400); the date and the other fields are never cut. Every grouped answer carries `groups: {field, total, shown, other, limit, max_limit}`, and `"other": true` gathers the rest as one `__other__` group.
177
+ - **`/aggregate` returns readable charts.** `limit` counts the groups of the first non-date field (default and ceiling `AGGREGATE_MAX_GROUPS`, 50; above it a 400); the date and the other fields are never cut. Every grouped answer carries `groups: {field, total, shown, other, limit, max_limit}`, and `"other": true` gathers the rest as one `__other__` group. `filter_by.period` deltas count in days, weeks (`"-1w"`, Monday to Sunday), months or years. A date chart (`year` to `hour`) carries every date of the period on its x axis, even with no rows at all when the period has both bounds: a date with no rows comes with `0` for `count`/`sum` and `null` for the other formulas (`weekday`, `weekdayhour` and `raw` are not filled); an axis over 10000 dates is a 400 (`easyapi.date_axis_too_long`) whose `params.fits` names the coarser grouping that fits.
179
178
  - **Conditions through M2M and reverse relations don't repeat rows.** Each one is a subquery of ids, so an `/aggregate` sum filtered by tag counts each record once. In an AND group, the rules on one relation hold on the same related row ("event X after A and before B"); a field that repeats ("tag A and tag B", the values of `all`) takes a row per repetition, with the group's other rules on each. Rules in different groups hold on different rows.
180
179
  - **Tags by id or name.** Set `tag_scope` (fields of the tag model, e.g. `{'context': 1}`, or a property such as `{'project_id': self.obj.project_id}`) and the `tags` M2M takes ids or names in POST/PATCH: a name is created in the scope when missing, a tag outside it is a 400. The detail returns `tags: [{id, name}]`.
181
180
  - **Ownership scoping.** One attribute (`owner_field = 'owner_id'`) restricts every CRUD operation to rows owned by the authenticated user — the cheapest IDOR defense I know.
@@ -120,7 +120,7 @@ So I cleaned up **easyapi** and put it on GitHub. REST is the core; MCP is an op
120
120
  - **Empty and null are told apart.** Filters `isnull`/`isnotnull` match NULL only; `isempty`/`isnotempty` also take `''` on text fields; none of them takes a `value` (on a custom field, both mean no value). Writes store `''` as NULL on text fields with `null=True, blank=True`.
121
121
  - **Dates are calendar days.** Named periods (`today`, `this_month`, `last_7_days`, ...) take no `value`; `last_7_days` is 7 days including today and `next_7_days` today and the 6 after it. A `YYYY-MM-DD` value is the whole calendar day. Days are cut in the user's timezone, or in the session account's with `FILTER_TIMEZONE = 'account'` (same day for every user and for background jobs), in filters, segments and `/aggregate`.
122
122
  - **One filter field over several columns.** A value kept in more than one place (a category on the record, or on its split lines) filters as one field: declare `filter_aliases = {'category_id': ['category_id', 'lines__category_id']}` on the Django model. A rule on the alias matches when any target does; a negative rule (`not_*`) or `isnull`/`isempty` matches when every target does ("no category is X"). It applies wherever conditions run: `?filter=`, saved filters and `/aggregate`. The whitelists (`filter_fields`, `AGGREGATE_FIELDS`) check the alias name, not its targets.
123
- - **`/aggregate` returns readable charts.** `limit` counts the groups of the first non-date field (default and ceiling `AGGREGATE_MAX_GROUPS`, 50; above it a 400); the date and the other fields are never cut. Every grouped answer carries `groups: {field, total, shown, other, limit, max_limit}`, and `"other": true` gathers the rest as one `__other__` group.
123
+ - **`/aggregate` returns readable charts.** `limit` counts the groups of the first non-date field (default and ceiling `AGGREGATE_MAX_GROUPS`, 50; above it a 400); the date and the other fields are never cut. Every grouped answer carries `groups: {field, total, shown, other, limit, max_limit}`, and `"other": true` gathers the rest as one `__other__` group. `filter_by.period` deltas count in days, weeks (`"-1w"`, Monday to Sunday), months or years. A date chart (`year` to `hour`) carries every date of the period on its x axis, even with no rows at all when the period has both bounds: a date with no rows comes with `0` for `count`/`sum` and `null` for the other formulas (`weekday`, `weekdayhour` and `raw` are not filled); an axis over 10000 dates is a 400 (`easyapi.date_axis_too_long`) whose `params.fits` names the coarser grouping that fits.
124
124
  - **Conditions through M2M and reverse relations don't repeat rows.** Each one is a subquery of ids, so an `/aggregate` sum filtered by tag counts each record once. In an AND group, the rules on one relation hold on the same related row ("event X after A and before B"); a field that repeats ("tag A and tag B", the values of `all`) takes a row per repetition, with the group's other rules on each. Rules in different groups hold on different rows.
125
125
  - **Tags by id or name.** Set `tag_scope` (fields of the tag model, e.g. `{'context': 1}`, or a property such as `{'project_id': self.obj.project_id}`) and the `tags` M2M takes ids or names in POST/PATCH: a name is created in the scope when missing, a tag outside it is a 400. The detail returns `tags: [{id, name}]`.
126
126
  - **Ownership scoping.** One attribute (`owner_field = 'owner_id'`) restricts every CRUD operation to rows owned by the authenticated user — the cheapest IDOR defense I know.
@@ -16,7 +16,7 @@ from django.db.models import (
16
16
  Q, F, Case, FilteredRelation, Func, Count, Sum, Max, Min, Avg, Value, Variance, StdDev, When, Window,
17
17
  )
18
18
  from django.utils import translation
19
- import pandas as pd
19
+ from django.utils.dateparse import parse_datetime
20
20
  import pytz
21
21
 
22
22
  from .constants import CUSTOM_FIELD_PRESENTATION
@@ -556,58 +556,127 @@ def get_period(period, timezone):
556
556
  return [date_filter, start_date, end_date]
557
557
 
558
558
 
559
- def normalize_dates(results, timezone, start_date, end_date, group_by, groups):
560
- """Fill missing buckets in a date-grouped result so the chart axis is
561
- continuous (e.g. days with zero rows still appear with ``0``)."""
562
- if not results:
563
- return results
559
+ DATE_AXIS_MAX = 10_000
564
560
 
565
- start = results[0]
566
- end = results[-1]
561
+ # Finest first: the too-long error names the first coarser unit that fits.
562
+ # An int steps that many months.
563
+ DATE_AXIS_STEP = {
564
+ 'hour': timedelta(hours=1),
565
+ 'day': timedelta(days=1),
566
+ 'week': timedelta(days=7),
567
+ 'month': 1,
568
+ 'quarter': 3,
569
+ 'year': 12,
570
+ }
567
571
 
568
- if not start_date:
569
- start_date = start['date']
572
+ # A date with no rows counts nothing; an average or a maximum of nothing is not 0.
573
+ EMPTY_ZERO = ('count', 'sum')
574
+
575
+
576
+ def _bucket_start(moment, unit):
577
+ if unit == 'hour':
578
+ return moment.replace(minute=0, second=0, microsecond=0)
579
+ day = datetime(moment.year, moment.month, moment.day)
580
+ if unit == 'day':
581
+ return day
582
+ if unit == 'week':
583
+ return day - timedelta(days=day.weekday())
584
+ if unit == 'month':
585
+ return day.replace(day=1)
586
+ if unit == 'quarter':
587
+ return datetime(day.year, (day.month - 1) // 3 * 3 + 1, 1)
588
+ return datetime(day.year, 1, 1)
589
+
590
+
591
+ def _bucket_key(moment, unit):
592
+ """The label the SQL of ``EXTRACT`` gives the bucket (``DATE_FORMAT``)."""
593
+ if unit == 'year':
594
+ return f'{moment.year:04d}'
595
+ if unit == 'quarter':
596
+ return f'{moment.year:04d} {(moment.month - 1) // 3 + 1}Q'
597
+ if unit == 'week':
598
+ year, week, _ = moment.isocalendar()
599
+ return f'{year:04d}-W{week:02d}'
600
+ key = f'{moment.year:04d}-{moment.month:02d}'
601
+ if unit == 'month':
602
+ return key
603
+ key += f'-{moment.day:02d}'
604
+ if unit == 'day':
605
+ return key
606
+ return f'{key} {moment.hour:02d}'
570
607
 
571
- if not end_date:
572
- end_date = end['date']
573
608
 
574
- FREQ = {
575
- 'hour': 'H',
576
- 'day': 'D',
577
- 'month': 'MS',
578
- 'year': 'YS'
579
- }
609
+ def _bucket_from_key(key, unit):
610
+ if unit == 'year':
611
+ return datetime(int(key), 1, 1)
612
+ if unit == 'quarter':
613
+ year, quarter = key.split()
614
+ return datetime(int(year), (int(quarter[:-1]) - 1) * 3 + 1, 1)
615
+ if unit == 'week':
616
+ return datetime.strptime(f'{key}-1', '%G-W%V-%u')
617
+ return datetime.strptime(key, {'month': '%Y-%m', 'day': '%Y-%m-%d', 'hour': '%Y-%m-%d %H'}[unit])
580
618
 
581
- if USE_TZ:
582
- dates = pd.date_range(
583
- start_date, end_date, freq=FREQ[group_by.lower()], tz=timezone
584
- )
585
- else:
586
- dates = pd.date_range(
587
- start_date, end_date, freq=FREQ[group_by.lower()],
588
- )
589
619
 
590
- distinct = {}
591
- for result in results:
592
- for group in groups:
593
- if group not in distinct:
594
- distinct[group] = [result[group]]
620
+ def _local_moment(value, timezone):
621
+ if isinstance(value, str):
622
+ value = parse_datetime(value)
623
+ if value is None:
624
+ return None
625
+ if value.tzinfo is not None:
626
+ value = value.astimezone(timezone)
627
+ return value.replace(tzinfo=None)
628
+
595
629
 
596
- elif result[group] not in distinct[group]:
597
- distinct[group].append(result[group])
630
+ def _axis_points(start, end, unit):
631
+ step = DATE_AXIS_STEP[unit]
632
+ if isinstance(step, int):
633
+ return ((end.year - start.year) * 12 + end.month - start.month) // step + 1
634
+ return (end - start) // step + 1
598
635
 
599
- data = {}
600
- for i in range(len(dates)):
601
- date = dates[i]
602
- data[date] = []
603
636
 
604
- for group in distinct:
637
+ def _date_axis(start, end, unit):
638
+ """Every bucket key from ``start`` to ``end`` (bucket starts), in order."""
639
+ step = DATE_AXIS_STEP[unit]
640
+ keys = []
641
+ moment = start
642
+ while moment <= end:
643
+ keys.append(_bucket_key(moment, unit))
644
+ if isinstance(step, int):
645
+ index = moment.year * 12 + moment.month - 1 + step
646
+ moment = datetime(index // 12, index % 12 + 1, 1)
647
+ else:
648
+ moment += step
649
+ return keys
650
+
651
+
652
+ def _fill_date_axis(rows, empty, timezone, start_date, end_date, unit):
653
+ """``rows`` (``{date key: values}``) with every date of the period, the
654
+ missing ones with ``empty``. A bound the period leaves open is the first
655
+ or last date of the rows. The empty date (``None``) stays last."""
656
+ dates = [key for key in rows if key is not None]
657
+ start = _local_moment(start_date, timezone) or (dates and _bucket_from_key(min(dates), unit))
658
+ end = _local_moment(end_date, timezone) or (dates and _bucket_from_key(max(dates), unit))
659
+ if not (start and end):
660
+ return rows
661
+
662
+ points = _axis_points(_bucket_start(start, unit), _bucket_start(end, unit), unit)
663
+ if points > DATE_AXIS_MAX:
664
+ units = list(DATE_AXIS_STEP)
665
+ fits = next(
666
+ coarser for coarser in units[units.index(unit) + 1:]
667
+ if _axis_points(_bucket_start(start, coarser), _bucket_start(end, coarser), coarser) <= DATE_AXIS_MAX
668
+ )
669
+ raise HTTPException(
670
+ 400, code='easyapi.date_axis_too_long',
671
+ params={'points': points, 'max': DATE_AXIS_MAX, 'fits': fits},
672
+ )
605
673
 
606
- for item in distinct[group]:
607
- line = {}
608
- line['date'] = date
609
- line['y'] = 0
610
- line[group] = item
674
+ axis = _date_axis(_bucket_start(start, unit), _bucket_start(end, unit), unit)
675
+ # Every unit's key sorts as text in date order (four-digit year first).
676
+ ordered = sorted(set(axis) | set(dates))
677
+ if None in rows:
678
+ ordered.append(None)
679
+ return OrderedDict((key, rows[key] if key in rows else dict(empty)) for key in ordered)
611
680
 
612
681
 
613
682
  def normalize_groups(
@@ -615,11 +684,9 @@ def normalize_groups(
615
684
  ):
616
685
  """Reshape grouped results into the ``{x: {series: value}}`` structure
617
686
  the front-end expects for charts. Single-group → ``{x: {formula: value}}``.
618
- Multi-group → ``{x: {second_group_value: calc_value}}``."""
619
- if not results:
620
- return results
621
-
622
- keys = []
687
+ Multi-group → ``{x: {second_group_value: calc_value}}``. Grouped by a date
688
+ (``group_by`` of ``DATE_AXIS_STEP``), x carries every date of the period,
689
+ with or without rows."""
623
690
  values = []
624
691
 
625
692
  tmp = OrderedDict()
@@ -628,6 +695,7 @@ def normalize_groups(
628
695
  calc_key = calc[0]
629
696
 
630
697
  single_group = len(groups) == 1
698
+ keys = calc if single_group else []
631
699
  if not single_group:
632
700
  first_group = groups[1]
633
701
 
@@ -640,7 +708,6 @@ def normalize_groups(
640
708
  tmp[x_key][field] = result[field]
641
709
 
642
710
  if single_group:
643
- keys = calc
644
711
  for formula in calc:
645
712
  tmp[x_key][formula] = result[formula]
646
713
 
@@ -657,6 +724,13 @@ def normalize_groups(
657
724
  if second not in keys:
658
725
  keys.append(second)
659
726
 
727
+ unit = (group_by or '').lower()
728
+ if unit in DATE_AXIS_STEP:
729
+ empty = {field: None for field in additional_fields}
730
+ for key in keys:
731
+ empty[key] = 0 if (key if single_group else calc_key) in EMPTY_ZERO else None
732
+ tmp = _fill_date_axis(tmp, empty, timezone, start_date, end_date, unit)
733
+
660
734
  for x, results in tmp.items():
661
735
  values.append({**results, 'x': x})
662
736
 
@@ -892,7 +966,7 @@ async def get_results(timezone, data, base_queryset=None):
892
966
  ``data`` is the request body. Resolves the model, applies ``conditions``
893
967
  via ``OrmFilter``, applies ``period`` filters, and dispatches to
894
968
  ``aggregate`` (no groups) or ``group_by`` (with groups), then post-
895
- processes via ``normalize_dates``/``normalize_groups`` when applicable.
969
+ processes via ``normalize_groups`` when applicable.
896
970
 
897
971
  ``base_queryset`` lets the caller inject an already row-scoped queryset
898
972
  (e.g. role/tenant filtering done in the resource). When given, conditions
@@ -1058,15 +1132,19 @@ async def _run_results(
1058
1132
  if meta:
1059
1133
  meta['field'] = renames.get(meta['field'], meta['field'])
1060
1134
 
1135
+ # A period with no rows still answers its whole date axis, at zero.
1136
+ bounded_axis = (
1137
+ (date_group.get('group_by') or '').lower() in DATE_AXIS_STEP and start_date and end_date
1138
+ )
1061
1139
  results_keys = []
1062
- if results:
1063
- if raw:
1140
+ if raw:
1141
+ if results:
1064
1142
  results_keys = groups
1065
- else:
1066
- results, results_keys = normalize_groups(
1067
- results, additional_fields, calc, timezone, start_date, end_date,
1068
- date_group.get('group_by'), groups
1069
- )
1143
+ elif results or bounded_axis:
1144
+ results, results_keys = normalize_groups(
1145
+ results, additional_fields, calc, timezone, start_date, end_date,
1146
+ date_group.get('group_by'), groups
1147
+ )
1070
1148
 
1071
1149
  # Source text, untranslated: the front translates it like the rest of the app
1072
1150
  with translation.override(None):
@@ -445,6 +445,8 @@ class CustomFieldManager:
445
445
  def definitions(self):
446
446
  """Definitions that apply to this object. Override in a ``CustomFieldManager``
447
447
  subclass (set as ``custom_field_manager`` on the owner) to scope them (e.g. per project).
448
+ On a detail read the object has only the columns of the response: keep the column the scope
449
+ reads (e.g. ``project_id``) in the Rules' ``detail_fields``.
448
450
 
449
451
  Known limitation: the scope only applies to ``values``, ``get``, ``aset`` and ``adelete``.
450
452
  Filters, metrics and distinct reference a field by name over every definition
@@ -71,6 +71,7 @@ CODES = {
71
71
  'easyapi.aggregate_model_not_allowed': 'Aggregate not allowed for model "{model}"',
72
72
  'easyapi.invalid_formula': 'Invalid formula',
73
73
  'easyapi.aggregate_query_too_heavy': 'Query too heavy: refine the filters, shorten the period or group by a lower-cardinality field.',
74
+ 'easyapi.date_axis_too_long': 'Date axis of {points} points is above the limit of {max}; group by {fits}',
74
75
  'easyapi.queries_required': '"queries" must be a non-empty object',
75
76
  'easyapi.too_many_queries': 'At most {max} queries per batch',
76
77
  'easyapi.query_model_required': 'Every query must be an object with "model"',
@@ -768,8 +768,12 @@ class Rules(BatchRules, WriteRules):
768
768
  if embed:
769
769
  await self._attach_embed(rows, embed)
770
770
  if 'custom' in fields and view == 'detail' and issubclass(self.model, CustomFieldMixin):
771
+ # The object carries the columns already read: a manager that scopes its definitions by one
772
+ # (e.g. the project) sees it without another query.
773
+ columns = {field.attname for field in self.model._meta.concrete_fields}
771
774
  for row in rows:
772
- row['custom'] = await self.model(pk=row['pk'])._custom.values()
775
+ instance = self.model(pk=row['pk'], **{key: value for key, value in row.items() if key in columns})
776
+ row['custom'] = await instance._custom.values()
773
777
  keep = set(fields) | set(embed)
774
778
  items = [{key: value for key, value in row.items() if key in keep} for row in rows]
775
779
  # A hook that changes the items in place and returns nothing keeps them.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: easyapi-django
3
- Version: 1.35.2
3
+ Version: 1.36.0
4
4
  Summary: Zero-effort REST API (and MCP server) generator from Django models.
5
5
  Author-email: Stamatios Stamou Jr <bushier.outsets.0c@icloud.com>
6
6
  License-Expression: MIT
@@ -16,7 +16,6 @@ Description-Content-Type: text/markdown
16
16
  License-File: LICENSE
17
17
  Requires-Dist: Django>=5.0
18
18
  Requires-Dist: redis>=4.5
19
- Requires-Dist: pandas<3.0
20
19
  Requires-Dist: pytz
21
20
  Requires-Dist: jsonschema>=4
22
21
  Requires-Dist: pydantic>=2
@@ -175,7 +174,7 @@ So I cleaned up **easyapi** and put it on GitHub. REST is the core; MCP is an op
175
174
  - **Empty and null are told apart.** Filters `isnull`/`isnotnull` match NULL only; `isempty`/`isnotempty` also take `''` on text fields; none of them takes a `value` (on a custom field, both mean no value). Writes store `''` as NULL on text fields with `null=True, blank=True`.
176
175
  - **Dates are calendar days.** Named periods (`today`, `this_month`, `last_7_days`, ...) take no `value`; `last_7_days` is 7 days including today and `next_7_days` today and the 6 after it. A `YYYY-MM-DD` value is the whole calendar day. Days are cut in the user's timezone, or in the session account's with `FILTER_TIMEZONE = 'account'` (same day for every user and for background jobs), in filters, segments and `/aggregate`.
177
176
  - **One filter field over several columns.** A value kept in more than one place (a category on the record, or on its split lines) filters as one field: declare `filter_aliases = {'category_id': ['category_id', 'lines__category_id']}` on the Django model. A rule on the alias matches when any target does; a negative rule (`not_*`) or `isnull`/`isempty` matches when every target does ("no category is X"). It applies wherever conditions run: `?filter=`, saved filters and `/aggregate`. The whitelists (`filter_fields`, `AGGREGATE_FIELDS`) check the alias name, not its targets.
178
- - **`/aggregate` returns readable charts.** `limit` counts the groups of the first non-date field (default and ceiling `AGGREGATE_MAX_GROUPS`, 50; above it a 400); the date and the other fields are never cut. Every grouped answer carries `groups: {field, total, shown, other, limit, max_limit}`, and `"other": true` gathers the rest as one `__other__` group.
177
+ - **`/aggregate` returns readable charts.** `limit` counts the groups of the first non-date field (default and ceiling `AGGREGATE_MAX_GROUPS`, 50; above it a 400); the date and the other fields are never cut. Every grouped answer carries `groups: {field, total, shown, other, limit, max_limit}`, and `"other": true` gathers the rest as one `__other__` group. `filter_by.period` deltas count in days, weeks (`"-1w"`, Monday to Sunday), months or years. A date chart (`year` to `hour`) carries every date of the period on its x axis, even with no rows at all when the period has both bounds: a date with no rows comes with `0` for `count`/`sum` and `null` for the other formulas (`weekday`, `weekdayhour` and `raw` are not filled); an axis over 10000 dates is a 400 (`easyapi.date_axis_too_long`) whose `params.fits` names the coarser grouping that fits.
179
178
  - **Conditions through M2M and reverse relations don't repeat rows.** Each one is a subquery of ids, so an `/aggregate` sum filtered by tag counts each record once. In an AND group, the rules on one relation hold on the same related row ("event X after A and before B"); a field that repeats ("tag A and tag B", the values of `all`) takes a row per repetition, with the group's other rules on each. Rules in different groups hold on different rows.
180
179
  - **Tags by id or name.** Set `tag_scope` (fields of the tag model, e.g. `{'context': 1}`, or a property such as `{'project_id': self.obj.project_id}`) and the `tags` M2M takes ids or names in POST/PATCH: a name is created in the scope when missing, a tag outside it is a 400. The detail returns `tags: [{id, name}]`.
181
180
  - **Ownership scoping.** One attribute (`owner_field = 'owner_id'`) restricts every CRUD operation to rows owned by the authenticated user — the cheapest IDOR defense I know.
@@ -1,6 +1,5 @@
1
1
  Django>=5.0
2
2
  redis>=4.5
3
- pandas<3.0
4
3
  pytz
5
4
  jsonschema>=4
6
5
  pydantic>=2
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "easyapi-django"
7
- version = "1.35.2"
7
+ version = "1.36.0"
8
8
  authors = [
9
9
  { name="Stamatios Stamou Jr", email="bushier.outsets.0c@icloud.com" },
10
10
  ]
@@ -16,7 +16,6 @@ requires-python = ">=3.10"
16
16
  dependencies = [
17
17
  "Django>=5.0",
18
18
  "redis>=4.5",
19
- "pandas<3.0",
20
19
  "pytz",
21
20
  "jsonschema>=4",
22
21
  "pydantic>=2",
File without changes