quater 0.1.0a1__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 (219) hide show
  1. quater-0.1.0a1/.github/dependabot.yml +31 -0
  2. quater-0.1.0a1/.github/workflows/ci.yml +110 -0
  3. quater-0.1.0a1/.github/workflows/release.yml +255 -0
  4. quater-0.1.0a1/.gitignore +31 -0
  5. quater-0.1.0a1/Cargo.lock +140 -0
  6. quater-0.1.0a1/Cargo.toml +18 -0
  7. quater-0.1.0a1/LICENSE +21 -0
  8. quater-0.1.0a1/PKG-INFO +244 -0
  9. quater-0.1.0a1/README.md +215 -0
  10. quater-0.1.0a1/agent-skills/README.md +36 -0
  11. quater-0.1.0a1/agent-skills/quater-apps/SKILL.md +79 -0
  12. quater-0.1.0a1/agent-skills/quater-apps/agents/openai.yaml +4 -0
  13. quater-0.1.0a1/agent-skills/quater-apps/references/auth.md +56 -0
  14. quater-0.1.0a1/agent-skills/quater-apps/references/cli-actions.md +109 -0
  15. quater-0.1.0a1/agent-skills/quater-apps/references/mcp.md +88 -0
  16. quater-0.1.0a1/agent-skills/quater-apps/references/safety.md +67 -0
  17. quater-0.1.0a1/agent-skills/quater-framework/SKILL.md +82 -0
  18. quater-0.1.0a1/agent-skills/quater-framework/agents/openai.yaml +4 -0
  19. quater-0.1.0a1/agent-skills/quater-framework/references/app-patterns.md +112 -0
  20. quater-0.1.0a1/agent-skills/quater-framework/references/deployment.md +68 -0
  21. quater-0.1.0a1/agent-skills/quater-framework/references/resources-testing.md +101 -0
  22. quater-0.1.0a1/agent-skills/quater-framework/references/surfaces.md +79 -0
  23. quater-0.1.0a1/docs/.vitepress/config.mts +211 -0
  24. quater-0.1.0a1/docs/.vitepress/theme/components/MermaidDiagram.vue +75 -0
  25. quater-0.1.0a1/docs/.vitepress/theme/index.ts +11 -0
  26. quater-0.1.0a1/docs/.vitepress/theme/style.css +75 -0
  27. quater-0.1.0a1/docs/en/latest/actions.md +426 -0
  28. quater-0.1.0a1/docs/en/latest/api.md +404 -0
  29. quater-0.1.0a1/docs/en/latest/auth-model.md +147 -0
  30. quater-0.1.0a1/docs/en/latest/changelog.md +54 -0
  31. quater-0.1.0a1/docs/en/latest/deployment.md +228 -0
  32. quater-0.1.0a1/docs/en/latest/index.md +212 -0
  33. quater-0.1.0a1/docs/en/latest/known-limitations.md +55 -0
  34. quater-0.1.0a1/docs/en/latest/mcp.md +307 -0
  35. quater-0.1.0a1/docs/en/latest/middleware-errors.md +138 -0
  36. quater-0.1.0a1/docs/en/latest/quickstart.md +297 -0
  37. quater-0.1.0a1/docs/en/latest/reference/application.md +347 -0
  38. quater-0.1.0a1/docs/en/latest/reference/auth.md +219 -0
  39. quater-0.1.0a1/docs/en/latest/reference/index.md +54 -0
  40. quater-0.1.0a1/docs/en/latest/reference/observability.md +145 -0
  41. quater-0.1.0a1/docs/en/latest/reference/parameters.md +269 -0
  42. quater-0.1.0a1/docs/en/latest/reference/request.md +300 -0
  43. quater-0.1.0a1/docs/en/latest/reference/resources.md +105 -0
  44. quater-0.1.0a1/docs/en/latest/reference/responses.md +164 -0
  45. quater-0.1.0a1/docs/en/latest/reference/testing.md +162 -0
  46. quater-0.1.0a1/docs/en/latest/resources.md +228 -0
  47. quater-0.1.0a1/docs/en/latest/routes-handlers.md +160 -0
  48. quater-0.1.0a1/docs/en/latest/security.md +290 -0
  49. quater-0.1.0a1/docs/en/latest/stability.md +104 -0
  50. quater-0.1.0a1/docs/en/latest/surfaces.md +121 -0
  51. quater-0.1.0a1/docs/en/latest/testing.md +345 -0
  52. quater-0.1.0a1/docs/en/latest/why-quater.md +89 -0
  53. quater-0.1.0a1/docs/index.md +121 -0
  54. quater-0.1.0a1/docs/public/logo-black-bg.svg +8 -0
  55. quater-0.1.0a1/docs/public/logo-no-bg.svg +7 -0
  56. quater-0.1.0a1/docs/public/logo-white-bg.svg +8 -0
  57. quater-0.1.0a1/examples/__init__.py +1 -0
  58. quater-0.1.0a1/examples/asgi_compat.py +5 -0
  59. quater-0.1.0a1/examples/auth_and_mcp.py +49 -0
  60. quater-0.1.0a1/examples/basic_app.py +20 -0
  61. quater-0.1.0a1/examples/wsgi_compat.py +5 -0
  62. quater-0.1.0a1/native/router/src/lib.rs +227 -0
  63. quater-0.1.0a1/package-lock.json +3826 -0
  64. quater-0.1.0a1/package.json +22 -0
  65. quater-0.1.0a1/pyproject.toml +103 -0
  66. quater-0.1.0a1/release/0.1.0a1.md +54 -0
  67. quater-0.1.0a1/scripts/generate_reference.py +2319 -0
  68. quater-0.1.0a1/scripts/snapshot-docs-version.mjs +48 -0
  69. quater-0.1.0a1/src/quater/__init__.py +70 -0
  70. quater-0.1.0a1/src/quater/_api_boundary.py +88 -0
  71. quater-0.1.0a1/src/quater/_finalize.py +96 -0
  72. quater-0.1.0a1/src/quater/_parameters.py +198 -0
  73. quater-0.1.0a1/src/quater/_router.pyi +22 -0
  74. quater-0.1.0a1/src/quater/_state.py +21 -0
  75. quater-0.1.0a1/src/quater/actions/__init__.py +1 -0
  76. quater-0.1.0a1/src/quater/actions/approval.py +82 -0
  77. quater-0.1.0a1/src/quater/actions/descriptions.py +45 -0
  78. quater-0.1.0a1/src/quater/actions/executor.py +512 -0
  79. quater-0.1.0a1/src/quater/actions/registry.py +82 -0
  80. quater-0.1.0a1/src/quater/adapters/__init__.py +7 -0
  81. quater-0.1.0a1/src/quater/adapters/_shared.py +100 -0
  82. quater-0.1.0a1/src/quater/adapters/asgi.py +203 -0
  83. quater-0.1.0a1/src/quater/adapters/rsgi.py +142 -0
  84. quater-0.1.0a1/src/quater/adapters/wsgi.py +157 -0
  85. quater-0.1.0a1/src/quater/app.py +1274 -0
  86. quater-0.1.0a1/src/quater/auth.py +29 -0
  87. quater-0.1.0a1/src/quater/cli/__init__.py +1 -0
  88. quater-0.1.0a1/src/quater/cli/apps.py +57 -0
  89. quater-0.1.0a1/src/quater/cli/client.py +134 -0
  90. quater-0.1.0a1/src/quater/cli/discovery.py +229 -0
  91. quater-0.1.0a1/src/quater/cli/errors.py +54 -0
  92. quater-0.1.0a1/src/quater/cli/main.py +523 -0
  93. quater-0.1.0a1/src/quater/cli/output.py +380 -0
  94. quater-0.1.0a1/src/quater/cli/parsing.py +83 -0
  95. quater-0.1.0a1/src/quater/cli/remotes.py +146 -0
  96. quater-0.1.0a1/src/quater/cli/server.py +130 -0
  97. quater-0.1.0a1/src/quater/config.py +390 -0
  98. quater-0.1.0a1/src/quater/cookies.py +87 -0
  99. quater-0.1.0a1/src/quater/core.py +31 -0
  100. quater-0.1.0a1/src/quater/cors.py +223 -0
  101. quater-0.1.0a1/src/quater/datastructures.py +180 -0
  102. quater-0.1.0a1/src/quater/dependencies.py +214 -0
  103. quater-0.1.0a1/src/quater/deployment.py +41 -0
  104. quater-0.1.0a1/src/quater/docs/__init__.py +1 -0
  105. quater-0.1.0a1/src/quater/docs/html.py +261 -0
  106. quater-0.1.0a1/src/quater/docs/openapi.py +274 -0
  107. quater-0.1.0a1/src/quater/docs/swagger.py +87 -0
  108. quater-0.1.0a1/src/quater/exceptions.py +120 -0
  109. quater-0.1.0a1/src/quater/formdata.py +377 -0
  110. quater-0.1.0a1/src/quater/groups.py +625 -0
  111. quater-0.1.0a1/src/quater/lifespan.py +86 -0
  112. quater-0.1.0a1/src/quater/middleware.py +211 -0
  113. quater-0.1.0a1/src/quater/observability.py +152 -0
  114. quater-0.1.0a1/src/quater/params.py +714 -0
  115. quater-0.1.0a1/src/quater/protocol/__init__.py +1 -0
  116. quater-0.1.0a1/src/quater/protocol/actions.py +117 -0
  117. quater-0.1.0a1/src/quater/py.typed +1 -0
  118. quater-0.1.0a1/src/quater/request.py +184 -0
  119. quater-0.1.0a1/src/quater/response.py +235 -0
  120. quater-0.1.0a1/src/quater/router.py +349 -0
  121. quater-0.1.0a1/src/quater/routing.py +97 -0
  122. quater-0.1.0a1/src/quater/schema.py +153 -0
  123. quater-0.1.0a1/src/quater/security.py +234 -0
  124. quater-0.1.0a1/src/quater/serialization.py +45 -0
  125. quater-0.1.0a1/src/quater/testing.py +650 -0
  126. quater-0.1.0a1/src/quater/tools/__init__.py +46 -0
  127. quater-0.1.0a1/src/quater/tools/audit.py +29 -0
  128. quater-0.1.0a1/src/quater/tools/descriptions.py +40 -0
  129. quater-0.1.0a1/src/quater/tools/mcp.py +531 -0
  130. quater-0.1.0a1/src/quater/tools/registry.py +102 -0
  131. quater-0.1.0a1/src/quater/tools/schema.py +31 -0
  132. quater-0.1.0a1/src/quater/types.py +21 -0
  133. quater-0.1.0a1/src/quater/typing.py +93 -0
  134. quater-0.1.0a1/tests/__init__.py +1 -0
  135. quater-0.1.0a1/tests/conftest.py +1 -0
  136. quater-0.1.0a1/tests/integration/test_action_protocol.py +435 -0
  137. quater-0.1.0a1/tests/integration/test_asgi_adapter.py +422 -0
  138. quater-0.1.0a1/tests/integration/test_cross_transport_behavior.py +327 -0
  139. quater-0.1.0a1/tests/integration/test_examples_run.py +134 -0
  140. quater-0.1.0a1/tests/integration/test_mcp_audit.py +131 -0
  141. quater-0.1.0a1/tests/integration/test_mcp_auth_and_origin.py +364 -0
  142. quater-0.1.0a1/tests/integration/test_mcp_docs.py +128 -0
  143. quater-0.1.0a1/tests/integration/test_mcp_lifecycle.py +350 -0
  144. quater-0.1.0a1/tests/integration/test_mcp_tools_call.py +448 -0
  145. quater-0.1.0a1/tests/integration/test_mcp_tools_list.py +80 -0
  146. quater-0.1.0a1/tests/integration/test_openapi_docs.py +435 -0
  147. quater-0.1.0a1/tests/integration/test_rsgi_adapter.py +381 -0
  148. quater-0.1.0a1/tests/integration/test_wsgi_adapter.py +235 -0
  149. quater-0.1.0a1/tests/security/__init__.py +1 -0
  150. quater-0.1.0a1/tests/security/helpers.py +94 -0
  151. quater-0.1.0a1/tests/security/test_auth_fail_closed.py +205 -0
  152. quater-0.1.0a1/tests/security/test_cross_surface_exposure.py +175 -0
  153. quater-0.1.0a1/tests/security/test_form_file_safety.py +173 -0
  154. quater-0.1.0a1/tests/security/test_request_and_error_safety.py +201 -0
  155. quater-0.1.0a1/tests/security/test_request_context_isolation.py +46 -0
  156. quater-0.1.0a1/tests/security/test_router_path_safety.py +152 -0
  157. quater-0.1.0a1/tests/typing/public_api.py +42 -0
  158. quater-0.1.0a1/tests/typing/test_action_types.py +46 -0
  159. quater-0.1.0a1/tests/typing/test_adapter_types.py +15 -0
  160. quater-0.1.0a1/tests/typing/test_auth_types.py +52 -0
  161. quater-0.1.0a1/tests/typing/test_mcp_types.py +43 -0
  162. quater-0.1.0a1/tests/typing/test_middleware_types.py +43 -0
  163. quater-0.1.0a1/tests/typing/test_public_app_api.py +52 -0
  164. quater-0.1.0a1/tests/typing/test_quickstart_types.py +51 -0
  165. quater-0.1.0a1/tests/typing/test_request_response_types.py +66 -0
  166. quater-0.1.0a1/tests/typing/test_route_decorator_types.py +43 -0
  167. quater-0.1.0a1/tests/typing/test_test_client_types.py +57 -0
  168. quater-0.1.0a1/tests/unit/__init__.py +1 -0
  169. quater-0.1.0a1/tests/unit/cli/__init__.py +1 -0
  170. quater-0.1.0a1/tests/unit/cli/helpers.py +14 -0
  171. quater-0.1.0a1/tests/unit/cli/test_apps.py +110 -0
  172. quater-0.1.0a1/tests/unit/cli/test_discovery.py +115 -0
  173. quater-0.1.0a1/tests/unit/cli/test_local.py +659 -0
  174. quater-0.1.0a1/tests/unit/cli/test_output.py +260 -0
  175. quater-0.1.0a1/tests/unit/cli/test_parsing.py +53 -0
  176. quater-0.1.0a1/tests/unit/cli/test_remote_client.py +220 -0
  177. quater-0.1.0a1/tests/unit/cli/test_remote_commands.py +384 -0
  178. quater-0.1.0a1/tests/unit/cli/test_remote_config.py +182 -0
  179. quater-0.1.0a1/tests/unit/cli/test_server.py +614 -0
  180. quater-0.1.0a1/tests/unit/test_action_executor.py +393 -0
  181. quater-0.1.0a1/tests/unit/test_action_protocol_payloads.py +78 -0
  182. quater-0.1.0a1/tests/unit/test_action_registry.py +141 -0
  183. quater-0.1.0a1/tests/unit/test_adapter_shared.py +87 -0
  184. quater-0.1.0a1/tests/unit/test_allowed_hosts.py +257 -0
  185. quater-0.1.0a1/tests/unit/test_app_config.py +277 -0
  186. quater-0.1.0a1/tests/unit/test_auth_hook.py +184 -0
  187. quater-0.1.0a1/tests/unit/test_body_limits.py +105 -0
  188. quater-0.1.0a1/tests/unit/test_body_reading.py +70 -0
  189. quater-0.1.0a1/tests/unit/test_cors_policy.py +224 -0
  190. quater-0.1.0a1/tests/unit/test_debug_error_responses.py +70 -0
  191. quater-0.1.0a1/tests/unit/test_deployment.py +31 -0
  192. quater-0.1.0a1/tests/unit/test_exception_handling.py +111 -0
  193. quater-0.1.0a1/tests/unit/test_exceptions.py +10 -0
  194. quater-0.1.0a1/tests/unit/test_form_file_binding.py +266 -0
  195. quater-0.1.0a1/tests/unit/test_handler_binding.py +68 -0
  196. quater-0.1.0a1/tests/unit/test_lifespan.py +119 -0
  197. quater-0.1.0a1/tests/unit/test_middleware_order.py +108 -0
  198. quater-0.1.0a1/tests/unit/test_middleware_short_circuit.py +34 -0
  199. quater-0.1.0a1/tests/unit/test_observability.py +233 -0
  200. quater-0.1.0a1/tests/unit/test_parameter_markers.py +249 -0
  201. quater-0.1.0a1/tests/unit/test_public_package_surface.py +151 -0
  202. quater-0.1.0a1/tests/unit/test_query_and_body_binding.py +131 -0
  203. quater-0.1.0a1/tests/unit/test_request_lazy_parsing.py +50 -0
  204. quater-0.1.0a1/tests/unit/test_resource_injection.py +471 -0
  205. quater-0.1.0a1/tests/unit/test_response_finalizers.py +130 -0
  206. quater-0.1.0a1/tests/unit/test_response_serialization.py +104 -0
  207. quater-0.1.0a1/tests/unit/test_route_conflicts.py +164 -0
  208. quater-0.1.0a1/tests/unit/test_route_group.py +714 -0
  209. quater-0.1.0a1/tests/unit/test_router_matching.py +295 -0
  210. quater-0.1.0a1/tests/unit/test_schema_generation.py +119 -0
  211. quater-0.1.0a1/tests/unit/test_secure_headers.py +146 -0
  212. quater-0.1.0a1/tests/unit/test_signed_cookies.py +52 -0
  213. quater-0.1.0a1/tests/unit/test_state.py +259 -0
  214. quater-0.1.0a1/tests/unit/test_test_client.py +269 -0
  215. quater-0.1.0a1/tests/unit/test_tool_registry.py +122 -0
  216. quater-0.1.0a1/tests/unit/test_tool_schema_generation.py +170 -0
  217. quater-0.1.0a1/tests/unit/test_tools_public_surface.py +23 -0
  218. quater-0.1.0a1/uv.lock +1755 -0
  219. quater-0.1.0a1/vercel.json +5 -0
