django-bolt 0.1.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.

Potentially problematic release.


This version of django-bolt might be problematic. Click here for more details.

Files changed (207) hide show
  1. django_bolt-0.1.0/.github/workflows/CI.yml +195 -0
  2. django_bolt-0.1.0/.gitignore +15 -0
  3. django_bolt-0.1.0/.python-version +1 -0
  4. django_bolt-0.1.0/.vscode/settings.json +3 -0
  5. django_bolt-0.1.0/BENCHMARKS.md +79 -0
  6. django_bolt-0.1.0/BENCHMARK_BASELINE.md +196 -0
  7. django_bolt-0.1.0/BENCHMARK_DEV.md +196 -0
  8. django_bolt-0.1.0/BOLT.md +173 -0
  9. django_bolt-0.1.0/CLAUDE.md +312 -0
  10. django_bolt-0.1.0/Cargo.lock +2595 -0
  11. django_bolt-0.1.0/Cargo.toml +43 -0
  12. django_bolt-0.1.0/Fast.md +166 -0
  13. django_bolt-0.1.0/Makefile +149 -0
  14. django_bolt-0.1.0/PKG-INFO +629 -0
  15. django_bolt-0.1.0/PLATFORM_SUPPORT.md +134 -0
  16. django_bolt-0.1.0/README.md +587 -0
  17. django_bolt-0.1.0/TODO.md +66 -0
  18. django_bolt-0.1.0/docs/ANNOTATION_GUIDE.md +407 -0
  19. django_bolt-0.1.0/docs/ASYNC_DJANGO.md +561 -0
  20. django_bolt-0.1.0/docs/CLASS_BASED_VIEWS.md +1622 -0
  21. django_bolt-0.1.0/docs/COMPRESSION.md +63 -0
  22. django_bolt-0.1.0/docs/DJANGO_ADMIN.md +341 -0
  23. django_bolt-0.1.0/docs/EXCEPTIONS.md +491 -0
  24. django_bolt-0.1.0/docs/GIL_OPTIMIZATION.md +137 -0
  25. django_bolt-0.1.0/docs/LOGGING.md +103 -0
  26. django_bolt-0.1.0/docs/MIDDLEWARE.md +128 -0
  27. django_bolt-0.1.0/docs/OPENAPI_ERROR_RESPONSES.md +198 -0
  28. django_bolt-0.1.0/docs/PAGINATION.md +707 -0
  29. django_bolt-0.1.0/docs/PUBLISHING.md +275 -0
  30. django_bolt-0.1.0/docs/SECURITY.md +824 -0
  31. django_bolt-0.1.0/docs/TESTING_UTILITIES.md +529 -0
  32. django_bolt-0.1.0/docs/favicon.png +0 -0
  33. django_bolt-0.1.0/docs/icon.png +0 -0
  34. django_bolt-0.1.0/docs/logo.png +0 -0
  35. django_bolt-0.1.0/pyproject.toml +71 -0
  36. django_bolt-0.1.0/pytest.ini +5 -0
  37. django_bolt-0.1.0/python/django_bolt/__init__.py +147 -0
  38. django_bolt-0.1.0/python/django_bolt/admin/__init__.py +25 -0
  39. django_bolt-0.1.0/python/django_bolt/admin/admin_detection.py +179 -0
  40. django_bolt-0.1.0/python/django_bolt/admin/asgi_bridge.py +267 -0
  41. django_bolt-0.1.0/python/django_bolt/admin/routes.py +91 -0
  42. django_bolt-0.1.0/python/django_bolt/admin/static.py +155 -0
  43. django_bolt-0.1.0/python/django_bolt/admin/static_routes.py +111 -0
  44. django_bolt-0.1.0/python/django_bolt/api.py +1011 -0
  45. django_bolt-0.1.0/python/django_bolt/apps.py +7 -0
  46. django_bolt-0.1.0/python/django_bolt/async_collector.py +228 -0
  47. django_bolt-0.1.0/python/django_bolt/auth/README.md +464 -0
  48. django_bolt-0.1.0/python/django_bolt/auth/REVOCATION_EXAMPLE.md +391 -0
  49. django_bolt-0.1.0/python/django_bolt/auth/__init__.py +84 -0
  50. django_bolt-0.1.0/python/django_bolt/auth/backends.py +236 -0
  51. django_bolt-0.1.0/python/django_bolt/auth/guards.py +224 -0
  52. django_bolt-0.1.0/python/django_bolt/auth/jwt_utils.py +212 -0
  53. django_bolt-0.1.0/python/django_bolt/auth/revocation.py +286 -0
  54. django_bolt-0.1.0/python/django_bolt/auth/token.py +335 -0
  55. django_bolt-0.1.0/python/django_bolt/binding.py +363 -0
  56. django_bolt-0.1.0/python/django_bolt/bootstrap.py +77 -0
  57. django_bolt-0.1.0/python/django_bolt/cli.py +133 -0
  58. django_bolt-0.1.0/python/django_bolt/compression.py +104 -0
  59. django_bolt-0.1.0/python/django_bolt/decorators.py +159 -0
  60. django_bolt-0.1.0/python/django_bolt/dependencies.py +128 -0
  61. django_bolt-0.1.0/python/django_bolt/error_handlers.py +305 -0
  62. django_bolt-0.1.0/python/django_bolt/exceptions.py +294 -0
  63. django_bolt-0.1.0/python/django_bolt/health.py +129 -0
  64. django_bolt-0.1.0/python/django_bolt/logging/__init__.py +6 -0
  65. django_bolt-0.1.0/python/django_bolt/logging/config.py +357 -0
  66. django_bolt-0.1.0/python/django_bolt/logging/middleware.py +296 -0
  67. django_bolt-0.1.0/python/django_bolt/management/__init__.py +1 -0
  68. django_bolt-0.1.0/python/django_bolt/management/commands/__init__.py +0 -0
  69. django_bolt-0.1.0/python/django_bolt/management/commands/runbolt.py +427 -0
  70. django_bolt-0.1.0/python/django_bolt/middleware/__init__.py +32 -0
  71. django_bolt-0.1.0/python/django_bolt/middleware/compiler.py +131 -0
  72. django_bolt-0.1.0/python/django_bolt/middleware/middleware.py +247 -0
  73. django_bolt-0.1.0/python/django_bolt/openapi/__init__.py +23 -0
  74. django_bolt-0.1.0/python/django_bolt/openapi/config.py +196 -0
  75. django_bolt-0.1.0/python/django_bolt/openapi/plugins.py +439 -0
  76. django_bolt-0.1.0/python/django_bolt/openapi/routes.py +152 -0
  77. django_bolt-0.1.0/python/django_bolt/openapi/schema_generator.py +581 -0
  78. django_bolt-0.1.0/python/django_bolt/openapi/spec/__init__.py +68 -0
  79. django_bolt-0.1.0/python/django_bolt/openapi/spec/base.py +74 -0
  80. django_bolt-0.1.0/python/django_bolt/openapi/spec/callback.py +24 -0
  81. django_bolt-0.1.0/python/django_bolt/openapi/spec/components.py +72 -0
  82. django_bolt-0.1.0/python/django_bolt/openapi/spec/contact.py +21 -0
  83. django_bolt-0.1.0/python/django_bolt/openapi/spec/discriminator.py +25 -0
  84. django_bolt-0.1.0/python/django_bolt/openapi/spec/encoding.py +67 -0
  85. django_bolt-0.1.0/python/django_bolt/openapi/spec/enums.py +41 -0
  86. django_bolt-0.1.0/python/django_bolt/openapi/spec/example.py +36 -0
  87. django_bolt-0.1.0/python/django_bolt/openapi/spec/external_documentation.py +21 -0
  88. django_bolt-0.1.0/python/django_bolt/openapi/spec/header.py +132 -0
  89. django_bolt-0.1.0/python/django_bolt/openapi/spec/info.py +50 -0
  90. django_bolt-0.1.0/python/django_bolt/openapi/spec/license.py +28 -0
  91. django_bolt-0.1.0/python/django_bolt/openapi/spec/link.py +66 -0
  92. django_bolt-0.1.0/python/django_bolt/openapi/spec/media_type.py +51 -0
  93. django_bolt-0.1.0/python/django_bolt/openapi/spec/oauth_flow.py +36 -0
  94. django_bolt-0.1.0/python/django_bolt/openapi/spec/oauth_flows.py +28 -0
  95. django_bolt-0.1.0/python/django_bolt/openapi/spec/open_api.py +87 -0
  96. django_bolt-0.1.0/python/django_bolt/openapi/spec/operation.py +105 -0
  97. django_bolt-0.1.0/python/django_bolt/openapi/spec/parameter.py +147 -0
  98. django_bolt-0.1.0/python/django_bolt/openapi/spec/path_item.py +78 -0
  99. django_bolt-0.1.0/python/django_bolt/openapi/spec/paths.py +27 -0
  100. django_bolt-0.1.0/python/django_bolt/openapi/spec/reference.py +38 -0
  101. django_bolt-0.1.0/python/django_bolt/openapi/spec/request_body.py +38 -0
  102. django_bolt-0.1.0/python/django_bolt/openapi/spec/response.py +48 -0
  103. django_bolt-0.1.0/python/django_bolt/openapi/spec/responses.py +44 -0
  104. django_bolt-0.1.0/python/django_bolt/openapi/spec/schema.py +678 -0
  105. django_bolt-0.1.0/python/django_bolt/openapi/spec/security_requirement.py +28 -0
  106. django_bolt-0.1.0/python/django_bolt/openapi/spec/security_scheme.py +69 -0
  107. django_bolt-0.1.0/python/django_bolt/openapi/spec/server.py +34 -0
  108. django_bolt-0.1.0/python/django_bolt/openapi/spec/server_variable.py +32 -0
  109. django_bolt-0.1.0/python/django_bolt/openapi/spec/tag.py +32 -0
  110. django_bolt-0.1.0/python/django_bolt/openapi/spec/xml.py +44 -0
  111. django_bolt-0.1.0/python/django_bolt/pagination.py +669 -0
  112. django_bolt-0.1.0/python/django_bolt/param_functions.py +49 -0
  113. django_bolt-0.1.0/python/django_bolt/params.py +337 -0
  114. django_bolt-0.1.0/python/django_bolt/request_parsing.py +128 -0
  115. django_bolt-0.1.0/python/django_bolt/responses.py +214 -0
  116. django_bolt-0.1.0/python/django_bolt/router.py +48 -0
  117. django_bolt-0.1.0/python/django_bolt/serialization.py +193 -0
  118. django_bolt-0.1.0/python/django_bolt/status_codes.py +321 -0
  119. django_bolt-0.1.0/python/django_bolt/testing/__init__.py +10 -0
  120. django_bolt-0.1.0/python/django_bolt/testing/client.py +274 -0
  121. django_bolt-0.1.0/python/django_bolt/testing/helpers.py +93 -0
  122. django_bolt-0.1.0/python/django_bolt/tests/__init__.py +0 -0
  123. django_bolt-0.1.0/python/django_bolt/tests/admin_tests/__init__.py +1 -0
  124. django_bolt-0.1.0/python/django_bolt/tests/admin_tests/conftest.py +6 -0
  125. django_bolt-0.1.0/python/django_bolt/tests/admin_tests/test_admin_with_django.py +278 -0
  126. django_bolt-0.1.0/python/django_bolt/tests/admin_tests/urls.py +9 -0
  127. django_bolt-0.1.0/python/django_bolt/tests/cbv/__init__.py +0 -0
  128. django_bolt-0.1.0/python/django_bolt/tests/cbv/test_class_views.py +570 -0
  129. django_bolt-0.1.0/python/django_bolt/tests/cbv/test_class_views_django_orm.py +703 -0
  130. django_bolt-0.1.0/python/django_bolt/tests/cbv/test_class_views_features.py +1173 -0
  131. django_bolt-0.1.0/python/django_bolt/tests/cbv/test_class_views_with_client.py +622 -0
  132. django_bolt-0.1.0/python/django_bolt/tests/conftest.py +165 -0
  133. django_bolt-0.1.0/python/django_bolt/tests/test_action_decorator.py +399 -0
  134. django_bolt-0.1.0/python/django_bolt/tests/test_auth_secret_key.py +83 -0
  135. django_bolt-0.1.0/python/django_bolt/tests/test_decorator_syntax.py +159 -0
  136. django_bolt-0.1.0/python/django_bolt/tests/test_error_handling.py +481 -0
  137. django_bolt-0.1.0/python/django_bolt/tests/test_file_response.py +192 -0
  138. django_bolt-0.1.0/python/django_bolt/tests/test_global_cors.py +172 -0
  139. django_bolt-0.1.0/python/django_bolt/tests/test_guards_auth.py +441 -0
  140. django_bolt-0.1.0/python/django_bolt/tests/test_guards_integration.py +303 -0
  141. django_bolt-0.1.0/python/django_bolt/tests/test_health.py +283 -0
  142. django_bolt-0.1.0/python/django_bolt/tests/test_integration_validation.py +400 -0
  143. django_bolt-0.1.0/python/django_bolt/tests/test_json_validation.py +536 -0
  144. django_bolt-0.1.0/python/django_bolt/tests/test_jwt_auth.py +327 -0
  145. django_bolt-0.1.0/python/django_bolt/tests/test_jwt_token.py +458 -0
  146. django_bolt-0.1.0/python/django_bolt/tests/test_logging.py +837 -0
  147. django_bolt-0.1.0/python/django_bolt/tests/test_logging_merge.py +419 -0
  148. django_bolt-0.1.0/python/django_bolt/tests/test_middleware.py +492 -0
  149. django_bolt-0.1.0/python/django_bolt/tests/test_middleware_server.py +230 -0
  150. django_bolt-0.1.0/python/django_bolt/tests/test_model_viewset.py +323 -0
  151. django_bolt-0.1.0/python/django_bolt/tests/test_models.py +24 -0
  152. django_bolt-0.1.0/python/django_bolt/tests/test_pagination.py +1258 -0
  153. django_bolt-0.1.0/python/django_bolt/tests/test_parameter_validation.py +178 -0
  154. django_bolt-0.1.0/python/django_bolt/tests/test_syntax.py +626 -0
  155. django_bolt-0.1.0/python/django_bolt/tests/test_testing_utilities.py +163 -0
  156. django_bolt-0.1.0/python/django_bolt/tests/test_testing_utilities_simple.py +123 -0
  157. django_bolt-0.1.0/python/django_bolt/tests/test_viewset_unified.py +346 -0
  158. django_bolt-0.1.0/python/django_bolt/typing.py +273 -0
  159. django_bolt-0.1.0/python/django_bolt/views.py +1110 -0
  160. django_bolt-0.1.0/python/examples/testproject/README.md +102 -0
  161. django_bolt-0.1.0/python/examples/testproject/bench/__init__.py +0 -0
  162. django_bolt-0.1.0/python/examples/testproject/bench/admin.py +3 -0
  163. django_bolt-0.1.0/python/examples/testproject/bench/api.py +235 -0
  164. django_bolt-0.1.0/python/examples/testproject/bench/apps.py +6 -0
  165. django_bolt-0.1.0/python/examples/testproject/bench/migrations/0001_initial.py +30 -0
  166. django_bolt-0.1.0/python/examples/testproject/bench/migrations/__init__.py +0 -0
  167. django_bolt-0.1.0/python/examples/testproject/bench/models.py +18 -0
  168. django_bolt-0.1.0/python/examples/testproject/bench/tests.py +3 -0
  169. django_bolt-0.1.0/python/examples/testproject/bench/views.py +3 -0
  170. django_bolt-0.1.0/python/examples/testproject/manage.py +22 -0
  171. django_bolt-0.1.0/python/examples/testproject/testproject/__init__.py +0 -0
  172. django_bolt-0.1.0/python/examples/testproject/testproject/api.py +810 -0
  173. django_bolt-0.1.0/python/examples/testproject/testproject/asgi.py +16 -0
  174. django_bolt-0.1.0/python/examples/testproject/testproject/settings.py +175 -0
  175. django_bolt-0.1.0/python/examples/testproject/testproject/test_api.py +4 -0
  176. django_bolt-0.1.0/python/examples/testproject/testproject/urls.py +22 -0
  177. django_bolt-0.1.0/python/examples/testproject/testproject/wsgi.py +16 -0
  178. django_bolt-0.1.0/python/examples/testproject/users/__init__.py +0 -0
  179. django_bolt-0.1.0/python/examples/testproject/users/admin.py +3 -0
  180. django_bolt-0.1.0/python/examples/testproject/users/api.py +246 -0
  181. django_bolt-0.1.0/python/examples/testproject/users/apps.py +6 -0
  182. django_bolt-0.1.0/python/examples/testproject/users/migrations/0001_initial.py +29 -0
  183. django_bolt-0.1.0/python/examples/testproject/users/migrations/__init__.py +0 -0
  184. django_bolt-0.1.0/python/examples/testproject/users/models.py +17 -0
  185. django_bolt-0.1.0/python/examples/testproject/users/tests.py +3 -0
  186. django_bolt-0.1.0/python/examples/testproject/users/views.py +3 -0
  187. django_bolt-0.1.0/scripts/benchmark.sh +337 -0
  188. django_bolt-0.1.0/scripts/install_hey.sh +70 -0
  189. django_bolt-0.1.0/src/direct_stream.rs +240 -0
  190. django_bolt-0.1.0/src/error.rs +239 -0
  191. django_bolt-0.1.0/src/handler.rs +624 -0
  192. django_bolt-0.1.0/src/json.rs +2 -0
  193. django_bolt-0.1.0/src/lib.rs +44 -0
  194. django_bolt-0.1.0/src/metadata.rs +227 -0
  195. django_bolt-0.1.0/src/middleware/auth.rs +271 -0
  196. django_bolt-0.1.0/src/middleware/cors.rs +180 -0
  197. django_bolt-0.1.0/src/middleware/mod.rs +94 -0
  198. django_bolt-0.1.0/src/middleware/rate_limit.rs +143 -0
  199. django_bolt-0.1.0/src/permissions.rs +102 -0
  200. django_bolt-0.1.0/src/request.rs +123 -0
  201. django_bolt-0.1.0/src/router.rs +211 -0
  202. django_bolt-0.1.0/src/server.rs +195 -0
  203. django_bolt-0.1.0/src/state.rs +20 -0
  204. django_bolt-0.1.0/src/streaming.rs +450 -0
  205. django_bolt-0.1.0/src/test_state.rs +834 -0
  206. django_bolt-0.1.0/src/testing.rs +269 -0
  207. django_bolt-0.1.0/uv.lock +1190 -0
