tachyon-api 1.3.0__tar.gz → 1.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (264) hide show
  1. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/MANIFEST.in +3 -1
  2. tachyon_api-1.3.0/README.md → tachyon_api-1.4.0/PKG-INFO +89 -129
  3. tachyon_api-1.4.0/README.md +363 -0
  4. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/pyproject.toml +17 -20
  5. tachyon_api-1.4.0/setup.cfg +4 -0
  6. tachyon_api-1.4.0/setup.py +62 -0
  7. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/app/__init__.py +15 -10
  8. tachyon_api-1.4.0/tachyon_api/app/_docs_routes.py +55 -0
  9. tachyon_api-1.4.0/tachyon_api/app/_error_static.py +23 -0
  10. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/app/_exception_table.py +19 -13
  11. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/app/_exception_table.pyx +19 -13
  12. tachyon_api-1.4.0/tachyon_api/app/_fast_asgi_factory.py +33 -0
  13. tachyon_api-1.4.0/tachyon_api/app/_handler_factory.py +34 -0
  14. tachyon_api-1.4.0/tachyon_api/app/_route_installer.py +60 -0
  15. tachyon_api-1.4.0/tachyon_api/background.py +34 -0
  16. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/cache.py +96 -44
  17. tachyon_api-1.4.0/tachyon_api/cli/commands/__init__.py +1 -0
  18. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/cli/commands/lint.py +3 -1
  19. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/cli/commands/openapi.py +32 -40
  20. tachyon_api-1.4.0/tachyon_api/cli/commands/routes.py +51 -0
  21. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/cli/commands/run.py +17 -9
  22. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/cli/commands/skill.py +39 -21
  23. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/cli/main.py +2 -2
  24. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/cli/templates/ai_skill.py +80 -41
  25. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/cli/templates/project.py +1 -1
  26. tachyon_api-1.4.0/tachyon_api/cli/utils.py +73 -0
  27. tachyon_api-1.4.0/tachyon_api/core/lifecycle.py +54 -0
  28. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/core/websocket.py +42 -10
  29. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/di.py +3 -0
  30. tachyon_api-1.4.0/tachyon_api/files.py +60 -0
  31. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/models.py +11 -12
  32. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/openapi/__init__.py +10 -6
  33. tachyon_api-1.4.0/tachyon_api/openapi/_config.py +163 -0
  34. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/openapi/_generator.py +8 -4
  35. tachyon_api-1.4.0/tachyon_api/openapi/_html_renderers.py +129 -0
  36. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/openapi/_param_schemas.py +10 -2
  37. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/openapi/_route_builder.py +36 -15
  38. tachyon_api-1.4.0/tachyon_api/openapi/_struct_schemas.py +106 -0
  39. tachyon_api-1.4.0/tachyon_api/processing/_body_errors.py +5 -0
  40. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/_extractors/__init__.py +0 -3
  41. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/_extractors/body.py +4 -0
  42. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/_extractors/body.pyx +4 -0
  43. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/_extractors/body_limit.pxd +1 -1
  44. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/_extractors/body_limit.pyx +1 -1
  45. tachyon_api-1.4.0/tachyon_api/processing/_extractors/file.py +30 -0
  46. tachyon_api-1.4.0/tachyon_api/processing/_extractors/file.pyx +27 -0
  47. tachyon_api-1.4.0/tachyon_api/processing/_extractors/form.py +28 -0
  48. tachyon_api-1.4.0/tachyon_api/processing/_extractors/form.pyx +28 -0
  49. tachyon_api-1.4.0/tachyon_api/processing/_extractors/path.pyx +40 -0
  50. tachyon_api-1.4.0/tachyon_api/processing/_extractors/query.pyx +26 -0
  51. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/_extractors/query_list.py +8 -5
  52. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/_extractors/query_list.pyx +8 -5
  53. tachyon_api-1.4.0/tachyon_api/processing/_request.py +38 -0
  54. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/compiler.py +30 -44
  55. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/compiler.pyx +32 -44
  56. tachyon_api-1.4.0/tachyon_api/processing/dependencies/__init__.py +5 -0
  57. tachyon_api-1.4.0/tachyon_api/processing/dependencies/_callable_factory.py +56 -0
  58. tachyon_api-1.4.0/tachyon_api/processing/dependencies/_class_factory.py +36 -0
  59. tachyon_api-1.4.0/tachyon_api/processing/dependencies/_class_factory.pyx +38 -0
  60. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/dependencies/_override_lookup.py +3 -0
  61. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/dependencies/_override_lookup.pyx +3 -0
  62. tachyon_api-1.4.0/tachyon_api/processing/dependencies/_resolver.py +181 -0
  63. tachyon_api-1.4.0/tachyon_api/processing/dependencies/_resolver.pyx +179 -0
  64. tachyon_api-1.4.0/tachyon_api/processing/dependencies/_sig_cache.py +160 -0
  65. tachyon_api-1.4.0/tachyon_api/processing/dispatch.py +43 -0
  66. tachyon_api-1.4.0/tachyon_api/processing/dispatch.pyx +44 -0
  67. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/parameters.py +3 -3
  68. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/parameters.pyx +4 -4
  69. tachyon_api-1.4.0/tachyon_api/processing/response_processor.py +46 -0
  70. tachyon_api-1.4.0/tachyon_api/processing/response_processor.pyx +46 -0
  71. tachyon_api-1.4.0/tachyon_api/processing/scope.py +87 -0
  72. tachyon_api-1.4.0/tachyon_api/processing/scope.pyx +85 -0
  73. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/responses/__init__.py +0 -12
  74. tachyon_api-1.4.0/tachyon_api/responses/_background.py +15 -0
  75. tachyon_api-1.4.0/tachyon_api/responses/_bytes_response.py +26 -0
  76. tachyon_api-1.4.0/tachyon_api/responses/_bytes_response.pyx +27 -0
  77. tachyon_api-1.4.0/tachyon_api/responses/_caches.py +8 -0
  78. tachyon_api-1.4.0/tachyon_api/responses/_internal_error.py +9 -0
  79. tachyon_api-1.4.0/tachyon_api/responses/_internal_error.pyx +10 -0
  80. tachyon_api-1.4.0/tachyon_api/responses/_json_response.py +28 -0
  81. tachyon_api-1.4.0/tachyon_api/responses/_json_response.pyx +29 -0
  82. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/router.py +1 -1
  83. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/routing/trie.py +47 -40
  84. tachyon_api-1.4.0/tachyon_api/routing/trie.pyx +146 -0
  85. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/security/__init__.py +2 -5
  86. tachyon_api-1.4.0/tachyon_api/security/_api_keys.py +63 -0
  87. tachyon_api-1.4.0/tachyon_api/security/_credentials.py +21 -0
  88. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/security/_http_basic.py +1 -1
  89. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/security/_http_bearer.py +1 -1
  90. tachyon_api-1.4.0/tachyon_api/server.py +26 -0
  91. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/testing.py +15 -14
  92. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/utils/type_converter.py +30 -1
  93. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/utils/type_utils.py +2 -1
  94. {tachyon_api-1.3.0 → tachyon_api-1.4.0/tachyon_api.egg-info}/PKG-INFO +82 -149
  95. tachyon_api-1.4.0/tachyon_api.egg-info/SOURCES.txt +200 -0
  96. tachyon_api-1.4.0/tachyon_api.egg-info/dependency_links.txt +1 -0
  97. tachyon_api-1.4.0/tachyon_api.egg-info/entry_points.txt +2 -0
  98. tachyon_api-1.4.0/tachyon_api.egg-info/requires.txt +17 -0
  99. tachyon_api-1.4.0/tachyon_api.egg-info/top_level.txt +1 -0
  100. tachyon_api-1.4.0/tests/helpers.py +8 -0
  101. tachyon_api-1.4.0/tests/shared.py +24 -0
  102. tachyon_api-1.4.0/tests/test_app_core.py +51 -0
  103. tachyon_api-1.4.0/tests/test_asgi_handler_fastpath.py +157 -0
  104. tachyon_api-1.4.0/tests/test_audit_compiler_di_schema.py +574 -0
  105. tachyon_api-1.4.0/tests/test_audit_dx.py +145 -0
  106. tachyon_api-1.4.0/tests/test_audit_routing_contract.py +57 -0
  107. tachyon_api-1.4.0/tests/test_audit_runtime_contract.py +420 -0
  108. tachyon_api-1.4.0/tests/test_audit_server_facade.py +25 -0
  109. tachyon_api-1.4.0/tests/test_audit_wheel.py +27 -0
  110. tachyon_api-1.4.0/tests/test_background_tasks.py +197 -0
  111. tachyon_api-1.4.0/tests/test_body_validation.py +147 -0
  112. tachyon_api-1.4.0/tests/test_cache_decorator.py +389 -0
  113. tachyon_api-1.4.0/tests/test_cli.py +309 -0
  114. tachyon_api-1.4.0/tests/test_continuous_cache.py +214 -0
  115. tachyon_api-1.4.0/tests/test_continuous_di.py +394 -0
  116. tachyon_api-1.4.0/tests/test_continuous_di_graph.py +70 -0
  117. tachyon_api-1.4.0/tests/test_continuous_form.py +39 -0
  118. tachyon_api-1.4.0/tests/test_continuous_responses.py +75 -0
  119. tachyon_api-1.4.0/tests/test_continuous_uploads.py +183 -0
  120. tachyon_api-1.4.0/tests/test_cookie_params.py +99 -0
  121. tachyon_api-1.4.0/tests/test_cors_middleware.py +107 -0
  122. tachyon_api-1.4.0/tests/test_default_json_response.py +48 -0
  123. tachyon_api-1.4.0/tests/test_dependency_injection.py +190 -0
  124. tachyon_api-1.4.0/tests/test_depends_callable.py +255 -0
  125. tachyon_api-1.4.0/tests/test_documentation_contracts.py +164 -0
  126. tachyon_api-1.4.0/tests/test_error_format.py +66 -0
  127. tachyon_api-1.4.0/tests/test_exception_handling.py +351 -0
  128. tachyon_api-1.4.0/tests/test_file_handling.py +252 -0
  129. tachyon_api-1.4.0/tests/test_header_params.py +175 -0
  130. tachyon_api-1.4.0/tests/test_http_methods.py +111 -0
  131. tachyon_api-1.4.0/tests/test_lifecycle.py +190 -0
  132. tachyon_api-1.4.0/tests/test_local_release_runtime.py +149 -0
  133. tachyon_api-1.4.0/tests/test_local_release_tools.py +36 -0
  134. tachyon_api-1.4.0/tests/test_logger_middleware.py +77 -0
  135. tachyon_api-1.4.0/tests/test_middleware.py +201 -0
  136. tachyon_api-1.4.0/tests/test_openapi.py +359 -0
  137. tachyon_api-1.4.0/tests/test_openapi_params.py +72 -0
  138. tachyon_api-1.4.0/tests/test_openapi_struct_deep.py +82 -0
  139. tachyon_api-1.4.0/tests/test_orjson_integration.py +235 -0
  140. tachyon_api-1.4.0/tests/test_path_params.py +84 -0
  141. tachyon_api-1.4.0/tests/test_query_params.py +156 -0
  142. tachyon_api-1.4.0/tests/test_radix_trie.py +187 -0
  143. tachyon_api-1.4.0/tests/test_request_injection.py +141 -0
  144. tachyon_api-1.4.0/tests/test_response_model.py +64 -0
  145. tachyon_api-1.4.0/tests/test_responses.py +336 -0
  146. tachyon_api-1.4.0/tests/test_router.py +379 -0
  147. tachyon_api-1.4.0/tests/test_security.py +394 -0
  148. tachyon_api-1.4.0/tests/test_testing_utils.py +284 -0
  149. tachyon_api-1.4.0/tests/test_trie_dispatch_edges.py +209 -0
  150. tachyon_api-1.4.0/tests/test_utils.py +113 -0
  151. tachyon_api-1.4.0/tests/test_websockets.py +204 -0
  152. tachyon_api-1.3.0/setup.py +0 -55
  153. tachyon_api-1.3.0/tachyon_api/_server_fast.pyx +0 -102
  154. tachyon_api-1.3.0/tachyon_api/app/_404.py +0 -17
  155. tachyon_api-1.3.0/tachyon_api/app/_405.py +0 -7
  156. tachyon_api-1.3.0/tachyon_api/app/_docs_routes.py +0 -43
  157. tachyon_api-1.3.0/tachyon_api/app/_fast_asgi_factory.py +0 -61
  158. tachyon_api-1.3.0/tachyon_api/app/_handler_factory.py +0 -69
  159. tachyon_api-1.3.0/tachyon_api/app/_route_installer.py +0 -41
  160. tachyon_api-1.3.0/tachyon_api/background.py +0 -36
  161. tachyon_api-1.3.0/tachyon_api/cli/commands/__init__.py +0 -5
  162. tachyon_api-1.3.0/tachyon_api/cli/commands/routes.py +0 -70
  163. tachyon_api-1.3.0/tachyon_api/cli/utils.py +0 -39
  164. tachyon_api-1.3.0/tachyon_api/core/lifecycle.py +0 -64
  165. tachyon_api-1.3.0/tachyon_api/files.py +0 -28
  166. tachyon_api-1.3.0/tachyon_api/openapi/_config.py +0 -51
  167. tachyon_api-1.3.0/tachyon_api/openapi/_factory.py +0 -56
  168. tachyon_api-1.3.0/tachyon_api/openapi/_format_map.py +0 -12
  169. tachyon_api-1.3.0/tachyon_api/openapi/_info.py +0 -52
  170. tachyon_api-1.3.0/tachyon_api/openapi/_redoc_html.py +0 -37
  171. tachyon_api-1.3.0/tachyon_api/openapi/_safe_json.py +0 -15
  172. tachyon_api-1.3.0/tachyon_api/openapi/_scalar_html.py +0 -39
  173. tachyon_api-1.3.0/tachyon_api/openapi/_server.py +0 -16
  174. tachyon_api-1.3.0/tachyon_api/openapi/_struct_schemas.py +0 -81
  175. tachyon_api-1.3.0/tachyon_api/openapi/_swagger_html.py +0 -46
  176. tachyon_api-1.3.0/tachyon_api/processing/_extractors/_base.py +0 -16
  177. tachyon_api-1.3.0/tachyon_api/processing/_extractors/file.py +0 -26
  178. tachyon_api-1.3.0/tachyon_api/processing/_extractors/file.pyx +0 -23
  179. tachyon_api-1.3.0/tachyon_api/processing/_extractors/form.py +0 -17
  180. tachyon_api-1.3.0/tachyon_api/processing/_extractors/form.pyx +0 -14
  181. tachyon_api-1.3.0/tachyon_api/processing/_extractors/path.pyx +0 -91
  182. tachyon_api-1.3.0/tachyon_api/processing/_extractors/query.pyx +0 -80
  183. tachyon_api-1.3.0/tachyon_api/processing/dependencies/__init__.py +0 -6
  184. tachyon_api-1.3.0/tachyon_api/processing/dependencies/_callable_factory.py +0 -55
  185. tachyon_api-1.3.0/tachyon_api/processing/dependencies/_circular_detector.py +0 -23
  186. tachyon_api-1.3.0/tachyon_api/processing/dependencies/_circular_detector.pyx +0 -25
  187. tachyon_api-1.3.0/tachyon_api/processing/dependencies/_class_factory.py +0 -32
  188. tachyon_api-1.3.0/tachyon_api/processing/dependencies/_class_factory.pyx +0 -35
  189. tachyon_api-1.3.0/tachyon_api/processing/dependencies/_resolver.py +0 -101
  190. tachyon_api-1.3.0/tachyon_api/processing/dependencies/_resolver.pyx +0 -89
  191. tachyon_api-1.3.0/tachyon_api/processing/dependencies/_sig_cache.py +0 -20
  192. tachyon_api-1.3.0/tachyon_api/processing/dispatch.py +0 -87
  193. tachyon_api-1.3.0/tachyon_api/processing/dispatch.pyx +0 -97
  194. tachyon_api-1.3.0/tachyon_api/processing/response_processor.py +0 -55
  195. tachyon_api-1.3.0/tachyon_api/processing/response_processor.pyx +0 -46
  196. tachyon_api-1.3.0/tachyon_api/processing/scope.py +0 -100
  197. tachyon_api-1.3.0/tachyon_api/processing/scope.pyx +0 -92
  198. tachyon_api-1.3.0/tachyon_api/responses/_bytes_response.py +0 -32
  199. tachyon_api-1.3.0/tachyon_api/responses/_bytes_response.pyx +0 -41
  200. tachyon_api-1.3.0/tachyon_api/responses/_caches.py +0 -29
  201. tachyon_api-1.3.0/tachyon_api/responses/_internal_error.py +0 -51
  202. tachyon_api-1.3.0/tachyon_api/responses/_internal_error.pyx +0 -53
  203. tachyon_api-1.3.0/tachyon_api/responses/_json_response.py +0 -44
  204. tachyon_api-1.3.0/tachyon_api/responses/_json_response.pyx +0 -55
  205. tachyon_api-1.3.0/tachyon_api/responses/_wire.py +0 -26
  206. tachyon_api-1.3.0/tachyon_api/routing/trie.pyx +0 -134
  207. tachyon_api-1.3.0/tachyon_api/security/_api_key_base.py +0 -30
  208. tachyon_api-1.3.0/tachyon_api/security/_api_key_cookie.py +0 -16
  209. tachyon_api-1.3.0/tachyon_api/security/_api_key_header.py +0 -16
  210. tachyon_api-1.3.0/tachyon_api/security/_api_key_query.py +0 -21
  211. tachyon_api-1.3.0/tachyon_api/security/_basic_credentials.py +0 -11
  212. tachyon_api-1.3.0/tachyon_api/security/_bearer_credentials.py +0 -11
  213. tachyon_api-1.3.0/tachyon_api/server.py +0 -101
  214. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/LICENSE +0 -0
  215. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/__init__.py +0 -0
  216. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/app/_asgi_entry.py +0 -0
  217. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/app/_asgi_handler.py +0 -0
  218. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/app/_docs_schemas.py +0 -0
  219. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/app/_http_dispatch.py +0 -0
  220. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/app/_mw_stack.py +0 -0
  221. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/app/_registry.py +0 -0
  222. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/cli/__init__.py +0 -0
  223. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/cli/__main__.py +0 -0
  224. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/cli/commands/generate.py +0 -0
  225. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/cli/commands/new.py +0 -0
  226. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/cli/templates/__init__.py +0 -0
  227. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/cli/templates/service.py +0 -0
  228. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/core/__init__.py +0 -0
  229. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/exceptions.py +0 -0
  230. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/middlewares/__init__.py +0 -0
  231. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/middlewares/core.py +0 -0
  232. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/middlewares/cors.py +0 -0
  233. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/middlewares/logger.py +0 -0
  234. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/middlewares/security_headers.py +0 -0
  235. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/params.py +0 -0
  236. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/__init__.py +0 -0
  237. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/_extractors/_missing.py +0 -0
  238. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/_extractors/_missing.pyx +0 -0
  239. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/_extractors/body.pxd +0 -0
  240. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/_extractors/body_limit.py +0 -0
  241. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/_extractors/cookie.pxd +0 -0
  242. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/_extractors/cookie.py +0 -0
  243. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/_extractors/cookie.pyx +0 -0
  244. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/_extractors/file.pxd +0 -0
  245. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/_extractors/form.pxd +0 -0
  246. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/_extractors/header.pxd +0 -0
  247. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/_extractors/header.py +0 -0
  248. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/_extractors/header.pyx +0 -0
  249. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/_extractors/path.pxd +0 -0
  250. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/_extractors/path.py +0 -0
  251. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/_extractors/query.pxd +0 -0
  252. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/_extractors/query.py +0 -0
  253. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/_extractors/query_list.pxd +0 -0
  254. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/dependencies/_scope_cache.py +0 -0
  255. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/processing/dependencies/_scope_cache.pyx +0 -0
  256. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/responses/_constants.py +0 -0
  257. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/responses/_error.py +0 -0
  258. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/responses/_success.py +0 -0
  259. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/responses/_validation.py +0 -0
  260. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/routing/__init__.py +0 -0
  261. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/security/_bearer_parser.py +0 -0
  262. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/security/_bearer_parser.pyx +0 -0
  263. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/security/_oauth2_bearer.py +0 -0
  264. {tachyon_api-1.3.0 → tachyon_api-1.4.0}/tachyon_api/utils/__init__.py +0 -0