@@ -0,0 +1,31 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: github-actions
4
+ directory: /
5
+ schedule:
6
+ interval: monthly
7
+ open-pull-requests-limit: 1
8
+ groups:
9
+ github-actions:
10
+ patterns:
11
+ - "*"
12
+
13
+ - package-ecosystem: npm
14
+ directory: /
15
+ schedule:
16
+ interval: monthly
17
+ open-pull-requests-limit: 1
18
+ groups:
19
+ docs-dependencies:
20
+ patterns:
21
+ - "*"
22
+
23
+ - package-ecosystem: cargo
24
+ directory: /
25
+ schedule:
26
+ interval: monthly
27
+ open-pull-requests-limit: 1
28
+ groups:
29
+ native-dependencies:
30
+ patterns:
31
+ - "*"
@@ -0,0 +1,110 @@
1
+ name: ci
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ branches:
9
+ - main
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ jobs:
15
+ checks:
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - name: Checkout
19
+ uses: actions/checkout@v6
20
+
21
+ - name: Setup Python
22
+ uses: actions/setup-python@v6
23
+ with:
24
+ python-version: "3.13"
25
+
26
+ - name: Setup Rust
27
+ uses: dtolnay/rust-toolchain@stable
28
+
29
+ - name: Install uv
30
+ uses: astral-sh/setup-uv@v8.1.0
31
+ with:
32
+ enable-cache: true
33
+
34
+ - name: Install Python dependencies
35
+ run: uv sync --frozen --group dev --group release
36
+
37
+ - name: Format check
38
+ run: uv run --no-sync ruff format --check .
39
+
40
+ - name: Lint
41
+ run: uv run --no-sync ruff check .
42
+
43
+ - name: Type check
44
+ run: uv run --no-sync mypy src examples tests
45
+
46
+ - name: Security lint
47
+ run: uv run --no-sync bandit -q -c pyproject.toml -r src/quater
48
+
49
+ - name: Dependency audit
50
+ run: uv run --no-sync pip-audit
51
+
52
+ - name: Test Rust router
53
+ run: cargo test --locked
54
+
55
+ - name: Build package distributions
56
+ run: uv build
57
+
58
+ - name: Check package metadata
59
+ run: uv run --no-sync twine check dist/*
60
+
61
+ - name: Setup Node
62
+ uses: actions/setup-node@v6
63
+ with:
64
+ node-version: "20"
65
+ cache: npm
66
+
67
+ - name: Install docs dependencies
68
+ run: npm ci
69
+
70
+ - name: Audit docs dependencies
71
+ run: npm audit --audit-level=moderate
72
+
73
+ - name: Build docs
74
+ run: npm run docs:build
75
+
76
+ tests:
77
+ runs-on: ubuntu-latest
78
+ strategy:
79
+ fail-fast: false
80
+ matrix:
81
+ python-version:
82
+ - "3.11"
83
+ - "3.12"
84
+ - "3.13"
85
+
86
+ steps:
87
+ - name: Checkout
88
+ uses: actions/checkout@v6
89
+
90
+ - name: Setup Python
91
+ uses: actions/setup-python@v6
92
+ with:
93
+ python-version: ${{ matrix.python-version }}
94
+
95
+ - name: Setup Rust
96
+ uses: dtolnay/rust-toolchain@stable
97
+
98
+ - name: Install uv
99
+ uses: astral-sh/setup-uv@v8.1.0
100
+ with:
101
+ enable-cache: true
102
+
103
+ - name: Install dependencies
104
+ run: uv sync --frozen --group dev
105
+
106
+ - name: Run tests with coverage
107
+ run: uv run --no-sync coverage run -m pytest -q
108
+
109
+ - name: Coverage report
110
+ run: uv run --no-sync coverage report
@@ -0,0 +1,255 @@
1
+ name: release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+ workflow_dispatch:
8
+ inputs:
9
+ repository:
10
+ description: "Package index to publish to"
11
+ required: true
12
+ default: testpypi
13
+ type: choice
14
+ options:
15
+ - testpypi
16
+ - pypi
17
+
18
+ permissions:
19
+ contents: read
20
+
21
+ jobs:
22
+ verify:
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - name: Checkout
26
+ uses: actions/checkout@v6
27
+
28
+ - name: Setup Python
29
+ uses: actions/setup-python@v6
30
+ with:
31
+ python-version: "3.13"
32
+
33
+ - name: Setup Rust
34
+ uses: dtolnay/rust-toolchain@stable
35
+
36
+ - name: Install uv
37
+ uses: astral-sh/setup-uv@v8.1.0
38
+ with:
39
+ enable-cache: true
40
+
41
+ - name: Install Python dependencies
42
+ run: uv sync --frozen --group dev --group release
43
+
44
+ - name: Format check
45
+ run: uv run --no-sync ruff format --check .
46
+
47
+ - name: Lint
48
+ run: uv run --no-sync ruff check .
49
+
50
+ - name: Type check
51
+ run: uv run --no-sync mypy src examples tests
52
+
53
+ - name: Run tests
54
+ run: uv run --no-sync pytest -q
55
+
56
+ - name: Test Rust router
57
+ run: cargo test --locked
58
+
59
+ - name: Setup Node
60
+ uses: actions/setup-node@v6
61
+ with:
62
+ node-version: "20"
63
+ cache: npm
64
+
65
+ - name: Install docs dependencies
66
+ run: npm ci
67
+
68
+ - name: Audit docs dependencies
69
+ run: npm audit --audit-level=moderate
70
+
71
+ - name: Build docs
72
+ run: npm run docs:build
73
+
74
+ build-sdist:
75
+ needs: verify
76
+ runs-on: ubuntu-latest
77
+ steps:
78
+ - name: Checkout
79
+ uses: actions/checkout@v6
80
+
81
+ - name: Setup Python
82
+ uses: actions/setup-python@v6
83
+ with:
84
+ python-version: "3.13"
85
+
86
+ - name: Install uv
87
+ uses: astral-sh/setup-uv@v8.1.0
88
+ with:
89
+ enable-cache: true
90
+
91
+ - name: Build source distribution
92
+ run: uv build --sdist --out-dir dist
93
+
94
+ - name: Upload source distribution
95
+ uses: actions/upload-artifact@v7
96
+ with:
97
+ name: sdist
98
+ path: dist/*
99
+
100
+ build-linux-wheels:
101
+ needs: verify
102
+ runs-on: ubuntu-latest
103
+ strategy:
104
+ fail-fast: false
105
+ matrix:
106
+ target:
107
+ - x86_64
108
+ - aarch64
109
+ steps:
110
+ - name: Checkout
111
+ uses: actions/checkout@v6
112
+
113
+ - name: Build wheels
114
+ uses: PyO3/maturin-action@v1
115
+ with:
116
+ command: build
117
+ target: ${{ matrix.target }}
118
+ args: --release --out dist --strip
119
+ manylinux: "2014"
120
+ sccache: "true"
121
+
122
+ - name: Upload wheels
123
+ uses: actions/upload-artifact@v7
124
+ with:
125
+ name: wheels-linux-${{ matrix.target }}
126
+ path: dist/*
127
+
128
+ build-macos-wheels:
129
+ needs: verify
130
+ runs-on: macos-latest
131
+ strategy:
132
+ fail-fast: false
133
+ matrix:
134
+ target:
135
+ - x86_64
136
+ - aarch64
137
+ steps:
138
+ - name: Checkout
139
+ uses: actions/checkout@v6
140
+
141
+ - name: Build wheels
142
+ uses: PyO3/maturin-action@v1
143
+ with:
144
+ command: build
145
+ target: ${{ matrix.target }}
146
+ args: --release --out dist --strip
147
+ sccache: "true"
148
+
149
+ - name: Upload wheels
150
+ uses: actions/upload-artifact@v7
151
+ with:
152
+ name: wheels-macos-${{ matrix.target }}
153
+ path: dist/*
154
+
155
+ build-windows-wheels:
156
+ needs: verify
157
+ runs-on: windows-latest
158
+ steps:
159
+ - name: Checkout
160
+ uses: actions/checkout@v6
161
+
162
+ - name: Build wheels
163
+ uses: PyO3/maturin-action@v1
164
+ with:
165
+ command: build
166
+ target: x64
167
+ args: --release --out dist --strip
168
+ sccache: "true"
169
+
170
+ - name: Upload wheels
171
+ uses: actions/upload-artifact@v7
172
+ with:
173
+ name: wheels-windows-x64
174
+ path: dist/*
175
+
176
+ validate-distributions:
177
+ needs:
178
+ - build-sdist
179
+ - build-linux-wheels
180
+ - build-macos-wheels
181
+ - build-windows-wheels
182
+ runs-on: ubuntu-latest
183
+ steps:
184
+ - name: Checkout
185
+ uses: actions/checkout@v6
186
+
187
+ - name: Download distributions
188
+ uses: actions/download-artifact@v8
189
+ with:
190
+ path: dist
191
+ merge-multiple: true
192
+
193
+ - name: Setup Python
194
+ uses: actions/setup-python@v6
195
+ with:
196
+ python-version: "3.13"
197
+
198
+ - name: Install uv
199
+ uses: astral-sh/setup-uv@v8.1.0
200
+ with:
201
+ enable-cache: true
202
+
203
+ - name: Install release dependencies
204
+ run: uv sync --frozen --no-default-groups --group release --no-install-project
205
+
206
+ - name: Check package metadata
207
+ run: uv run --no-sync twine check dist/*
208
+
209
+ - name: Upload checked distributions
210
+ uses: actions/upload-artifact@v7
211
+ with:
212
+ name: python-package-distributions
213
+ path: dist/*
214
+
215
+ publish-testpypi:
216
+ needs: validate-distributions
217
+ if: github.event_name == 'workflow_dispatch' && inputs.repository == 'testpypi'
218
+ runs-on: ubuntu-latest
219
+ environment:
220
+ name: testpypi
221
+ url: https://test.pypi.org/p/quater
222
+ permissions:
223
+ contents: read
224
+ id-token: write
225
+ steps:
226
+ - name: Download distributions
227
+ uses: actions/download-artifact@v8
228
+ with:
229
+ name: python-package-distributions
230
+ path: dist
231
+
232
+ - name: Publish to TestPyPI
233
+ uses: pypa/gh-action-pypi-publish@release/v1
234
+ with:
235
+ repository-url: https://test.pypi.org/legacy/
236
+
237
+ publish-pypi:
238
+ needs: validate-distributions
239
+ if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) || (github.event_name == 'workflow_dispatch' && inputs.repository == 'pypi')
240
+ runs-on: ubuntu-latest
241
+ environment:
242
+ name: pypi
243
+ url: https://pypi.org/p/quater
244
+ permissions:
245
+ contents: read
246
+ id-token: write
247
+ steps:
248
+ - name: Download distributions
249
+ uses: actions/download-artifact@v8
250
+ with:
251
+ name: python-package-distributions
252
+ path: dist
253
+
254
+ - name: Publish to PyPI
255
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,31 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.pyo
5
+
6
+ # Build artifacts
7
+ build/
8
+ dist/
9
+ *.egg-info/
10
+
11
+ # Tool caches
12
+ .mypy_cache/
13
+ .pytest_cache/
14
+ .ruff_cache/
15
+ .uv-cache/
16
+ .coverage
17
+ node_modules/
18
+ docs/.vitepress/cache/
19
+ docs/.vitepress/dist/
20
+
21
+ # Virtual environments
22
+ .venv/
23
+ venv/
24
+
25
+ # Local environment
26
+ .env
27
+ .env.*
28
+ notes/
29
+ sample_projects
30
+ target/
31
+ src/quater/*.so
@@ -0,0 +1,140 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "heck"
7
+ version = "0.5.0"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
10
+
11
+ [[package]]
12
+ name = "libc"
13
+ version = "0.2.186"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
16
+
17
+ [[package]]
18
+ name = "matchit"
19
+ version = "0.9.2"
20
+ source = "registry+https://github.com/rust-lang/crates.io-index"
21
+ checksum = "8863b587001c1b9a8a4e36008cebc6b3612cb1226fe2de94858e06092687b608"
22
+
23
+ [[package]]
24
+ name = "once_cell"
25
+ version = "1.21.4"
26
+ source = "registry+https://github.com/rust-lang/crates.io-index"
27
+ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
28
+
29
+ [[package]]
30
+ name = "portable-atomic"
31
+ version = "1.13.1"
32
+ source = "registry+https://github.com/rust-lang/crates.io-index"
33
+ checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
34
+
35
+ [[package]]
36
+ name = "proc-macro2"
37
+ version = "1.0.106"
38
+ source = "registry+https://github.com/rust-lang/crates.io-index"
39
+ checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
40
+ dependencies = [
41
+ "unicode-ident",
42
+ ]
43
+
44
+ [[package]]
45
+ name = "pyo3"
46
+ version = "0.28.3"
47
+ source = "registry+https://github.com/rust-lang/crates.io-index"
48
+ checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12"
49
+ dependencies = [
50
+ "libc",
51
+ "once_cell",
52
+ "portable-atomic",
53
+ "pyo3-build-config",
54
+ "pyo3-ffi",
55
+ "pyo3-macros",
56
+ ]
57
+
58
+ [[package]]
59
+ name = "pyo3-build-config"
60
+ version = "0.28.3"
61
+ source = "registry+https://github.com/rust-lang/crates.io-index"
62
+ checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e"
63
+ dependencies = [
64
+ "target-lexicon",
65
+ ]
66
+
67
+ [[package]]
68
+ name = "pyo3-ffi"
69
+ version = "0.28.3"
70
+ source = "registry+https://github.com/rust-lang/crates.io-index"
71
+ checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e"
72
+ dependencies = [
73
+ "libc",
74
+ "pyo3-build-config",
75
+ ]
76
+
77
+ [[package]]
78
+ name = "pyo3-macros"
79
+ version = "0.28.3"
80
+ source = "registry+https://github.com/rust-lang/crates.io-index"
81
+ checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813"
82
+ dependencies = [
83
+ "proc-macro2",
84
+ "pyo3-macros-backend",
85
+ "quote",
86
+ "syn",
87
+ ]
88
+
89
+ [[package]]
90
+ name = "pyo3-macros-backend"
91
+ version = "0.28.3"
92
+ source = "registry+https://github.com/rust-lang/crates.io-index"
93
+ checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb"
94
+ dependencies = [
95
+ "heck",
96
+ "proc-macro2",
97
+ "pyo3-build-config",
98
+ "quote",
99
+ "syn",
100
+ ]
101
+
102
+ [[package]]
103
+ name = "quote"
104
+ version = "1.0.45"
105
+ source = "registry+https://github.com/rust-lang/crates.io-index"
106
+ checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
107
+ dependencies = [
108
+ "proc-macro2",
109
+ ]
110
+
111
+ [[package]]
112
+ name = "router"
113
+ version = "0.1.0-alpha.1"
114
+ dependencies = [
115
+ "matchit",
116
+ "pyo3",
117
+ ]
118
+
119
+ [[package]]
120
+ name = "syn"
121
+ version = "2.0.117"
122
+ source = "registry+https://github.com/rust-lang/crates.io-index"
123
+ checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
124
+ dependencies = [
125
+ "proc-macro2",
126
+ "quote",
127
+ "unicode-ident",
128
+ ]
129
+
130
+ [[package]]
131
+ name = "target-lexicon"
132
+ version = "0.13.5"
133
+ source = "registry+https://github.com/rust-lang/crates.io-index"
134
+ checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
135
+
136
+ [[package]]
137
+ name = "unicode-ident"
138
+ version = "1.0.24"
139
+ source = "registry+https://github.com/rust-lang/crates.io-index"
140
+ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
@@ -0,0 +1,18 @@
1
+ [package]
2
+ name = "router"
3
+ version = "0.1.0-alpha.1"
4
+ edition = "2021"
5
+ description = "Native route matcher for Quater."
6
+ license = "MIT"
7
+ homepage = "https://github.com/DevilsAutumn/quater"
8
+ repository = "https://github.com/DevilsAutumn/quater"
9
+ readme = "README.md"
10
+
11
+ [lib]
12
+ name = "quater_router"
13
+ path = "native/router/src/lib.rs"
14
+ crate-type = ["cdylib"]
15
+
16
+ [dependencies]
17
+ matchit = "0.9.1"
18
+ pyo3 = { version = "0.28.3", features = ["abi3-py311", "extension-module"] }
quater-0.1.0a1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Bhuvnesh Sharma
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.