hunt-framework 0.2.2__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 (237) hide show
  1. hunt_framework-0.2.2/.github/ISSUE_TEMPLATE/bug_report.md +35 -0
  2. hunt_framework-0.2.2/.github/ISSUE_TEMPLATE/config.yml +8 -0
  3. hunt_framework-0.2.2/.github/ISSUE_TEMPLATE/feature_request.md +25 -0
  4. hunt_framework-0.2.2/.github/PULL_REQUEST_TEMPLATE.md +22 -0
  5. hunt_framework-0.2.2/.github/workflows/lint.yml +29 -0
  6. hunt_framework-0.2.2/.github/workflows/publish.yml +28 -0
  7. hunt_framework-0.2.2/.github/workflows/tests.yml +34 -0
  8. hunt_framework-0.2.2/.gitignore +63 -0
  9. hunt_framework-0.2.2/CHANGELOG.md +82 -0
  10. hunt_framework-0.2.2/CODEOWNERS +1 -0
  11. hunt_framework-0.2.2/CODE_OF_CONDUCT.md +32 -0
  12. hunt_framework-0.2.2/CONTRIBUTING.md +100 -0
  13. hunt_framework-0.2.2/CONTRIBUTORS.md +11 -0
  14. hunt_framework-0.2.2/LICENSE +21 -0
  15. hunt_framework-0.2.2/PKG-INFO +567 -0
  16. hunt_framework-0.2.2/README.md +521 -0
  17. hunt_framework-0.2.2/SECURITY.md +51 -0
  18. hunt_framework-0.2.2/pyproject.toml +86 -0
  19. hunt_framework-0.2.2/src/hunt/__init__.py +15 -0
  20. hunt_framework-0.2.2/src/hunt/admin/__init__.py +53 -0
  21. hunt_framework-0.2.2/src/hunt/admin/action.py +58 -0
  22. hunt_framework-0.2.2/src/hunt/admin/application.py +211 -0
  23. hunt_framework-0.2.2/src/hunt/admin/console/__init__.py +0 -0
  24. hunt_framework-0.2.2/src/hunt/admin/console/make_admin_resource.py +140 -0
  25. hunt_framework-0.2.2/src/hunt/admin/controllers/__init__.py +0 -0
  26. hunt_framework-0.2.2/src/hunt/admin/controllers/action.py +87 -0
  27. hunt_framework-0.2.2/src/hunt/admin/controllers/dashboard.py +21 -0
  28. hunt_framework-0.2.2/src/hunt/admin/controllers/resource.py +298 -0
  29. hunt_framework-0.2.2/src/hunt/admin/controllers/search.py +53 -0
  30. hunt_framework-0.2.2/src/hunt/admin/field.py +123 -0
  31. hunt_framework-0.2.2/src/hunt/admin/fields/__init__.py +30 -0
  32. hunt_framework-0.2.2/src/hunt/admin/fields/badge.py +25 -0
  33. hunt_framework-0.2.2/src/hunt/admin/fields/belongs_to.py +21 -0
  34. hunt_framework-0.2.2/src/hunt/admin/fields/boolean.py +15 -0
  35. hunt_framework-0.2.2/src/hunt/admin/fields/datetime_.py +58 -0
  36. hunt_framework-0.2.2/src/hunt/admin/fields/has_many.py +22 -0
  37. hunt_framework-0.2.2/src/hunt/admin/fields/image.py +51 -0
  38. hunt_framework-0.2.2/src/hunt/admin/fields/number.py +43 -0
  39. hunt_framework-0.2.2/src/hunt/admin/fields/richtext.py +71 -0
  40. hunt_framework-0.2.2/src/hunt/admin/fields/select.py +30 -0
  41. hunt_framework-0.2.2/src/hunt/admin/fields/text.py +24 -0
  42. hunt_framework-0.2.2/src/hunt/admin/fields/textarea.py +16 -0
  43. hunt_framework-0.2.2/src/hunt/admin/filter.py +86 -0
  44. hunt_framework-0.2.2/src/hunt/admin/metrics/__init__.py +5 -0
  45. hunt_framework-0.2.2/src/hunt/admin/metrics/partition.py +44 -0
  46. hunt_framework-0.2.2/src/hunt/admin/metrics/trend.py +33 -0
  47. hunt_framework-0.2.2/src/hunt/admin/metrics/value.py +64 -0
  48. hunt_framework-0.2.2/src/hunt/admin/middleware/__init__.py +0 -0
  49. hunt_framework-0.2.2/src/hunt/admin/middleware/gate.py +42 -0
  50. hunt_framework-0.2.2/src/hunt/admin/navigation.py +79 -0
  51. hunt_framework-0.2.2/src/hunt/admin/resource.py +163 -0
  52. hunt_framework-0.2.2/src/hunt/admin/templates/admin/dashboard.html +87 -0
  53. hunt_framework-0.2.2/src/hunt/admin/templates/admin/layout.html +268 -0
  54. hunt_framework-0.2.2/src/hunt/admin/templates/admin/resource/_form.html +197 -0
  55. hunt_framework-0.2.2/src/hunt/admin/templates/admin/resource/create.html +79 -0
  56. hunt_framework-0.2.2/src/hunt/admin/templates/admin/resource/edit.html +84 -0
  57. hunt_framework-0.2.2/src/hunt/admin/templates/admin/resource/index.html +388 -0
  58. hunt_framework-0.2.2/src/hunt/admin/templates/admin/resource/show.html +167 -0
  59. hunt_framework-0.2.2/src/hunt/application.py +123 -0
  60. hunt_framework-0.2.2/src/hunt/auth/__init__.py +6 -0
  61. hunt_framework-0.2.2/src/hunt/auth/gate.py +155 -0
  62. hunt_framework-0.2.2/src/hunt/auth/manager.py +261 -0
  63. hunt_framework-0.2.2/src/hunt/auth/passwords.py +125 -0
  64. hunt_framework-0.2.2/src/hunt/auth/verification.py +61 -0
  65. hunt_framework-0.2.2/src/hunt/cache/__init__.py +3 -0
  66. hunt_framework-0.2.2/src/hunt/cache/manager.py +171 -0
  67. hunt_framework-0.2.2/src/hunt/config/__init__.py +4 -0
  68. hunt_framework-0.2.2/src/hunt/config/loader.py +28 -0
  69. hunt_framework-0.2.2/src/hunt/config/repository.py +33 -0
  70. hunt_framework-0.2.2/src/hunt/console/__init__.py +3 -0
  71. hunt_framework-0.2.2/src/hunt/console/command.py +9 -0
  72. hunt_framework-0.2.2/src/hunt/console/commands/__init__.py +0 -0
  73. hunt_framework-0.2.2/src/hunt/console/commands/cache.py +35 -0
  74. hunt_framework-0.2.2/src/hunt/console/commands/config_cache.py +62 -0
  75. hunt_framework-0.2.2/src/hunt/console/commands/db/__init__.py +0 -0
  76. hunt_framework-0.2.2/src/hunt/console/commands/db/seed.py +67 -0
  77. hunt_framework-0.2.2/src/hunt/console/commands/key_generate.py +33 -0
  78. hunt_framework-0.2.2/src/hunt/console/commands/make/__init__.py +11 -0
  79. hunt_framework-0.2.2/src/hunt/console/commands/make/command.py +44 -0
  80. hunt_framework-0.2.2/src/hunt/console/commands/make/controller.py +96 -0
  81. hunt_framework-0.2.2/src/hunt/console/commands/make/event.py +29 -0
  82. hunt_framework-0.2.2/src/hunt/console/commands/make/factory.py +37 -0
  83. hunt_framework-0.2.2/src/hunt/console/commands/make/job.py +37 -0
  84. hunt_framework-0.2.2/src/hunt/console/commands/make/listener.py +48 -0
  85. hunt_framework-0.2.2/src/hunt/console/commands/make/mail.py +52 -0
  86. hunt_framework-0.2.2/src/hunt/console/commands/make/middleware.py +33 -0
  87. hunt_framework-0.2.2/src/hunt/console/commands/make/migration.py +92 -0
  88. hunt_framework-0.2.2/src/hunt/console/commands/make/model.py +54 -0
  89. hunt_framework-0.2.2/src/hunt/console/commands/make/notification.py +45 -0
  90. hunt_framework-0.2.2/src/hunt/console/commands/make/observer.py +70 -0
  91. hunt_framework-0.2.2/src/hunt/console/commands/make/policy.py +59 -0
  92. hunt_framework-0.2.2/src/hunt/console/commands/make/request.py +37 -0
  93. hunt_framework-0.2.2/src/hunt/console/commands/make/resource.py +46 -0
  94. hunt_framework-0.2.2/src/hunt/console/commands/make/rule.py +39 -0
  95. hunt_framework-0.2.2/src/hunt/console/commands/make/seeder.py +30 -0
  96. hunt_framework-0.2.2/src/hunt/console/commands/migrate.py +84 -0
  97. hunt_framework-0.2.2/src/hunt/console/commands/new.py +1029 -0
  98. hunt_framework-0.2.2/src/hunt/console/commands/queue_failed.py +74 -0
  99. hunt_framework-0.2.2/src/hunt/console/commands/queue_table.py +54 -0
  100. hunt_framework-0.2.2/src/hunt/console/commands/queue_work.py +133 -0
  101. hunt_framework-0.2.2/src/hunt/console/commands/route_list.py +32 -0
  102. hunt_framework-0.2.2/src/hunt/console/commands/schedule_list.py +42 -0
  103. hunt_framework-0.2.2/src/hunt/console/commands/schedule_run.py +40 -0
  104. hunt_framework-0.2.2/src/hunt/console/commands/serve.py +27 -0
  105. hunt_framework-0.2.2/src/hunt/console/commands/storage_link.py +28 -0
  106. hunt_framework-0.2.2/src/hunt/console/commands/tinker.py +31 -0
  107. hunt_framework-0.2.2/src/hunt/console/commands/upgrade.py +213 -0
  108. hunt_framework-0.2.2/src/hunt/console/commands/view_cache.py +42 -0
  109. hunt_framework-0.2.2/src/hunt/console/kernel.py +105 -0
  110. hunt_framework-0.2.2/src/hunt/container/__init__.py +5 -0
  111. hunt_framework-0.2.2/src/hunt/container/container.py +118 -0
  112. hunt_framework-0.2.2/src/hunt/container/facade.py +40 -0
  113. hunt_framework-0.2.2/src/hunt/container/provider.py +17 -0
  114. hunt_framework-0.2.2/src/hunt/database/__init__.py +5 -0
  115. hunt_framework-0.2.2/src/hunt/database/connection.py +100 -0
  116. hunt_framework-0.2.2/src/hunt/database/factory.py +82 -0
  117. hunt_framework-0.2.2/src/hunt/database/model.py +394 -0
  118. hunt_framework-0.2.2/src/hunt/database/query_builder.py +545 -0
  119. hunt_framework-0.2.2/src/hunt/database/relations/__init__.py +6 -0
  120. hunt_framework-0.2.2/src/hunt/database/relations/belongs_to.py +45 -0
  121. hunt_framework-0.2.2/src/hunt/database/relations/belongs_to_many.py +134 -0
  122. hunt_framework-0.2.2/src/hunt/database/relations/has_many.py +47 -0
  123. hunt_framework-0.2.2/src/hunt/database/relations/has_one.py +43 -0
  124. hunt_framework-0.2.2/src/hunt/database/schema/__init__.py +5 -0
  125. hunt_framework-0.2.2/src/hunt/database/schema/blueprint.py +360 -0
  126. hunt_framework-0.2.2/src/hunt/database/schema/builder.py +250 -0
  127. hunt_framework-0.2.2/src/hunt/database/schema/migration.py +139 -0
  128. hunt_framework-0.2.2/src/hunt/database/seeder.py +13 -0
  129. hunt_framework-0.2.2/src/hunt/events/__init__.py +5 -0
  130. hunt_framework-0.2.2/src/hunt/events/dispatcher.py +59 -0
  131. hunt_framework-0.2.2/src/hunt/events/provider.py +103 -0
  132. hunt_framework-0.2.2/src/hunt/events/queued.py +89 -0
  133. hunt_framework-0.2.2/src/hunt/exceptions/__init__.py +0 -0
  134. hunt_framework-0.2.2/src/hunt/exceptions/handler.py +96 -0
  135. hunt_framework-0.2.2/src/hunt/http/__init__.py +32 -0
  136. hunt_framework-0.2.2/src/hunt/http/client.py +383 -0
  137. hunt_framework-0.2.2/src/hunt/http/controller.py +37 -0
  138. hunt_framework-0.2.2/src/hunt/http/kernel.py +287 -0
  139. hunt_framework-0.2.2/src/hunt/http/middleware/__init__.py +15 -0
  140. hunt_framework-0.2.2/src/hunt/http/middleware/authenticate.py +21 -0
  141. hunt_framework-0.2.2/src/hunt/http/middleware/cors.py +64 -0
  142. hunt_framework-0.2.2/src/hunt/http/middleware/csrf.py +45 -0
  143. hunt_framework-0.2.2/src/hunt/http/middleware/session.py +79 -0
  144. hunt_framework-0.2.2/src/hunt/http/middleware/throttle.py +55 -0
  145. hunt_framework-0.2.2/src/hunt/http/middleware/verified.py +20 -0
  146. hunt_framework-0.2.2/src/hunt/http/request.py +373 -0
  147. hunt_framework-0.2.2/src/hunt/http/response.py +206 -0
  148. hunt_framework-0.2.2/src/hunt/http/route.py +65 -0
  149. hunt_framework-0.2.2/src/hunt/http/router.py +139 -0
  150. hunt_framework-0.2.2/src/hunt/log/__init__.py +3 -0
  151. hunt_framework-0.2.2/src/hunt/log/manager.py +80 -0
  152. hunt_framework-0.2.2/src/hunt/mail/__init__.py +5 -0
  153. hunt_framework-0.2.2/src/hunt/mail/mailable.py +130 -0
  154. hunt_framework-0.2.2/src/hunt/mail/manager.py +312 -0
  155. hunt_framework-0.2.2/src/hunt/mail/message.py +71 -0
  156. hunt_framework-0.2.2/src/hunt/notifications/__init__.py +5 -0
  157. hunt_framework-0.2.2/src/hunt/notifications/channels/__init__.py +0 -0
  158. hunt_framework-0.2.2/src/hunt/notifications/channels/database.py +50 -0
  159. hunt_framework-0.2.2/src/hunt/notifications/channels/mail.py +35 -0
  160. hunt_framework-0.2.2/src/hunt/notifications/fake.py +81 -0
  161. hunt_framework-0.2.2/src/hunt/notifications/notifiable.py +144 -0
  162. hunt_framework-0.2.2/src/hunt/notifications/notification.py +53 -0
  163. hunt_framework-0.2.2/src/hunt/queue/__init__.py +4 -0
  164. hunt_framework-0.2.2/src/hunt/queue/drivers/__init__.py +0 -0
  165. hunt_framework-0.2.2/src/hunt/queue/drivers/database.py +128 -0
  166. hunt_framework-0.2.2/src/hunt/queue/drivers/redis.py +131 -0
  167. hunt_framework-0.2.2/src/hunt/queue/drivers/sync.py +37 -0
  168. hunt_framework-0.2.2/src/hunt/queue/job.py +40 -0
  169. hunt_framework-0.2.2/src/hunt/queue/manager.py +44 -0
  170. hunt_framework-0.2.2/src/hunt/scheduling/__init__.py +3 -0
  171. hunt_framework-0.2.2/src/hunt/scheduling/cron.py +52 -0
  172. hunt_framework-0.2.2/src/hunt/scheduling/scheduler.py +345 -0
  173. hunt_framework-0.2.2/src/hunt/security/__init__.py +0 -0
  174. hunt_framework-0.2.2/src/hunt/security/signing.py +42 -0
  175. hunt_framework-0.2.2/src/hunt/session/__init__.py +3 -0
  176. hunt_framework-0.2.2/src/hunt/session/store.py +144 -0
  177. hunt_framework-0.2.2/src/hunt/storage/__init__.py +5 -0
  178. hunt_framework-0.2.2/src/hunt/storage/local.py +221 -0
  179. hunt_framework-0.2.2/src/hunt/storage/manager.py +59 -0
  180. hunt_framework-0.2.2/src/hunt/storage/s3.py +121 -0
  181. hunt_framework-0.2.2/src/hunt/support/__init__.py +33 -0
  182. hunt_framework-0.2.2/src/hunt/support/collection.py +171 -0
  183. hunt_framework-0.2.2/src/hunt/support/helpers.py +152 -0
  184. hunt_framework-0.2.2/src/hunt/support/str.py +176 -0
  185. hunt_framework-0.2.2/src/hunt/testing/__init__.py +4 -0
  186. hunt_framework-0.2.2/src/hunt/testing/fakes.py +186 -0
  187. hunt_framework-0.2.2/src/hunt/testing/test_case.py +278 -0
  188. hunt_framework-0.2.2/src/hunt/translation/__init__.py +4 -0
  189. hunt_framework-0.2.2/src/hunt/translation/provider.py +21 -0
  190. hunt_framework-0.2.2/src/hunt/translation/translator.py +210 -0
  191. hunt_framework-0.2.2/src/hunt/validation/__init__.py +4 -0
  192. hunt_framework-0.2.2/src/hunt/validation/form_request.py +38 -0
  193. hunt_framework-0.2.2/src/hunt/validation/rules.py +521 -0
  194. hunt_framework-0.2.2/src/hunt/validation/validator.py +137 -0
  195. hunt_framework-0.2.2/src/hunt/view/__init__.py +4 -0
  196. hunt_framework-0.2.2/src/hunt/view/directives.py +568 -0
  197. hunt_framework-0.2.2/src/hunt/view/factory.py +206 -0
  198. hunt_framework-0.2.2/src/hunt/views/auth/forgot_password.html +25 -0
  199. hunt_framework-0.2.2/src/hunt/views/auth/layout.html +39 -0
  200. hunt_framework-0.2.2/src/hunt/views/auth/login.html +35 -0
  201. hunt_framework-0.2.2/src/hunt/views/auth/register.html +33 -0
  202. hunt_framework-0.2.2/src/hunt/views/auth/reset_password.html +29 -0
  203. hunt_framework-0.2.2/stubs/controller.stub +8 -0
  204. hunt_framework-0.2.2/stubs/middleware.stub +8 -0
  205. hunt_framework-0.2.2/stubs/migration.stub +14 -0
  206. hunt_framework-0.2.2/stubs/model.stub +7 -0
  207. hunt_framework-0.2.2/tests/__init__.py +0 -0
  208. hunt_framework-0.2.2/tests/feature/__init__.py +0 -0
  209. hunt_framework-0.2.2/tests/feature/test_http.py +44 -0
  210. hunt_framework-0.2.2/tests/unit/__init__.py +0 -0
  211. hunt_framework-0.2.2/tests/unit/test_cache_commands.py +78 -0
  212. hunt_framework-0.2.2/tests/unit/test_container.py +46 -0
  213. hunt_framework-0.2.2/tests/unit/test_directives.py +48 -0
  214. hunt_framework-0.2.2/tests/unit/test_event_service_provider.py +155 -0
  215. hunt_framework-0.2.2/tests/unit/test_key_generate.py +70 -0
  216. hunt_framework-0.2.2/tests/unit/test_make_admin_resource.py +201 -0
  217. hunt_framework-0.2.2/tests/unit/test_make_commands.py +333 -0
  218. hunt_framework-0.2.2/tests/unit/test_model.py +74 -0
  219. hunt_framework-0.2.2/tests/unit/test_phase_a.py +746 -0
  220. hunt_framework-0.2.2/tests/unit/test_phase_b.py +684 -0
  221. hunt_framework-0.2.2/tests/unit/test_phase_c.py +601 -0
  222. hunt_framework-0.2.2/tests/unit/test_phase_d.py +693 -0
  223. hunt_framework-0.2.2/tests/unit/test_phase_e.py +531 -0
  224. hunt_framework-0.2.2/tests/unit/test_phase_f.py +649 -0
  225. hunt_framework-0.2.2/tests/unit/test_phase_g.py +696 -0
  226. hunt_framework-0.2.2/tests/unit/test_phase_h.py +350 -0
  227. hunt_framework-0.2.2/tests/unit/test_phase_i.py +436 -0
  228. hunt_framework-0.2.2/tests/unit/test_phase_j.py +815 -0
  229. hunt_framework-0.2.2/tests/unit/test_phase_k.py +504 -0
  230. hunt_framework-0.2.2/tests/unit/test_phase_l.py +532 -0
  231. hunt_framework-0.2.2/tests/unit/test_phase_m.py +381 -0
  232. hunt_framework-0.2.2/tests/unit/test_route_list.py +52 -0
  233. hunt_framework-0.2.2/tests/unit/test_router.py +38 -0
  234. hunt_framework-0.2.2/tests/unit/test_scheduler.py +306 -0
  235. hunt_framework-0.2.2/tests/unit/test_upgrade.py +231 -0
  236. hunt_framework-0.2.2/tests/unit/test_validation.py +46 -0
  237. hunt_framework-0.2.2/uv.lock +1211 -0
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: Bug report
3
+ about: Report a reproducible bug in hunt
4
+ labels: bug
5
+ ---
6
+
7
+ ## Description
8
+
9
+ A clear description of the bug.
10
+
11
+ ## hunt version
12
+
13
+ <!-- Output of: python -c "import hunt; print(hunt.__version__)" -->
14
+
15
+ ## Python version
16
+
17
+ <!-- Output of: python --version -->
18
+
19
+ ## Minimal reproduction
20
+
21
+ ```python
22
+ # Paste the smallest possible code that demonstrates the bug
23
+ ```
24
+
25
+ ## Expected behaviour
26
+
27
+ What you expected to happen.
28
+
29
+ ## Actual behaviour
30
+
31
+ What actually happened. Include the full traceback if applicable.
32
+
33
+ ## Additional context
34
+
35
+ Any other information that might help (OS, database driver, etc.).
@@ -0,0 +1,8 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Documentation
4
+ url: https://hunt-framework.com/docs/installation
5
+ about: Check the docs before opening an issue
6
+ - name: Security vulnerability
7
+ url: https://github.com/hunt-core/hunt/security/advisories/new
8
+ about: Please report security issues privately
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: Feature request
3
+ about: Propose a new feature or improvement
4
+ labels: enhancement
5
+ ---
6
+
7
+ ## Problem
8
+
9
+ What problem does this feature solve? Who benefits and how often does this come up?
10
+
11
+ ## Proposed solution
12
+
13
+ Describe the API or behaviour you have in mind. Code examples are helpful.
14
+
15
+ ```python
16
+ # How would it look to use this feature?
17
+ ```
18
+
19
+ ## Alternatives considered
20
+
21
+ Other approaches you considered and why you prefer this one.
22
+
23
+ ## Additional context
24
+
25
+ Links, prior art, or anything else relevant.
@@ -0,0 +1,22 @@
1
+ ## What does this PR do?
2
+
3
+ <!-- A concise description of the change. -->
4
+
5
+ ## Why?
6
+
7
+ <!-- The motivation — link an issue if one exists. -->
8
+
9
+ ## Type of change
10
+
11
+ - [ ] Bug fix
12
+ - [ ] New feature
13
+ - [ ] Refactor / cleanup
14
+ - [ ] Documentation
15
+ - [ ] Tests only
16
+
17
+ ## Checklist
18
+
19
+ - [ ] `pytest` passes with no new failures
20
+ - [ ] New behaviour is covered by tests
21
+ - [ ] No unrelated changes included
22
+ - [ ] CHANGELOG.md updated (maintainers will do this on merge if you prefer)
@@ -0,0 +1,29 @@
1
+ name: Lint
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ lint:
11
+ name: Ruff
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - name: Install uv
18
+ uses: astral-sh/setup-uv@v4
19
+ with:
20
+ version: "latest"
21
+
22
+ - name: Install ruff
23
+ run: uv tool install ruff
24
+
25
+ - name: Lint
26
+ run: uv tool run ruff check src/
27
+
28
+ - name: Format
29
+ run: uv tool run ruff format --check src/
@@ -0,0 +1,28 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ publish:
10
+ name: Build and publish
11
+ runs-on: ubuntu-latest
12
+ environment: pypi
13
+ permissions:
14
+ id-token: write # for trusted publishing
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Install uv
20
+ uses: astral-sh/setup-uv@v4
21
+ with:
22
+ version: "latest"
23
+
24
+ - name: Build
25
+ run: uv build
26
+
27
+ - name: Publish to PyPI
28
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,34 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ name: Python ${{ matrix.python-version }}
12
+ runs-on: ubuntu-latest
13
+
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ python-version: ["3.11", "3.12", "3.13"]
18
+
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+
22
+ - name: Install uv
23
+ uses: astral-sh/setup-uv@v4
24
+ with:
25
+ version: "latest"
26
+
27
+ - name: Set up Python ${{ matrix.python-version }}
28
+ run: uv python install ${{ matrix.python-version }}
29
+
30
+ - name: Install dependencies
31
+ run: uv sync --extra dev
32
+
33
+ - name: Run tests
34
+ run: uv run pytest --tb=short -q
@@ -0,0 +1,63 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.pyo
5
+ *.pyd
6
+ .Python
7
+
8
+ # Build / distribution
9
+ dist/
10
+ build/
11
+ *.egg-info/
12
+ *.egg
13
+ .eggs/
14
+
15
+ # Virtual environments
16
+ .venv/
17
+ venv/
18
+ env/
19
+ ENV/
20
+
21
+ # uv
22
+ .uv/
23
+
24
+ # Testing
25
+ .pytest_cache/
26
+ .coverage
27
+ coverage.xml
28
+ htmlcov/
29
+ .tox/
30
+
31
+ # Type checking
32
+ .mypy_cache/
33
+ .pyright/
34
+ .ruff_cache/
35
+
36
+ # IDEs
37
+ .idea/
38
+ *.iml
39
+ *.ipr
40
+ *.iws
41
+ .vscode/
42
+ *.swp
43
+ *.swo
44
+ *~
45
+
46
+ # Environment / secrets
47
+ .env
48
+ .env.*
49
+ !.env.example
50
+
51
+ # Compiled views cache
52
+ storage/framework/views/
53
+
54
+ # Logs
55
+ storage/logs/
56
+ *.log
57
+
58
+ # OS
59
+ .DS_Store
60
+ Thumbs.db
61
+ admin_plan.md
62
+ .claude
63
+ /templates
@@ -0,0 +1,82 @@
1
+ # Changelog
2
+
3
+ All notable changes to hunt are documented here.
4
+
5
+ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
6
+ hunt uses [semantic versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ---
9
+
10
+ ## [Unreleased]
11
+
12
+ ---
13
+
14
+ ## [0.2.0] — 2026-05-14
15
+
16
+ ### Added
17
+
18
+ **Admin panel**
19
+ - Full admin panel at `/hunt-admin` with resource CRUD, index filtering, sorting, and pagination
20
+ - Field types: `Text`, `Email`, `Password`, `Textarea`, `RichText`, `Number`, `Boolean`, `Select`, `Image`, `DateTime`, `BelongsTo`, `HasMany`, `Badge`
21
+ - Fluent field API: `.sortable()`, `.readonly()`, `.rules()`, `.hide_from_forms()`, `.show_on_index()`, `.hide_from_index()`, etc.
22
+ - Filter system with `SelectFilter`, `BooleanFilter`, `TrashedFilter`; options accept both dict and tuple formats
23
+ - Action system with `ActionResponse.success()`, `ActionResponse.error()`, `ActionResponse.redirect()`
24
+ - Metric cards: `ValueMetric`, `TrendMetric`, `PartitionMetric`
25
+ - Global search across all registered resources, results grouped by resource with "View all" links
26
+ - Navigation API: `NavGroup`, `NavResource`, `NavLink` with backward-compatible auto-generated sidebar
27
+ - `hunt make:admin-resource` command — scaffolds and auto-registers an `AdminResource`; accepts both `Post` and `post` as the model argument
28
+
29
+ **Authentication**
30
+ - Session-backed auth via `Auth.attempt()`, `Auth.login()`, `Auth.logout()`, `Auth.user()`, `Auth.check()`
31
+ - Full login / registration / forgot-password / reset-password scaffold via `hunt new`
32
+ - Auth feature flags in `config/auth.py` (`registration`, `login`, `forgot_password`) — disabled features remove routes entirely and hide corresponding links in built-in auth views
33
+ - Session ID regenerated on login to prevent session fixation
34
+
35
+ **CLI**
36
+ - `hunt new` — scaffold a complete application with auth, admin, migrations, and config files; auto-generates `APP_KEY` in `.env`
37
+ - `hunt upgrade` — add missing scaffold files to existing projects; shows unified diff for locally modified files; creates new config files (e.g. `config/auth.py`) without overwriting customised ones
38
+ - `hunt schedule:list` / `hunt schedule:run` — list and run scheduled tasks
39
+ - `hunt queue:work` / `hunt queue:failed` / `hunt queue:flush` / `hunt queue:retry` — queue worker and failed job management
40
+ - Full `make:*` suite: `model`, `controller`, `migration`, `middleware`, `event`, `listener`, `job`, `mail`, `seeder`, `factory`, `command`, `request`, `resource`, `rule`, `policy`, `observer`, `notification`, `admin-resource`
41
+
42
+ **Queue system**
43
+ - Sync, database, and Redis queue drivers
44
+ - CAS-based pop in the database driver prevents race conditions under concurrent workers
45
+ - Job chaining, delayed dispatch, configurable retries and backoff
46
+ - `queue:work --once` for single-job processing
47
+
48
+ **Scheduler**
49
+ - Cron-expression scheduler with `every_minute()`, `hourly()`, `daily()`, `weekly()`, `monthly()`, and arbitrary `.cron()` expressions
50
+ - Constraint modifiers: `.environments()`, `.when()`, `.skip()`, `.between()`
51
+ - Background execution, output capture, lifecycle hooks (`.on_success()`, `.on_failure()`), health-check pings
52
+
53
+ **Templates & views**
54
+ - hunt template syntax: `@extends`, `@section`, `@yield`, `@include`, `@foreach`, `@if`, `@auth`, `@guest`, `@csrf`, `@error`, `@env`
55
+ - `ViewFactory` automatically injects `config()`, `csrf_token`, `auth_user`, `request`, `can()`, and flash data into every template
56
+ - View composers and shared variables
57
+
58
+ **Security**
59
+ - CSRF protection middleware with per-session tokens
60
+ - Static file server blocks dangerous extensions: `.py`, `.env`, `.sh`, `.svg`, `.php`, and more
61
+ - `Image` field excludes SVG from allowed upload MIME types by default
62
+ - bcrypt password hashing via `hash_password()`
63
+ - HTML output auto-escaped; raw output requires explicit `{!! !!}` syntax
64
+
65
+ **Other**
66
+ - ORM with `where`, `or_where`, `order_by`, `limit`, `paginate`, `first_or_create`, `find_or_fail`, soft deletes, relationships (`has_one`, `has_many`, `belongs_to`)
67
+ - Event/listener system with `Dispatcher.dispatch_sync()` and the `event()` helper
68
+ - Validation with 15+ built-in rules including `unique`, `confirmed`, `regex`, `in`
69
+ - Storage system with local and S3 drivers; `storage:link` command
70
+ - Cache system with file and Redis drivers
71
+ - Mail system with SMTP and log transports
72
+ - Translation / localisation support
73
+ - `hunt tinker` — interactive REPL with full application context
74
+
75
+ ### Fixed
76
+ - `make:admin-resource` normalises PascalCase model names to the correct lowercase filename
77
+ - Scaffolded `layout.html` uses `config('key', default)` function syntax (not `.get()`)
78
+
79
+ ---
80
+
81
+ [Unreleased]: https://github.com/hunt-core/hunt/compare/v0.2.0...HEAD
82
+ [0.2.0]: https://github.com/hunt-core/hunt/releases/tag/v0.2.0
@@ -0,0 +1 @@
1
+ * @0xsyk0
@@ -0,0 +1,32 @@
1
+ # Code of Conduct
2
+
3
+ ## Our pledge
4
+
5
+ We are committed to making participation in the hunt project a welcoming experience for everyone, regardless of age, body size, disability, ethnicity, gender identity, level of experience, nationality, personal appearance, race, religion, or sexual identity.
6
+
7
+ ## Our standards
8
+
9
+ **Encouraged behaviour:**
10
+
11
+ - Using welcoming and inclusive language
12
+ - Being respectful of differing viewpoints and experiences
13
+ - Accepting constructive criticism gracefully
14
+ - Focusing on what is best for the community
15
+ - Showing empathy towards other community members
16
+
17
+ **Unacceptable behaviour:**
18
+
19
+ - Harassment, insults, or derogatory comments
20
+ - Personal or political attacks
21
+ - Publishing others' private information without consent
22
+ - Any conduct that would reasonably be considered inappropriate in a professional setting
23
+
24
+ ## Enforcement
25
+
26
+ Instances of unacceptable behaviour may be reported by opening a private discussion or contacting the maintainers directly. All reports will be reviewed and investigated and will result in a response deemed appropriate to the circumstances. Maintainers are obligated to maintain confidentiality.
27
+
28
+ Maintainers who do not follow or enforce this Code of Conduct in good faith may face temporary or permanent repercussions.
29
+
30
+ ## Attribution
31
+
32
+ This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1.
@@ -0,0 +1,100 @@
1
+ # Contributing to hunt
2
+
3
+ Thank you for your interest in contributing. hunt is a small, focused framework — contributions that keep it simple and well-tested are most welcome.
4
+
5
+ ---
6
+
7
+ ## Ways to contribute
8
+
9
+ - **Bug reports** — open an issue with a minimal reproduction case
10
+ - **Bug fixes** — open a PR against `main` with a test that fails before your fix and passes after
11
+ - **Documentation** — fixes, clarifications, and new examples in the docs site (hunt-docs)
12
+ - **Feature proposals** — open an issue first to discuss before writing code; small focused features are preferred over large ones
13
+
14
+ ---
15
+
16
+ ## Development setup
17
+
18
+ Requirements: Python 3.11+, [uv](https://docs.astral.sh/uv/)
19
+
20
+ ```bash
21
+ git clone git@github.com:hunt-core/hunt.git
22
+ cd hunt
23
+ uv venv && uv pip install -e ".[dev]"
24
+ ```
25
+
26
+ Run the test suite:
27
+
28
+ ```bash
29
+ pytest
30
+ ```
31
+
32
+ ---
33
+
34
+ ## Code style
35
+
36
+ hunt uses [Ruff](https://docs.astral.sh/ruff/) for linting and formatting (configured in `pyproject.toml`).
37
+
38
+ ```bash
39
+ uv tool run ruff check src/ # lint
40
+ uv tool run ruff format src/ # format
41
+ uv tool run ruff check src/ --fix # auto-fix lint issues
42
+ ```
43
+
44
+ Rules enforced: `E`, `W`, `F`, `I` (import order), `UP` (pyupgrade), `B` (bugbear), `RUF`. Line length 120.
45
+
46
+ CI will fail if either check reports errors, so run both before opening a PR.
47
+
48
+ Additional conventions:
49
+
50
+ - Type annotations on all public functions and methods
51
+ - No comments unless the *why* is genuinely non-obvious
52
+ - No docstrings on simple functions — the name and types should speak for themselves
53
+
54
+ ---
55
+
56
+ ## Tests
57
+
58
+ Every bug fix must include a regression test. New features must include tests covering the happy path and at least one edge case. Tests live in `tests/` and use pytest.
59
+
60
+ ```bash
61
+ pytest # run all tests
62
+ pytest tests/test_orm.py # run a specific file
63
+ pytest -k "test_create" # run matching tests
64
+ ```
65
+
66
+ ---
67
+
68
+ ## Pull requests
69
+
70
+ 1. Fork the repository and create a branch from `main`
71
+ 2. Make your changes — keep commits small and focused
72
+ 3. Ensure `ruff check src/`, `ruff format --check src/`, and `pytest` all pass
73
+ 4. Open a PR against `main` with a clear description of the change and why
74
+
75
+ PR titles should follow the pattern:
76
+
77
+ ```
78
+ fix: <short description>
79
+ feat: <short description>
80
+ docs: <short description>
81
+ refactor: <short description>
82
+ ```
83
+
84
+ ---
85
+
86
+ ## Versioning
87
+
88
+ hunt increments the patch version (third number) for every change. You do not need to bump the version in your PR — maintainers handle that on merge.
89
+
90
+ ---
91
+
92
+ ## Reporting security issues
93
+
94
+ Do **not** open a public issue for security vulnerabilities. See [SECURITY.md](SECURITY.md) for the responsible disclosure process.
95
+
96
+ ---
97
+
98
+ ## License
99
+
100
+ By contributing you agree that your contributions will be licensed under the [MIT License](LICENSE).
@@ -0,0 +1,11 @@
1
+ # Contributors
2
+
3
+ Thank you to everyone who has contributed to hunt.
4
+
5
+ ## Core maintainers
6
+
7
+ - **0xsyk0** ([@0xsyk0](https://github.com/0xsyk0)) — creator and lead maintainer
8
+
9
+ ---
10
+
11
+ *To add yourself here, open a PR after your first contribution is merged.*
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 hunt contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.