@@ -1,5 +1,7 @@
1
1
  # Include Cython source files in sdist so users can recompile
2
- recursive-include tachyon_api *.pyx
2
+ recursive-include tachyon_api *.pyx *.pxd
3
3
  include setup.py
4
+ include pyproject.toml
5
+ recursive-include tests *.py
4
6
  include README.md
5
7
  include LICENSE
@@ -1,14 +1,50 @@
1
+ Metadata-Version: 2.4
2
+ Name: tachyon-api
3
+ Version: 1.4.0
4
+ Summary: A lightweight, FastAPI-inspired web framework
5
+ Author: Juan Manuel Panozzo Zénere <jm.panozzozenere@gmail.com>
6
+ License: GPL-3.0-or-later
7
+ Requires-Python: >=3.10,<3.14
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE
10
+ Requires-Dist: starlette<2.0.0,>=1.3.1
11
+ Requires-Dist: uvicorn<0.36.0,>=0.35.0
12
+ Requires-Dist: httptools>=0.6.0
13
+ Requires-Dist: msgspec<0.20.0,>=0.19.0
14
+ Requires-Dist: typer<0.17.0,>=0.16.0
15
+ Requires-Dist: orjson<4.0.0,>=3.11.1
16
+ Requires-Dist: python-multipart<0.0.33,>=0.0.32
17
+ Provides-Extra: fast
18
+ Requires-Dist: cython>=3.0; extra == "fast"
19
+ Provides-Extra: test
20
+ Requires-Dist: httpx<0.29.0,>=0.28.1; extra == "test"
21
+ Provides-Extra: benchmark
22
+ Requires-Dist: fastapi<0.137.0,>=0.136.1; extra == "benchmark"
23
+ Requires-Dist: pydantic<3.0.0,>=2.13.4; extra == "benchmark"
24
+ Dynamic: author
25
+ Dynamic: description
26
+ Dynamic: description-content-type
27
+ Dynamic: license
28
+ Dynamic: license-file
29
+ Dynamic: provides-extra
30
+ Dynamic: requires-dist
31
+ Dynamic: requires-python
32
+ Dynamic: summary
33
+
1
34
  # 🚀 Tachyon API