@@ -0,0 +1,195 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ - main
8
+ tags:
9
+ - 'v*'
10
+ pull_request:
11
+ workflow_dispatch:
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ # Run tests across Python versions
18
+ test:
19
+ name: Test Python ${{ matrix.python-version }}
20
+ runs-on: ubuntu-latest
21
+ strategy:
22
+ fail-fast: false
23
+ matrix:
24
+ python-version: ['3.10', '3.11', '3.12', '3.13']
25
+
26
+ steps:
27
+ - uses: actions/checkout@v4
28
+
29
+ - name: Set up Python
30
+ uses: actions/setup-python@v5
31
+ with:
32
+ python-version: ${{ matrix.python-version }}
33
+
34
+ - name: Install Rust
35
+ uses: dtolnay/rust-toolchain@stable
36
+
37
+ - name: Install dependencies
38
+ run: |
39
+ pip install -U pip uv
40
+ uv pip install --system -e ".[dev]"
41
+
42
+ - name: Build extension
43
+ run: uv run maturin develop --release
44
+
45
+ - name: Run tests
46
+ run: uv run --with pytest pytest python/django_bolt/tests -s -vv
47
+
48
+ # Build wheels for Linux x86_64 (covers most Linux users including Arch)
49
+ linux:
50
+ name: Build wheels on Linux
51
+ runs-on: ubuntu-latest
52
+
53
+ steps:
54
+ - uses: actions/checkout@v4
55
+
56
+ - name: Build wheels
57
+ uses: PyO3/maturin-action@v1
58
+ with:
59
+ target: x86_64
60
+ args: --release --out dist --interpreter 3.10 3.11 3.12 3.13 3.14
61
+ sccache: 'true'
62
+ manylinux: auto
63
+
64
+ - name: Upload wheels
65
+ uses: actions/upload-artifact@v4
66
+ with:
67
+ name: wheels-linux-x86_64
68
+ path: dist
69
+
70
+ # Build wheels for macOS
71
+ macos:
72
+ name: Build wheels on macOS
73
+ runs-on: macos-latest
74
+
75
+ steps:
76
+ - uses: actions/checkout@v4
77
+
78
+ - name: Build wheels
79
+ uses: PyO3/maturin-action@v1
80
+ with:
81
+ target: universal2-apple-darwin
82
+ args: --release --out dist --interpreter 3.10 3.11 3.12 3.13 3.14
83
+ sccache: 'true'
84
+
85
+ - name: Upload wheels
86
+ uses: actions/upload-artifact@v4
87
+ with:
88
+ name: wheels-macos-universal2
89
+ path: dist
90
+
91
+ # Build wheels for Windows
92
+ windows:
93
+ name: Build wheels on Windows
94
+ runs-on: windows-latest
95
+
96
+ steps:
97
+ - uses: actions/checkout@v4
98
+
99
+ - name: Build wheels
100
+ uses: PyO3/maturin-action@v1
101
+ with:
102
+ target: x64
103
+ args: --release --out dist --interpreter 3.10 3.11 3.12 3.13
104
+ sccache: 'true'
105
+
106
+ - name: Upload wheels
107
+ uses: actions/upload-artifact@v4
108
+ with:
109
+ name: wheels-windows-x64
110
+ path: dist
111
+
112
+ # Build source distribution
113
+ sdist:
114
+ name: Build source distribution
115
+ runs-on: ubuntu-latest
116
+
117
+ steps:
118
+ - uses: actions/checkout@v4
119
+
120
+ - name: Build sdist
121
+ uses: PyO3/maturin-action@v1
122
+ with:
123
+ command: sdist
124
+ args: --out dist
125
+
126
+ - name: Upload sdist
127
+ uses: actions/upload-artifact@v4
128
+ with:
129
+ name: wheels-sdist
130
+ path: dist
131
+
132
+ # Validate all wheels
133
+ validate:
134
+ name: Validate wheels
135
+ runs-on: ubuntu-latest
136
+ needs: [linux, macos, windows, sdist]
137
+
138
+ steps:
139
+ - uses: actions/checkout@v4
140
+
141
+ - name: Download all artifacts
142
+ uses: actions/download-artifact@v4
143
+ with:
144
+ pattern: wheels-*
145
+ path: dist
146
+ merge-multiple: true
147
+
148
+ - name: Install twine
149
+ run: pip install twine
150
+
151
+ - name: Check wheels with twine
152
+ run: twine check --strict dist/*
153
+
154
+ - name: List all wheels
155
+ run: ls -lh dist/
156
+
157
+ # Release to PyPI
158
+ release:
159
+ name: Release to PyPI
160
+ runs-on: ubuntu-latest
161
+ if: startsWith(github.ref, 'refs/tags/')
162
+ needs: [test, validate]
163
+ environment:
164
+ name: pypi
165
+ url: https://pypi.org/project/django-bolt/
166
+ permissions:
167
+ id-token: write # Required for trusted publishing
168
+ contents: write # Required for GitHub release
169
+
170
+ steps:
171
+ - uses: actions/checkout@v4
172
+
173
+ - name: Download all artifacts
174
+ uses: actions/download-artifact@v4
175
+ with:
176
+ pattern: wheels-*
177
+ path: dist
178
+ merge-multiple: true
179
+
180
+ - name: List artifacts
181
+ run: ls -lh dist/
182
+
183
+ - name: Install uv
184
+ run: pip install uv
185
+
186
+ - name: Publish to PyPI
187
+ run: uv publish --trusted-publishing always
188
+
189
+ - name: Create GitHub Release
190
+ uses: softprops/action-gh-release@v1
191
+ with:
192
+ files: dist/*
193
+ generate_release_notes: true
194
+ draft: false
195
+ prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
@@ -0,0 +1,15 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+ target/
9
+ # Virtual environments
10
+ .venv
11
+ ignore/
12
+ db.sqlite3
13
+ python/django_bolt/_core.cpython-312-x86_64-linux-gnu.so
14
+ plan.md
15
+ python/django_bolt/_core.abi3.so
@@ -0,0 +1 @@
1
+ 3.12
@@ -0,0 +1,3 @@
1
+ {
2
+ "makefile.configureOnOpen": false
3
+ }
@@ -0,0 +1,79 @@
1
+ # Django-Bolt Benchmark Results
2
+
3
+ Generated: September 20, 2025
4
+
5
+ ## Performance Comparison Summary
6
+
7
+ ### Test Configuration
8
+
9
+ - **Concurrency**: 50 concurrent connections
10
+ - **Requests**: 10,000 total requests
11
+ - **Machine**: Linux 6.15.9-arch1-1
12
+ - **Test**: Simple JSON hello world endpoint
13
+
14
+ ## Framework Results
15
+
16
+ | Framework | RPS | Latency (mean) | Relative Performance |
17
+ | --------------- | ---------- | -------------- | ----------------------------- |
18
+ | **Django-Bolt** | **43,240** | **1.2ms** | **11.3x faster than FastAPI** |
19
+ | Robyn | 11,246 | 4.4ms | 2.9x faster than FastAPI |
20
+ | FastAPI | 3,813 | 13.1ms | Baseline |
21
+
22
+ ## Django-Bolt Scaling Analysis
23
+
24
+ | Configuration | RPS | Scaling Factor | Notes |
25
+ | ----------------------- | ------- | -------------- | -------------------------- |
26
+ | 1 process × 1 worker | ~19,000 | 1x | Single GIL baseline |
27
+ | 2 processes × 2 workers | ~43,000 | 2.3x | Multi-process advantage |
28
+ | 4 processes × 1 worker | ~72,000 | 3.8x | Maximum tested performance |
29
+
30
+ ## ORM Performance (with Django models)
31
+
32
+ | Test Type | RPS | Latency | Notes |
33
+ | ------------- | ------ | ------- | -------------------- |
34
+ | Hello (no DB) | 43,240 | 1.2ms | Pure API performance |
35
+ | ORM queries | 2,836 | 17.6ms | Django ORM + SQLite |
36
+
37
+ ## Key Insights
38
+
39
+ ### Why Django-Bolt is fastest:
40
+
41
+ 1. **Multi-process architecture**: Each process has isolated Python GIL
42
+ 2. **Actix-Web core**: Rust HTTP server vs Python async event loops
43
+ 3. **SO_REUSEPORT**: OS kernel load balancing across processes
44
+ 4. **Minimal Python overhead**: Single-arg handlers, lazy field access
45
+
46
+ ### Architecture advantage:
47
+
48
+ - **Processes > Workers**: For Python frameworks, separate processes avoid GIL contention
49
+ - **1-2 workers per process**: Optimal for I/O concurrency without GIL thrashing
50
+ - **Linear scaling**: Each additional process adds ~19-25k RPS capacity
51
+
52
+ ### Production recommendations:
53
+
54
+ - **Development**: 2 processes × 2 workers (good balance)
55
+ - **Production**: 1 process per CPU core × 1-2 workers
56
+ - **High load**: Scale horizontally with more instances
57
+
58
+ ## Historical Performance
59
+
60
+ ### Before optimizations:
61
+
62
+ - Single process, multiple workers: ~22k RPS (GIL limited)
63
+ - Embedded mode: ~26k RPS (minimal Django overhead)
64
+
65
+ ### After optimizations:
66
+
67
+ - Multi-process: ~43-75k RPS (GIL isolation)
68
+ - Django integration: ~43k RPS (full compatibility)
69
+
70
+ ## Conclusion
71
+
72
+ Django-Bolt achieves **11x better performance than FastAPI** while providing:
73
+
74
+ - Full Django compatibility (models, admin, migrations)
75
+ - Zero-config autodiscovery
76
+ - Multi-app support with route prefixes
77
+ - Production-ready multi-process scaling
78
+
79
+ The multi-process + SO_REUSEPORT architecture gives Django-Bolt a massive performance advantage over single-process Python frameworks.
@@ -0,0 +1,196 @@
1
+ # Django-Bolt Benchmark
2
+ Generated: Sat Oct 18 12:41:24 AM PKT 2025
3
+ Config: 4 processes × 1 workers | C=100 N=10000
4
+
5
+ ## Root Endpoint Performance
6
+ Failed requests: 0
7
+ Requests per second: 37567.43 [#/sec] (mean)
8
+ Time per request: 2.662 [ms] (mean)
9
+ Time per request: 0.027 [ms] (mean, across all concurrent requests)
10
+
11
+ ## Response Type Endpoints
12
+ ### Header Endpoint (/header)
13
+ Failed requests: 0
14
+ Requests per second: 44142.51 [#/sec] (mean)
15
+ Time per request: 2.265 [ms] (mean)
16
+ Time per request: 0.023 [ms] (mean, across all concurrent requests)
17
+ ### Cookie Endpoint (/cookie)
18
+ Failed requests: 0
19
+ Requests per second: 42932.46 [#/sec] (mean)
20
+ Time per request: 2.329 [ms] (mean)
21
+ Time per request: 0.023 [ms] (mean, across all concurrent requests)
22
+ ### Exception Endpoint (/exc)
23
+ Failed requests: 0
24
+ Requests per second: 42099.95 [#/sec] (mean)
25
+ Time per request: 2.375 [ms] (mean)
26
+ Time per request: 0.024 [ms] (mean, across all concurrent requests)
27
+ ### HTML Response (/html)
28
+ Failed requests: 0
29
+ Requests per second: 45474.39 [#/sec] (mean)
30
+ Time per request: 2.199 [ms] (mean)
31
+ Time per request: 0.022 [ms] (mean, across all concurrent requests)
32
+ ### Redirect Response (/redirect)
33
+ Failed requests: 0
34
+ Requests per second: 45148.36 [#/sec] (mean)
35
+ Time per request: 2.215 [ms] (mean)
36
+ Time per request: 0.022 [ms] (mean, across all concurrent requests)
37
+ ### File Static via FileResponse (/file-static)
38
+ Failed requests: 0
39
+ Requests per second: 18456.69 [#/sec] (mean)
40
+ Time per request: 5.418 [ms] (mean)
41
+ Time per request: 0.054 [ms] (mean, across all concurrent requests)
42
+
43
+ ## Streaming and SSE Performance
44
+ ### Streaming Plain Text (/stream)
45
+ Total: 0.3774 secs
46
+ Slowest: 0.0126 secs
47
+ Fastest: 0.0002 secs
48
+ Average: 0.0036 secs
49
+ Requests/sec: 26497.3948
50
+ Status code distribution:
51
+ ### Server-Sent Events (/sse)
52
+ Total: 0.3471 secs
53
+ Slowest: 0.0230 secs
54
+ Fastest: 0.0002 secs
55
+ Average: 0.0033 secs
56
+ Requests/sec: 28811.9604
57
+ Status code distribution:
58
+ ### Server-Sent Events (async) (/sse-async)
59
+ Total: 0.7192 secs
60
+ Slowest: 0.0171 secs
61
+ Fastest: 0.0003 secs
62
+ Average: 0.0070 secs
63
+ Requests/sec: 13903.5586
64
+ Status code distribution:
65
+ ### OpenAI Chat Completions (stream) (/v1/chat/completions)
66
+ Total: 1.1489 secs
67
+ Slowest: 0.0230 secs
68
+ Fastest: 0.0004 secs
69
+ Average: 0.0109 secs
70
+ Requests/sec: 8704.1751
71
+ Status code distribution:
72
+ ### OpenAI Chat Completions (async stream) (/v1/chat/completions-async)
73
+ Total: 1.5605 secs
74
+ Slowest: 0.0443 secs
75
+ Fastest: 0.0005 secs
76
+ Average: 0.0143 secs
77
+ Requests/sec: 6408.3195
78
+ Status code distribution:
79
+
80
+ ## Items GET Performance (/items/1?q=hello)
81
+ Failed requests: 0
82
+ Requests per second: 40794.51 [#/sec] (mean)
83
+ Time per request: 2.451 [ms] (mean)
84
+ Time per request: 0.025 [ms] (mean, across all concurrent requests)
85
+
86
+ ## Items PUT JSON Performance (/items/1)
87
+ Failed requests: 0
88
+ Requests per second: 36431.47 [#/sec] (mean)
89
+ Time per request: 2.745 [ms] (mean)
90
+ Time per request: 0.027 [ms] (mean, across all concurrent requests)
91
+
92
+ ## ORM Performance
93
+ ### Users Full10 (/users/full10)
94
+ Failed requests: 0
95
+ Requests per second: 6900.28 [#/sec] (mean)
96
+ Time per request: 14.492 [ms] (mean)
97
+ Time per request: 0.145 [ms] (mean, across all concurrent requests)
98
+ ### Users Mini10 (/users/mini10)
99
+ Failed requests: 0
100
+ Requests per second: 8107.38 [#/sec] (mean)
101
+ Time per request: 12.334 [ms] (mean)
102
+ Time per request: 0.123 [ms] (mean, across all concurrent requests)
103
+
104
+ ## Class-Based Views (CBV) Performance
105
+ ### Simple APIView GET (/cbv-simple)
106
+ Failed requests: 0
107
+ Requests per second: 45217.77 [#/sec] (mean)
108
+ Time per request: 2.212 [ms] (mean)
109
+ Time per request: 0.022 [ms] (mean, across all concurrent requests)
110
+ ### Simple APIView POST (/cbv-simple)
111
+ Failed requests: 0
112
+ Requests per second: 40215.39 [#/sec] (mean)
113
+ Time per request: 2.487 [ms] (mean)
114
+ Time per request: 0.025 [ms] (mean, across all concurrent requests)
115
+ ### Items100 ViewSet GET (/cbv-items100)
116
+ Failed requests: 0
117
+ Requests per second: 21766.34 [#/sec] (mean)
118
+ Time per request: 4.594 [ms] (mean)
119
+ Time per request: 0.046 [ms] (mean, across all concurrent requests)
120
+
121
+ ## CBV Items - Basic Operations
122
+ ### CBV Items GET (Retrieve) (/cbv-items/1)
123
+ Failed requests: 0
124
+ Requests per second: 39836.83 [#/sec] (mean)
125
+ Time per request: 2.510 [ms] (mean)
126
+ Time per request: 0.025 [ms] (mean, across all concurrent requests)
127
+ ### CBV Items PUT (Update) (/cbv-items/1)
128
+ Failed requests: 0
129
+ Requests per second: 39078.53 [#/sec] (mean)
130
+ Time per request: 2.559 [ms] (mean)
131
+ Time per request: 0.026 [ms] (mean, across all concurrent requests)
132
+
133
+ ## CBV Additional Benchmarks
134
+ ### CBV Bench Parse (POST /cbv-bench-parse)
135
+ Failed requests: 0
136
+ Requests per second: 39609.92 [#/sec] (mean)
137
+ Time per request: 2.525 [ms] (mean)
138
+ Time per request: 0.025 [ms] (mean, across all concurrent requests)
139
+ ### CBV Response Types (/cbv-response)
140
+ Failed requests: 0
141
+ Requests per second: 42841.41 [#/sec] (mean)
142
+ Time per request: 2.334 [ms] (mean)
143
+ Time per request: 0.023 [ms] (mean, across all concurrent requests)
144
+ ### CBV Streaming Plain Text (/cbv-stream)
145
+ Total: 0.4026 secs
146
+ Slowest: 0.0165 secs
147
+ Fastest: 0.0002 secs
148
+ Average: 0.0039 secs
149
+ Requests/sec: 24838.4183
150
+ Status code distribution:
151
+ ### CBV Server-Sent Events (/cbv-sse)
152
+ Total: 0.3583 secs
153
+ Slowest: 0.0179 secs
154
+ Fastest: 0.0002 secs
155
+ Average: 0.0034 secs
156
+ Requests/sec: 27911.2445
157
+ Status code distribution:
158
+ ### CBV Chat Completions (stream) (/cbv-chat-completions)
159
+ Total: 1.5259 secs
160
+ Slowest: 0.0324 secs
161
+ Fastest: 0.0005 secs
162
+ Average: 0.0145 secs
163
+ Requests/sec: 6553.3101
164
+ Status code distribution:
165
+
166
+ ## ORM Performance with CBV
167
+ ### Users CBV Mini10 (List) (/users/cbv-mini10)
168
+ Failed requests: 0
169
+ Requests per second: 8407.60 [#/sec] (mean)
170
+ Time per request: 11.894 [ms] (mean)
171
+ Time per request: 0.119 [ms] (mean, across all concurrent requests)
172
+
173
+
174
+ ## Form and File Upload Performance
175
+ ### Form Data (POST /form)
176
+ Failed requests: 0
177
+ Requests per second: 35386.46 [#/sec] (mean)
178
+ Time per request: 2.826 [ms] (mean)
179
+ Time per request: 0.028 [ms] (mean, across all concurrent requests)
180
+ ### File Upload (POST /upload)
181
+ Failed requests: 0
182
+ Requests per second: 7241.09 [#/sec] (mean)
183
+ Time per request: 13.810 [ms] (mean)
184
+ Time per request: 0.138 [ms] (mean, across all concurrent requests)
185
+ ### Mixed Form with Files (POST /mixed-form)
186
+ Failed requests: 0
187
+ Requests per second: 7420.36 [#/sec] (mean)
188
+ Time per request: 13.476 [ms] (mean)
189
+ Time per request: 0.135 [ms] (mean, across all concurrent requests)
190
+
191
+ ## Django Ninja-style Benchmarks
192
+ ### JSON Parse/Validate (POST /bench/parse)
193
+ Failed requests: 0
194
+ Requests per second: 40723.41 [#/sec] (mean)
195
+ Time per request: 2.456 [ms] (mean)
196
+ Time per request: 0.025 [ms] (mean, across all concurrent requests)
@@ -0,0 +1,196 @@
1
+ # Django-Bolt Benchmark
2
+ Generated: Sat Oct 18 12:49:06 AM PKT 2025
3
+ Config: 4 processes × 1 workers | C=100 N=10000
4
+
5
+ ## Root Endpoint Performance
6
+ Failed requests: 0
7
+ Requests per second: 40983.27 [#/sec] (mean)
8
+ Time per request: 2.440 [ms] (mean)
9
+ Time per request: 0.024 [ms] (mean, across all concurrent requests)
10
+
11
+ ## Response Type Endpoints
12
+ ### Header Endpoint (/header)
13
+ Failed requests: 0
14
+ Requests per second: 42890.84 [#/sec] (mean)
15
+ Time per request: 2.332 [ms] (mean)
16
+ Time per request: 0.023 [ms] (mean, across all concurrent requests)
17
+ ### Cookie Endpoint (/cookie)
18
+ Failed requests: 0
19
+ Requests per second: 42526.41 [#/sec] (mean)
20
+ Time per request: 2.351 [ms] (mean)
21
+ Time per request: 0.024 [ms] (mean, across all concurrent requests)
22
+ ### Exception Endpoint (/exc)
23
+ Failed requests: 0
24
+ Requests per second: 43493.58 [#/sec] (mean)
25
+ Time per request: 2.299 [ms] (mean)
26
+ Time per request: 0.023 [ms] (mean, across all concurrent requests)
27
+ ### HTML Response (/html)
28
+ Failed requests: 0
29
+ Requests per second: 45212.25 [#/sec] (mean)
30
+ Time per request: 2.212 [ms] (mean)
31
+ Time per request: 0.022 [ms] (mean, across all concurrent requests)
32
+ ### Redirect Response (/redirect)
33
+ Failed requests: 0
34
+ Requests per second: 44796.44 [#/sec] (mean)
35
+ Time per request: 2.232 [ms] (mean)
36
+ Time per request: 0.022 [ms] (mean, across all concurrent requests)
37
+ ### File Static via FileResponse (/file-static)
38
+ Failed requests: 0
39
+ Requests per second: 21658.48 [#/sec] (mean)
40
+ Time per request: 4.617 [ms] (mean)
41
+ Time per request: 0.046 [ms] (mean, across all concurrent requests)
42
+
43
+ ## Streaming and SSE Performance
44
+ ### Streaming Plain Text (/stream)
45
+ Total: 0.3813 secs
46
+ Slowest: 0.0101 secs
47
+ Fastest: 0.0002 secs
48
+ Average: 0.0036 secs
49
+ Requests/sec: 26224.3558
50
+ Status code distribution:
51
+ ### Server-Sent Events (/sse)
52
+ Total: 0.3354 secs
53
+ Slowest: 0.0110 secs
54
+ Fastest: 0.0002 secs
55
+ Average: 0.0032 secs
56
+ Requests/sec: 29812.1442
57
+ Status code distribution:
58
+ ### Server-Sent Events (async) (/sse-async)
59
+ Total: 0.7343 secs
60
+ Slowest: 0.0174 secs
61
+ Fastest: 0.0003 secs
62
+ Average: 0.0071 secs
63
+ Requests/sec: 13619.1451
64
+ Status code distribution:
65
+ ### OpenAI Chat Completions (stream) (/v1/chat/completions)
66
+ Total: 1.1388 secs
67
+ Slowest: 0.0255 secs
68
+ Fastest: 0.0004 secs
69
+ Average: 0.0110 secs
70
+ Requests/sec: 8780.8745
71
+ Status code distribution:
72
+ ### OpenAI Chat Completions (async stream) (/v1/chat/completions-async)
73
+ Total: 1.5168 secs
74
+ Slowest: 0.0325 secs
75
+ Fastest: 0.0005 secs
76
+ Average: 0.0148 secs
77
+ Requests/sec: 6592.8514
78
+ Status code distribution:
79
+
80
+ ## Items GET Performance (/items/1?q=hello)
81
+ Failed requests: 0
82
+ Requests per second: 40951.89 [#/sec] (mean)
83
+ Time per request: 2.442 [ms] (mean)
84
+ Time per request: 0.024 [ms] (mean, across all concurrent requests)
85
+
86
+ ## Items PUT JSON Performance (/items/1)
87
+ Failed requests: 0
88
+ Requests per second: 37361.81 [#/sec] (mean)
89
+ Time per request: 2.677 [ms] (mean)
90
+ Time per request: 0.027 [ms] (mean, across all concurrent requests)
91
+
92
+ ## ORM Performance
93
+ ### Users Full10 (/users/full10)
94
+ Failed requests: 0
95
+ Requests per second: 6998.91 [#/sec] (mean)
96
+ Time per request: 14.288 [ms] (mean)
97
+ Time per request: 0.143 [ms] (mean, across all concurrent requests)
98
+ ### Users Mini10 (/users/mini10)
99
+ Failed requests: 0
100
+ Requests per second: 8021.32 [#/sec] (mean)
101
+ Time per request: 12.467 [ms] (mean)
102
+ Time per request: 0.125 [ms] (mean, across all concurrent requests)
103
+
104
+ ## Class-Based Views (CBV) Performance
105
+ ### Simple APIView GET (/cbv-simple)
106
+ Failed requests: 0
107
+ Requests per second: 45106.00 [#/sec] (mean)
108
+ Time per request: 2.217 [ms] (mean)
109
+ Time per request: 0.022 [ms] (mean, across all concurrent requests)
110
+ ### Simple APIView POST (/cbv-simple)
111
+ Failed requests: 0
112
+ Requests per second: 40089.48 [#/sec] (mean)
113
+ Time per request: 2.494 [ms] (mean)
114
+ Time per request: 0.025 [ms] (mean, across all concurrent requests)
115
+ ### Items100 ViewSet GET (/cbv-items100)
116
+ Failed requests: 0
117
+ Requests per second: 21931.22 [#/sec] (mean)
118
+ Time per request: 4.560 [ms] (mean)
119
+ Time per request: 0.046 [ms] (mean, across all concurrent requests)
120
+
121
+ ## CBV Items - Basic Operations
122
+ ### CBV Items GET (Retrieve) (/cbv-items/1)
123
+ Failed requests: 0
124
+ Requests per second: 40408.94 [#/sec] (mean)
125
+ Time per request: 2.475 [ms] (mean)
126
+ Time per request: 0.025 [ms] (mean, across all concurrent requests)
127
+ ### CBV Items PUT (Update) (/cbv-items/1)
128
+ Failed requests: 0
129
+ Requests per second: 39077.15 [#/sec] (mean)
130
+ Time per request: 2.559 [ms] (mean)
131
+ Time per request: 0.026 [ms] (mean, across all concurrent requests)
132
+
133
+ ## CBV Additional Benchmarks
134
+ ### CBV Bench Parse (POST /cbv-bench-parse)
135
+ Failed requests: 0
136
+ Requests per second: 39930.20 [#/sec] (mean)
137
+ Time per request: 2.504 [ms] (mean)
138
+ Time per request: 0.025 [ms] (mean, across all concurrent requests)
139
+ ### CBV Response Types (/cbv-response)
140
+ Failed requests: 0
141
+ Requests per second: 43763.68 [#/sec] (mean)
142
+ Time per request: 2.285 [ms] (mean)
143
+ Time per request: 0.023 [ms] (mean, across all concurrent requests)
144
+ ### CBV Streaming Plain Text (/cbv-stream)
145
+ Total: 0.4161 secs
146
+ Slowest: 0.0167 secs
147
+ Fastest: 0.0002 secs
148
+ Average: 0.0040 secs
149
+ Requests/sec: 24033.7428
150
+ Status code distribution:
151
+ ### CBV Server-Sent Events (/cbv-sse)
152
+ Total: 0.3840 secs
153
+ Slowest: 0.0165 secs
154
+ Fastest: 0.0002 secs
155
+ Average: 0.0037 secs
156
+ Requests/sec: 26042.4787
157
+ Status code distribution:
158
+ ### CBV Chat Completions (stream) (/cbv-chat-completions)
159
+ Total: 1.5248 secs
160
+ Slowest: 0.0342 secs
161
+ Fastest: 0.0005 secs
162
+ Average: 0.0148 secs
163
+ Requests/sec: 6558.3997
164
+ Status code distribution:
165
+
166
+ ## ORM Performance with CBV
167
+ ### Users CBV Mini10 (List) (/users/cbv-mini10)
168
+ Failed requests: 0
169
+ Requests per second: 8269.70 [#/sec] (mean)
170
+ Time per request: 12.092 [ms] (mean)
171
+ Time per request: 0.121 [ms] (mean, across all concurrent requests)
172
+
173
+
174
+ ## Form and File Upload Performance
175
+ ### Form Data (POST /form)
176
+ Failed requests: 0
177
+ Requests per second: 34718.36 [#/sec] (mean)
178
+ Time per request: 2.880 [ms] (mean)
179
+ Time per request: 0.029 [ms] (mean, across all concurrent requests)
180
+ ### File Upload (POST /upload)
181
+ Failed requests: 0
182
+ Requests per second: 7285.73 [#/sec] (mean)
183
+ Time per request: 13.725 [ms] (mean)
184
+ Time per request: 0.137 [ms] (mean, across all concurrent requests)
185
+ ### Mixed Form with Files (POST /mixed-form)
186
+ Failed requests: 0
187
+ Requests per second: 7305.53 [#/sec] (mean)
188
+ Time per request: 13.688 [ms] (mean)
189
+ Time per request: 0.137 [ms] (mean, across all concurrent requests)
190
+
191
+ ## Django Ninja-style Benchmarks
192
+ ### JSON Parse/Validate (POST /bench/parse)
193
+ Failed requests: 0
194
+ Requests per second: 40937.97 [#/sec] (mean)
195
+ Time per request: 2.443 [ms] (mean)
196
+ Time per request: 0.024 [ms] (mean, across all concurrent requests)