2
35
 
3
- ![Version](https://img.shields.io/badge/version-1.2.x-blue.svg)
4
- ![Python](https://img.shields.io/badge/python-3.10+-brightgreen.svg)
36
+ ![Version](https://img.shields.io/badge/version-1.4.0-blue.svg)
37
+ ![Python](https://img.shields.io/badge/python-3.10--3.13-brightgreen.svg)
5
38
  ![License](https://img.shields.io/badge/license-GPL--3.0-orange.svg)
6
- ![Tests](https://img.shields.io/badge/tests-370%20passed-brightgreen.svg)
7
- ![Status](https://img.shields.io/badge/status-stable-brightgreen.svg)
39
+ ![Python](https://img.shields.io/badge/python-3.10%E2%80%933.13-blue.svg)
8
40
 
9
41
  **A lightweight, high-performance API framework for Python with the elegance of FastAPI and the speed of light.**
10
42
 
11
- Tachyon API combines the intuitive decorator-based syntax you love with minimal dependencies and maximal performance. Built with Test-Driven Development from the ground up, it offers a cleaner, faster alternative with full ASGI compatibility.
43
+ Tachyon API combines decorator-based routing, msgspec validation, and ASGI integration on Starlette. Endpoint metadata is prepared at registration to reduce request-time introspection.
44
+
45
+ 1.4.0 is validated through the [local release process](docs/quality/local-release.md). Native wheels are built and tested on macOS ARM64; the portable wheel supplies the Python fallback for platforms without a matching native wheel. Other operating systems are not validated by the local Mac runs.
46
+
47
+ The [1.4 migration guide](docs/17-migration-1.4.md) describes execution, body limits, resource lifetime, schema support and packaging changes.
12
48
 
13
49
  ## 🚀 Quick Start
14
50
 
@@ -36,6 +72,7 @@ def search(q: str = Query(...), limit: int = Query(10)):
36
72
 
37
73
  ```bash
38
74
  pip install tachyon-api
75
+ # Testing helpers: pip install "tachyon-api[test]"
39
76
  tachyon run # uvloop + httptools + reload, served at :8000
40
77
  ```
41
78
 
@@ -43,86 +80,42 @@ tachyon run # uvloop + httptools + reload, served at :8000
43
80
 
44
81
  ---
45
82
 
46
- ## ⚡ Performance
47
-
48
- Benchmarked against **FastAPI 0.136.1 (Pydantic v2)** · 1 worker · 100 concurrent connections · uvloop + httptools · precompiled Cython extensions (shipped by default — see below)
49
-
50
- | Scenario | FastAPI | Tachyon | Speedup |
51
- |---|---:|---:|---:|
52
- | Hello World | 10,314 req/s | **49,755 req/s** | **4.82x** |
53
- | Path + query params | 7,166 req/s | **37,598 req/s** | **5.25x** |
54
- | Body validation (Struct) | 8,371 req/s | **40,916 req/s** | **4.89x** |
55
- | Nested body (complex Struct) | 8,027 req/s | **39,994 req/s** | **4.98x** |
56
- | Response model serialization | 6,343 req/s | **47,561 req/s** | **7.50x** |
57
- | Header param + auth | 8,701 req/s | **45,415 req/s** | **5.22x** |
58
- | Dependency injection | 6,449 req/s | **45,610 req/s** | **7.07x** |
59
- | Multiple query params | 6,264 req/s | **34,111 req/s** | **5.45x** |
60
- | **Total throughput** | **61,635 req/s** | **340,960 req/s** | **5.53x** |
61
-
62
- **Latency:** ~2.3ms (Tachyon) vs ~13ms (FastAPI) on average.
63
-
64
- > Benchmark code in [`benchmark/`](./benchmark/). Run with `bash benchmark/run_benchmark.sh`.
65
-
66
- ### Precompiled wheels — zero setup
67
-
68
- `pip install tachyon-api` ships **prebuilt wheels with all 27 Cython extensions already compiled** for:
69
-
70
- | Platform | Architectures | CPython |
71
- |---|---|---|
72
- | Linux | x86_64, aarch64 | 3.10 · 3.11 · 3.12 · 3.13 |
73
- | macOS | arm64 (Apple Silicon) | 3.10 · 3.11 · 3.12 · 3.13 |
74
- | Windows | x86_64 | 3.10 · 3.11 · 3.12 · 3.13 |
75
-
76
- No manual build step. No Cython required. The numbers above are what you get out of the box.
77
-
78
- > **Not on the list?** (macOS Intel, Alpine, etc.) `pip` falls back to the sdist and compiles from `.pyx` source — requires a C compiler and `pip install tachyon-api[fast]` (which pulls in Cython). If compilation fails, the framework still works: runtime falls back to the pure-Python siblings of every `.pyx` module automatically.
83
+ ## ⚡ Performance and builds
79
84
 
80
- ### Compiled vs pure-Python delta
85
+ Tachyon precompiles endpoint metadata and provides optional native Cython
86
+ extensions. Performance depends on the application, workload, and deployment.
87
+ Benchmarks must compare equivalent handler execution and dependency scopes. See
88
+ [`benchmark/`](./benchmark/) for the benchmark harness and its limitations.
81
89
 
82
- Same code, same workload — the only difference is whether the 27 Cython `.so` extensions are loaded:
90
+ The planned native wheel matrix targets CPython 3.10–3.13 on Linux x86_64/aarch64,
91
+ macOS arm64, and Windows AMD64. On other platforms pip builds from source,
92
+ requiring a C compiler. Compilation errors fail the build explicitly.
93
+ For a portable pure Python installation from source:
83
94
 
84
- | Scenario | Compiled | Pure-Python | Δ |
85
- |---|---:|---:|---:|
86
- | Hello World | 49,755 req/s | 47,899 req/s | +3.9% |
87
- | Path + query params | 37,598 req/s | 31,901 req/s | **+17.9%** |
88
- | Body — simple Struct | 40,916 req/s | 35,623 req/s | **+14.9%** |
89
- | Body — nested Struct | 39,994 req/s | 35,204 req/s | **+13.6%** |
90
- | Response model | 47,561 req/s | 40,604 req/s | **+17.1%** |
91
- | Header param + auth | 45,415 req/s | 39,380 req/s | **+15.3%** |
92
- | **Dependency injection** | 45,610 req/s | 38,552 req/s | **+18.3%** |
93
- | Multiple query params | 34,111 req/s | 29,803 req/s | **+14.5%** |
94
- | **TOTAL** | **340,960 req/s** | **298,966 req/s** | **+14.0%** |
95
-
96
- The biggest wins concentrate on real framework work — DI resolution (+18.3%), path/query parsing (+17.9%), response model (+17.1%), and validation (+13–15%). Hello-world barely moves (+3.9%): the framework is already a tiny slice of that request.
97
-
98
- ### Why is Tachyon faster?
99
-
100
- - **Radix trie routing** — O(k) path matching vs Starlette's O(N×regex) scan; trie compiled to C
101
- - **Middleware bypass** — HTTP requests skip Starlette's `ServerErrorMiddleware` and `ExceptionMiddleware` entirely; exceptions handled directly in each closure
102
- - **Endpoint pre-compilation** — `inspect.signature()`, `isinstance` chains, type resolution, and `msgspec.Decoder` creation run once at startup, not per request
103
- - **No-Request fast path** — endpoints with no parameters skip `Request()` creation and call the ASGI handler directly
104
- - **msgspec** — validation and deserialization in C, 5–10x faster than Pydantic
105
- - **Direct serialization** — `Struct` responses use `msgspec.json.encode()` directly (no Python intermediate step)
106
- - **Pre-built ASGI dicts** — response send payloads constructed once in `__init__`, not recreated per request
107
- - **No middleware bloat** — Tachyon mounts only what you register; FastAPI adds ~15 middlewares by default
95
+ ```bash
96
+ TACHYON_SKIP_CYTHON=1 pip install --no-binary=tachyon-api tachyon-api
97
+ ```
108
98
 
109
- ---
99
+ The environment variable controls builds; it does not disable native modules
100
+ already installed. `[fast]` supplies Cython for development; isolated source
101
+ builds already install Cython as a build dependency. See the
102
+ [Cython build guide](./docs/16-cython-build.md).
110
103
 
111
104
  ## ✨ Features
112
105
 
113
106
  | Category | Features |
114
107
  |----------|----------|
115
108
  | **Core** | Decorators API, Routers, Middlewares, ASGI compatible |
116
- | **Parameters** | Path, Query, Body (incl. `Body(List[Struct])`), Header, Cookie, Form, File (all with `alias=`) |
117
- | **Validation** | msgspec Struct (ultra-fast), automatic 422 errors, configurable body size limit (default 2 MB) |
109
+ | **Parameters** | Path, Query, Body (`items: list[Model] = Body()`), Header, Cookie, Form, File; `alias=` only on Header/Cookie/Form/File |
110
+ | **Validation** | msgspec Struct (ultra-fast), automatic 422 errors, configurable body size limit (default 2 MiB) |
118
111
  | **DI** | `@injectable` (3 scopes: singleton / **request** / **transient**), `Depends()` (sync + async), circular dep detection |
119
112
  | **Security** | HTTPBearer, HTTPBasic, OAuth2, API Keys (Header / Query / Cookie), `SecurityHeadersMiddleware` (X-Frame-Options, CSP, HSTS, …) |
120
113
  | **Async** | Background Tasks (failures logged, not silenced), WebSockets with **typed path params + DI** |
121
- | **Performance** | orjson serialization, `@cache` decorator, endpoint pre-compilation, 27 precompiled Cython extensions (shipped by default) |
114
+ | **Performance** | orjson serialization, `@cache` decorator, endpoint pre-compilation, optional Cython extensions |
122
115
  | **Docs** | OpenAPI 3.0 (incl. `List[Struct]` arrays + `multipart/form-data`), Scalar UI, Swagger, ReDoc (XSS-safe HTML generation) |
123
116
  | **CLI** | Project scaffolding, code generation, linting, AI-agent skill installer |
124
117
  | **Testing** | `TachyonTestClient` (sync), `create_client()` (async, full httpx kwargs), `dependency_overrides` |
125
- | **Architecture** | Atomic SRP modules across `app/`, `processing/`, `responses/`, `openapi/`, `security/` — 27 compiled to `.so` for the hot path (v1.2.x refactor + v1.2.9 Cython sprint) |
118
+ | **Architecture** | Atomic SRP modules across `app/`, `processing/`, `responses/`, `openapi/`, `security/` — optional native modules for the hot path |
126
119
 
127
120
  ---
128
121
 
@@ -151,24 +144,23 @@ The biggest wins concentrate on real framework work — DI resolution (+18.3%),
151
144
 
152
145
  ## 🏦 Example: KYC Demo API
153
146
 
154
- A complete example demonstrating all Tachyon features is available in [`example/`](./example/):
147
+ An example demonstrating selected Tachyon features is available in [`example/`](./example/):
155
148
 
156
149
  ```bash
157
- cd example
158
- pip install -r requirements.txt
150
+ # From the repository root
151
+ pip install -r example/requirements.txt
159
152
  tachyon run example.app:app
160
153
  ```
161
154
 
162
- The KYC Demo exercises every v1.2.x feature:
155
+ The KYC Demo exercises:
163
156
  - 🔐 JWT Authentication + API Keys
164
- - 👤 Customer CRUD + bulk endpoint (`Body(List[Struct])`)
157
+ - 👤 Customer CRUD and list response models
165
158
  - 📋 KYC Verification with Background Tasks
166
- - 📁 Document Uploads (`multipart/form-data`)
167
- - 🌐 WebSocket — legacy plain-string + modern DI-injected with `room_id: uuid.UUID`
168
- - 💉 DI scopes — `singleton` (services), `request` (correlation context), `transient` (ID generator)
159
+ - 🌐 Customer notification WebSocket with a string customer ID
160
+ - 💉 DI scopes — `singleton` services and `request` correlation context
169
161
  - 🛡️ Security headers + opt-in CORS allow-list
170
162
  - 🚨 Custom exception handler for the `KYCException` hierarchy
171
- - 🧪 17 tests (`pytest example/tests/`), including async tests via `create_client`
163
+ - 🧪 HTTP, async-client, WebSocket and lifespan tests (`pytest example/tests/`)
172
164
 
173
165
  **Demo credentials:** `demo@example.com` / `demo123`
174
166
 
@@ -189,40 +181,24 @@ The KYC Demo exercises every v1.2.x feature:
189
181
 
190
182
  ## 🏛️ Architecture
191
183
 
192
- Tachyon's request hot path is a thin chain of composed collaborators — every
193
- piece is single-responsibility and ready for Cython compilation:
184
+ The normal HTTP request path is composed from these collaborators:
194
185
 
186
+ ```text
187
+ Tachyon.__call__ → ASGIEntry → MiddlewareStack → TachyonDispatcher
188
+ → route guards → ParameterProcessor → DependencyResolver
189
+ → ResponseProcessor → request-owned ASGI response messages
195
190
  ```
196
- client
197
- │
198
- ├─→ Tachyon.__call__ (ASGI entry — sets scope["app"])
199
- │ │
200
- │ ├─→ ASGIEntry lazy build of HTTP app
201
- │ │
202
- │ ├─→ HTTPDispatcher HTTP → trie · WS/lifespan → Starlette
203
- │ │
204
- │ ├─→ MiddlewareStack user-registered middlewares (CORS, Security…)
205
- │ │
206
- │ └─→ TachyonDispatcher (Cython cdef) ← radix trie match O(k)
207
- │ │
208
- │ ├─→ _ASGIHandler (no-param fast path, 2 sends only)
209
- │ │
210
- │ └─→ handler closure
211
- │ ├─→ ParameterPipeline → 8 atomic extractors
212
- │ │ (body / query / query-list / header / cookie / form / file / path)
213
- │ ├─→ DependencyResolver → OverrideLookup / ScopeCache /
214
- │ │ ClassFactory / CallableFactory
215
- │ ├─→ ResponseProcessor (msgspec encode if Struct)
216
- │ └─→ ExceptionTable (walks subclass handlers)
217
- │
218
- └─→ TachyonJSONResponse | TachyonBytesResponse | _InternalErrorResponse
219
- (pre-built ASGI dicts, zero extra allocations per response)
220
- ```
221
191
 
222
- The v1.2.x SRP refactor decomposed the monolithic hot path into atomic modules
223
- with `__slots__` and full type hints — direct `cdef class` candidates. The
224
- v1.2.9 Cython sprint then compiled 27 of them to `.so`, keeping every `.py`
225
- sibling as a transparent fallback (Python prefers `.so` automatically).
192
+ WebSocket and lifespan scopes delegate to Starlette. `HTTPDispatcher` supports
193
+ the Starlette compatibility flow. Registration prepares signatures, converters
194
+ and decoders. Trie matching prefers complete static matches and may explore
195
+ alternative branches when a static prefix reaches a dead end. Error responses
196
+ are created per call; immutable payload bytes and bounded header tables may be
197
+ shared. Response messages and mutable headers belong to each send.
198
+
199
+ The hot path has Python implementations with optional native Cython siblings.
200
+ Python prefers native modules when installed. See the build guide for explicit
201
+ pure Python builds.
226
202
 
227
203
  👉 [Full architecture documentation](./docs/02-architecture.md)
228
204
 
@@ -327,7 +303,7 @@ tachyon run
327
303
  tachyon routes
328
304
 
329
305
  # Generate a full CRUD module
330
- tachyon g service users --crud
306
+ tachyon g service user --crud
331
307
 
332
308
  # Generate an ASGI middleware skeleton
333
309
  tachyon g middleware auth
@@ -378,36 +354,20 @@ async def test_hello_async():
378
354
  ```
379
355
 
380
356
  ```bash
381
- pytest tests/ -v
357
+ pytest tests/ example/tests/ -v
382
358
  ```
383
359
 
384
360
  👉 [Full Testing documentation](./docs/11-testing.md)
385
361
 
386
362
  ---
387
363
 
388
- ## 📊 Why Tachyon?
389
-
390
- | Feature | Tachyon | FastAPI |
391
- |---------|---------|---------|
392
- | **Throughput** | ~341k req/s total | ~62k req/s total |
393
- | **Latency** | ~2.3ms avg | ~14ms avg |
394
- | **Routing** | Radix trie O(k) | Regex scan O(N) |
395
- | **Serialization** | msgspec + orjson | Pydantic v2 |
396
- | **Request compilation** | Once at startup | Per request |
397
- | **Middleware overhead** | User-only stack | +2 auto middleware layers |
398
- | **Bundle size** | Minimal (4 deps) | Larger (~15 deps) |
399
- | **Learning curve** | Easy (FastAPI-like) | Easy |
400
- | **Type safety** | Full (msgspec Struct) | Full (Pydantic) |
401
-
402
- ---
403
-
404
364
  ## 📝 Contributing
405
365
 
406
366
  Contributions are welcome! Please feel free to submit a Pull Request.
407
367
 
408
368
  1. Fork the repository
409
369
  2. Create your feature branch (`git checkout -b feature/amazing-feature`)
410
- 3. Run tests (`pytest tests/ -v`)
370
+ 3. Run tests (`pytest tests/ example/tests/ -v`)
411
371
  4. Commit your changes
412
372
  5. Push to the branch (`git push origin feature/amazing-feature`)
413
373
  6. Open a Pull Request
@@ -425,7 +385,7 @@ This project is licensed under the GNU General Public License v3.0 - see the [LI
425
385
  See [CHANGELOG.md](./CHANGELOG.md) for version history.
426
386
 
427
387
  Upcoming:
428
- - Response streaming
388
+ - A dedicated streaming API; Starlette `StreamingResponse` already passes through the ASGI response path
429
389
  - GraphQL support
430
390
  - Multi-worker benchmarks
431
391
  - Benchmark suite vs Litestar / BlackSheep / Robyn