fasthttp-client 1.2.2__tar.gz → 1.2.4__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 (284) hide show
  1. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/.github/workflows/labeler.yml +1 -1
  2. fasthttp_client-1.2.4/.github/workflows/welcome.yml +59 -0
  3. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/PKG-INFO +4 -1
  4. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/cli.md +69 -0
  5. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/reference/response.md +41 -0
  6. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/response-handling.md +22 -0
  7. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/cli.md +110 -71
  8. fasthttp_client-1.2.4/docs/ru/reference/response.md +86 -0
  9. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/response-handling.md +22 -0
  10. fasthttp_client-1.2.4/examples/basic/extract_assets.py +24 -0
  11. fasthttp_client-1.2.4/examples/basic/test_delete.py +16 -0
  12. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/__init__.py +3 -1
  13. fasthttp_client-1.2.4/fasthttp/__meta__.py +1 -0
  14. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/app.py +72 -26
  15. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/cli/main.py +2 -0
  16. fasthttp_client-1.2.4/fasthttp/cli/run.py +184 -0
  17. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/client.py +4 -1
  18. fasthttp_client-1.2.4/fasthttp/helpers/route_inspect.py +156 -0
  19. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/helpers/routing.py +0 -46
  20. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/openapi/routes.py +9 -9
  21. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/openapi/swagger.py +184 -8
  22. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/response.py +45 -0
  23. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/routing.py +2 -4
  24. fasthttp_client-1.2.4/fasthttp/status.py +177 -0
  25. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/pyproject.toml +4 -1
  26. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/tests/test_app.py +1 -1
  27. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/uv.lock +442 -1
  28. fasthttp_client-1.2.2/.github/workflows/welcome.yml +0 -47
  29. fasthttp_client-1.2.2/docs/ru/reference/response.md +0 -45
  30. fasthttp_client-1.2.2/examples/basic/test_delete.py +0 -13
  31. fasthttp_client-1.2.2/fasthttp/__meta__.py +0 -1
  32. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/.all-contributorsrc +0 -0
  33. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/.github/DISCUSSION_TEMPLATE/general.yml +0 -0
  34. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/.github/DISCUSSION_TEMPLATE/ideas.yml +0 -0
  35. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  36. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  37. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/.github/ISSUE_TEMPLATE/question.yml +0 -0
  38. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  39. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/.github/dependabot.yml +0 -0
  40. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/.github/labeler.yml +0 -0
  41. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/.github/stale.yml +0 -0
  42. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/.github/workflows/all-contributors.yml +0 -0
  43. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/.github/workflows/cleanup.yml +0 -0
  44. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/.github/workflows/codeql.yml +0 -0
  45. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/.github/workflows/codspeed.yml +0 -0
  46. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/.github/workflows/coverage.yml +0 -0
  47. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/.github/workflows/release.yml +0 -0
  48. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/.github/workflows/scorecard.yml +0 -0
  49. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/.github/workflows/tests.yml +0 -0
  50. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/.gitignore +0 -0
  51. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/.python-version +0 -0
  52. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/.readthedocs.yaml +0 -0
  53. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/AUTHORS.md +0 -0
  54. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/CHANGELOG.md +0 -0
  55. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/CODE_OF_CONDUCT.md +0 -0
  56. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/CONTRIBUTING.md +0 -0
  57. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/LICENSE +0 -0
  58. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/MANIFEST.in +0 -0
  59. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/README.md +0 -0
  60. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/SECURITY.md +0 -0
  61. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/blog/how-i-created-fasthttp.md +0 -0
  62. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/blog/istoriya-sozdaniya-fasthttp.md +0 -0
  63. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/about/index.md +0 -0
  64. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/api-reference.md +0 -0
  65. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/cli/commands.md +0 -0
  66. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/cli/index.md +0 -0
  67. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/cli/options.md +0 -0
  68. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/configuration.md +0 -0
  69. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/dependencies.md +0 -0
  70. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/examples.md +0 -0
  71. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/graphql.md +0 -0
  72. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/http2-support.md +0 -0
  73. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/index.md +0 -0
  74. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/learn/index.md +0 -0
  75. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/learn/python-types.md +0 -0
  76. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/middleware.md +0 -0
  77. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/openapi.md +0 -0
  78. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/pydantic-validation.md +0 -0
  79. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/python-types.md +0 -0
  80. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/quick-start.md +0 -0
  81. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/reference/cli.md +0 -0
  82. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/reference/dependencies.md +0 -0
  83. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/reference/fasthttp.md +0 -0
  84. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/reference/index.md +0 -0
  85. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/reference/middleware.md +0 -0
  86. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/request-signing.md +0 -0
  87. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/security.md +0 -0
  88. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/configuration/environment.md +0 -0
  89. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/configuration/headers.md +0 -0
  90. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/configuration/http2.md +0 -0
  91. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/configuration/index.md +0 -0
  92. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/configuration/logging.md +0 -0
  93. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/configuration/proxy.md +0 -0
  94. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/configuration/settings.md +0 -0
  95. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/configuration/timeouts.md +0 -0
  96. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/dependencies.md +0 -0
  97. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/first-steps.md +0 -0
  98. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/graphql/index.md +0 -0
  99. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/graphql/mutations.md +0 -0
  100. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/graphql/queries.md +0 -0
  101. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/http-methods.md +0 -0
  102. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/index.md +0 -0
  103. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/lifespan.md +0 -0
  104. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/middleware/creating.md +0 -0
  105. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/middleware/examples.md +0 -0
  106. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/middleware/index.md +0 -0
  107. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/openapi/index.md +0 -0
  108. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/openapi/swagger-ui.md +0 -0
  109. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/parallel-execution.md +0 -0
  110. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/request-parameters.md +0 -0
  111. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/routers.md +0 -0
  112. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/security/circuit-breaker.md +0 -0
  113. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/security/index.md +0 -0
  114. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/security/secrets-masking.md +0 -0
  115. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/security/ssrf-protection.md +0 -0
  116. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/tags.md +0 -0
  117. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/validation/error-validation.md +0 -0
  118. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/validation/index.md +0 -0
  119. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/validation/pydantic-validation.md +0 -0
  120. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/en/tutorial/validation/request-validation.md +0 -0
  121. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/index.md +0 -0
  122. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/logo.png +0 -0
  123. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/photo/404_not_found.png +0 -0
  124. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/photo/swagger_ui_check_execute.png +0 -0
  125. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/photo/swagger_ui_check_web.png +0 -0
  126. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/photo/swagger_ui_home.png +0 -0
  127. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/about/index.md +0 -0
  128. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/api-reference.md +0 -0
  129. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/cli/commands.md +0 -0
  130. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/cli/index.md +0 -0
  131. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/cli/options.md +0 -0
  132. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/configuration.md +0 -0
  133. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/dependencies.md +0 -0
  134. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/examples.md +0 -0
  135. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/graphql.md +0 -0
  136. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/http2-support.md +0 -0
  137. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/index.md +0 -0
  138. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/learn/index.md +0 -0
  139. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/learn/python-types.md +0 -0
  140. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/middleware.md +0 -0
  141. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/openapi.md +0 -0
  142. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/pydantic-validation.md +0 -0
  143. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/quick-start.md +0 -0
  144. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/reference/cli.md +0 -0
  145. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/reference/dependencies.md +0 -0
  146. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/reference/fasthttp.md +0 -0
  147. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/reference/index.md +0 -0
  148. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/reference/middleware.md +0 -0
  149. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/request-signing.md +0 -0
  150. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/security.md +0 -0
  151. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/configuration/environment.md +0 -0
  152. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/configuration/headers.md +0 -0
  153. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/configuration/http2.md +0 -0
  154. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/configuration/index.md +0 -0
  155. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/configuration/logging.md +0 -0
  156. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/configuration/proxy.md +0 -0
  157. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/configuration/settings.md +0 -0
  158. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/configuration/timeouts.md +0 -0
  159. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/dependencies.md +0 -0
  160. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/first-steps.md +0 -0
  161. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/graphql/index.md +0 -0
  162. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/graphql/mutations.md +0 -0
  163. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/graphql/queries.md +0 -0
  164. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/http-methods.md +0 -0
  165. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/index.md +0 -0
  166. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/lifespan.md +0 -0
  167. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/middleware/creating.md +0 -0
  168. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/middleware/examples.md +0 -0
  169. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/middleware/index.md +0 -0
  170. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/openapi/index.md +0 -0
  171. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/openapi/swagger-ui.md +0 -0
  172. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/parallel-execution.md +0 -0
  173. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/request-parameters.md +0 -0
  174. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/routers.md +0 -0
  175. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/security/circuit-breaker.md +0 -0
  176. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/security/index.md +0 -0
  177. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/security/secrets-masking.md +0 -0
  178. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/security/ssrf-protection.md +0 -0
  179. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/tags.md +0 -0
  180. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/validation/error-validation.md +0 -0
  181. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/validation/index.md +0 -0
  182. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/validation/pydantic-validation.md +0 -0
  183. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/docs/ru/tutorial/validation/request-validation.md +0 -0
  184. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/README.md +0 -0
  185. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/advanced/error_handling.py +0 -0
  186. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/advanced/redirect_test.py +0 -0
  187. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/basic/defaults_example.py +0 -0
  188. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/basic/full_crud.py +0 -0
  189. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/basic/response_request_info.py +0 -0
  190. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/basic/test_get.py +0 -0
  191. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/basic/test_patch.py +0 -0
  192. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/basic/test_post.py +0 -0
  193. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/basic/test_put.py +0 -0
  194. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/data/form_data.py +0 -0
  195. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/dependencies/basic_dependencies.py +0 -0
  196. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/dependencies/with_cache_scope.py +0 -0
  197. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/endpoints/get_ip.py +0 -0
  198. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/endpoints/jsonplaceholder_get.py +0 -0
  199. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/endpoints/jsonplaceholder_posts.py +0 -0
  200. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/endpoints/multiple_endpoints.py +0 -0
  201. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/error/bad_status_codes.py +0 -0
  202. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/error/connection_error.py +0 -0
  203. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/error/invalid_url.py +0 -0
  204. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/error/not_found_site.py +0 -0
  205. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/error/responses.py +0 -0
  206. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/error/server_errors.py +0 -0
  207. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/error/successful_request.py +0 -0
  208. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/error/timeout_error.py +0 -0
  209. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/error/validation_error.py +0 -0
  210. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/graphql/pokemon.py +0 -0
  211. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/graphql/rick_and_morty.py +0 -0
  212. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/graphql/run_examples.py +0 -0
  213. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/graphql/star_wars.py +0 -0
  214. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/headers/headers.py +0 -0
  215. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/headers/user_agent.py +0 -0
  216. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/http2/README.md +0 -0
  217. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/http2/http2_example.py +0 -0
  218. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/methods/json_post.py +0 -0
  219. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/middleware/basic_middleware.py +0 -0
  220. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/middleware/error_middleware.py +0 -0
  221. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/middleware/response_transformer.py +0 -0
  222. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/openapi/openapi_example.py +0 -0
  223. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/parameters/delay_response.py +0 -0
  224. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/parameters/query_params.py +0 -0
  225. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/parameters/query_params_example.py +0 -0
  226. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/parameters/timeout_example.py +0 -0
  227. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/pydantic/advanced_validation.py +0 -0
  228. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/pydantic/basic_validation.py +0 -0
  229. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/pydantic/create_and_validate.py +0 -0
  230. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/pydantic/crud_with_validation.py +0 -0
  231. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/pydantic/nested_models.py +0 -0
  232. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/routers/base.py +0 -0
  233. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/run_all.py +0 -0
  234. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/examples/tags/basic_tags.py +0 -0
  235. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/cli/__init__.py +0 -0
  236. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/cli/client.py +0 -0
  237. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/cli/commands.py +0 -0
  238. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/cli/output.py +0 -0
  239. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/cli/repl.py +0 -0
  240. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/dependencies/__init__.py +0 -0
  241. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/dependencies/dependencies.py +0 -0
  242. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/exceptions/__init__.py +0 -0
  243. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/exceptions/base.py +0 -0
  244. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/exceptions/connect.py +0 -0
  245. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/exceptions/request.py +0 -0
  246. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/exceptions/status.py +0 -0
  247. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/exceptions/timeout.py +0 -0
  248. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/exceptions/types.py +0 -0
  249. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/exceptions/validator.py +0 -0
  250. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/graphql/__init__.py +0 -0
  251. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/graphql/client.py +0 -0
  252. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/graphql/types.py +0 -0
  253. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/helpers/__init__.py +0 -0
  254. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/logging.py +0 -0
  255. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/middleware.py +0 -0
  256. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/openapi/__init__.py +0 -0
  257. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/openapi/generator.py +0 -0
  258. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/openapi/urls.py +0 -0
  259. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/py.typed +0 -0
  260. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/security/__init__.py +0 -0
  261. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/security/circuit_breaker.py +0 -0
  262. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/security/headers.py +0 -0
  263. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/security/limits.py +0 -0
  264. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/security/redirect.py +0 -0
  265. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/security/response.py +0 -0
  266. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/security/secrets.py +0 -0
  267. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/security/security.py +0 -0
  268. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/security/signer.py +0 -0
  269. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/security/ssrf.py +0 -0
  270. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/fasthttp/types.py +0 -0
  271. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/mkdocs.yml +0 -0
  272. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/scripts/Makefile +0 -0
  273. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/tests/__init__.py +0 -0
  274. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/tests/conftest.py +0 -0
  275. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/tests/test_cli.py +0 -0
  276. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/tests/test_client.py +0 -0
  277. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/tests/test_dependencies.py +0 -0
  278. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/tests/test_exceptions.py +0 -0
  279. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/tests/test_graphql.py +0 -0
  280. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/tests/test_openapi.py +0 -0
  281. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/tests/test_performance.py +0 -0
  282. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/tests/test_response.py +0 -0
  283. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/tests/test_security.py +0 -0
  284. {fasthttp_client-1.2.2 → fasthttp_client-1.2.4}/tests/test_types.py +0 -0
@@ -21,5 +21,5 @@ jobs:
21
21
  - name: Run Labeler
22
22
  uses: actions/labeler@v6
23
23
  with:
24
- repo-token: ${{ secrets.GITHUB_TOKEN }}
24
+ repo-token: ${{ secrets.GH_TOKEN }}
25
25
  configuration-path: .github/labeler.yml
@@ -0,0 +1,59 @@
1
+ name: Welcome Bot
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened, synchronize]
6
+
7
+ permissions:
8
+ pull-requests: write
9
+
10
+ jobs:
11
+ welcome:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - name: Welcome contributor
15
+ uses: actions/github-script@v8
16
+ with:
17
+ script: |
18
+ const owner = context.repo.owner;
19
+ const repo = context.repo.repo;
20
+ const prNumber = context.payload.pull_request.number;
21
+ const sender = context.payload.sender.login;
22
+ const marker = '<!-- welcome-bot -->';
23
+
24
+ const message = `${marker}
25
+ 👋 Thanks for your contribution, @${sender}!
26
+
27
+ Please make sure:
28
+ - Code is clean and formatted
29
+ - Tests are passing
30
+ - PR description is clear
31
+
32
+ Maintainers will review it soon.
33
+ `;
34
+
35
+ const { data: comments } = await github.rest.issues.listComments({
36
+ owner,
37
+ repo,
38
+ issue_number: prNumber
39
+ });
40
+
41
+ const existingComment = comments.find(comment =>
42
+ comment.body.includes(marker)
43
+ );
44
+
45
+ if (existingComment) {
46
+ await github.rest.issues.updateComment({
47
+ owner,
48
+ repo,
49
+ comment_id: existingComment.id,
50
+ body: message
51
+ });
52
+ } else {
53
+ await github.rest.issues.createComment({
54
+ owner,
55
+ repo,
56
+ issue_number: prNumber,
57
+ body: message
58
+ });
59
+ }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fasthttp-client
3
- Version: 1.2.2
3
+ Version: 1.2.4
4
4
  Summary: Fast and simple HTTP client library with async support and beautiful logging
5
5
  Project-URL: Homepage, https://github.com/ndugram/fasthttp
6
6
  Project-URL: Documentation, https://github.com/ndugram/fasthttp
@@ -34,8 +34,11 @@ Requires-Dist: typer>=0.24.1
34
34
  Requires-Dist: uvicorn>=0.42.0
35
35
  Provides-Extra: dev
36
36
  Requires-Dist: aiohttp>=3.9.0; extra == 'dev'
37
+ Requires-Dist: mkdocs-material>=9.5.0; extra == 'dev'
38
+ Requires-Dist: mkdocs>=1.6.0; extra == 'dev'
37
39
  Requires-Dist: mypy>=1.13.0; extra == 'dev'
38
40
  Requires-Dist: pre-commit>=4.0.0; extra == 'dev'
41
+ Requires-Dist: pymdown-extensions>=10.2; extra == 'dev'
39
42
  Requires-Dist: pytest-asyncio>=0.24.0; extra == 'dev'
40
43
  Requires-Dist: pytest-codspeed>=4.3.0; extra == 'dev'
41
44
  Requires-Dist: pytest-cov>=6.0.0; extra == 'dev'
@@ -267,6 +267,75 @@ clear # clear screen
267
267
  exit # exit REPL
268
268
  ```
269
269
 
270
+ ## Running Application Files
271
+
272
+ FastHTTP CLI provides two commands to run your application files directly.
273
+
274
+ ### Run Mode — Execute Requests
275
+
276
+ Run your FastHTTP app in request mode. Executes all registered HTTP requests and displays results:
277
+
278
+ ```bash
279
+ fasthttp run main.py
280
+ ```
281
+
282
+ With tag filtering:
283
+
284
+ ```bash
285
+ fasthttp run main.py --tags api,users
286
+ ```
287
+
288
+ Enable debug mode:
289
+
290
+ ```bash
291
+ fasthttp run main.py --debug
292
+ ```
293
+
294
+ Options:
295
+ - `-t, --tags` — Run only routes with specific tags (comma-separated)
296
+ - `-d, --debug` — Enable debug mode
297
+
298
+ ### Dev Mode — Development Server
299
+
300
+ Run your FastHTTP app with an interactive Swagger UI for testing requests:
301
+
302
+ ```bash
303
+ fasthttp dev main.py
304
+ ```
305
+
306
+ With custom host and port:
307
+
308
+ ```bash
309
+ fasthttp dev main.py --host 0.0.0.0 --port 3000
310
+ ```
311
+
312
+ With base URL for documentation:
313
+
314
+ ```bash
315
+ fasthttp dev main.py --base-url /api
316
+ ```
317
+
318
+ Enable debug mode:
319
+
320
+ ```bash
321
+ fasthttp dev main.py --debug
322
+ ```
323
+
324
+ Options:
325
+ - `-h, --host` — Host to bind the server to (default: 127.0.0.1)
326
+ - `-p, --port` — Port to bind the server to (default: 8000)
327
+ - `-b, --base-url` — Base URL prefix for documentation endpoints
328
+ - `-d, --debug` — Enable debug mode
329
+
330
+ Example output:
331
+
332
+ ```
333
+ ▲ FastHTTP dev server
334
+ ➜ Server: http://127.0.0.1:8000
335
+ ➜ Docs: http://127.0.0.1:8000/docs
336
+ ─────────────────────────────────
337
+ ```
338
+
270
339
  ## See Also
271
340
 
272
341
  - [Quick Start](quick-start.md) — basics
@@ -11,6 +11,7 @@ Response object reference.
11
11
  | `headers` | `dict` | Response headers |
12
12
  | `content` | `bytes` | Raw bytes |
13
13
  | `method` | `str` | HTTP method |
14
+ | `url` | `str` | Request URL |
14
15
 
15
16
  ## Methods
16
17
 
@@ -38,6 +39,46 @@ Get request body as text:
38
39
  sent = resp.req_text() # Returns str or None
39
40
  ```
40
41
 
42
+ ### assets()
43
+
44
+ Extract CSS and JavaScript asset URLs from HTML response:
45
+
46
+ ```python
47
+ result = resp.assets()
48
+ # Returns: {"css": [...], "js": [...]}
49
+ ```
50
+
51
+ **Parameters:**
52
+
53
+ | Parameter | Type | Default | Description |
54
+ |-----------|------|---------|-------------|
55
+ | `css` | `bool` | `True` | Include CSS links |
56
+ | `js` | `bool` | `True` | Include JavaScript links |
57
+
58
+ **Examples:**
59
+
60
+ ```python
61
+ # Get all assets (CSS + JS)
62
+ @app.get(url="https://example.com")
63
+ async def handler(resp: Response):
64
+ return resp.assets()
65
+ # Returns: {"css": ["https://example.com/style.css"], "js": ["https://example.com/app.js"]}
66
+
67
+ # CSS only
68
+ @app.get(url="https://example.com")
69
+ async def handler(resp: Response):
70
+ return resp.assets(js=False)
71
+ # Returns: {"css": [...], "js": []}
72
+
73
+ # JS only
74
+ @app.get(url="https://example.com")
75
+ async def handler(resp: Response):
76
+ return resp.assets(css=False)
77
+ # Returns: {"css": [], "js": [...]}
78
+ ```
79
+
80
+ The method parses `<link rel="stylesheet" href="...">` for CSS and `<script src="...">` for JavaScript. All URLs are normalized using `urljoin`, so relative paths are converted to absolute URLs based on the request URL.
81
+
41
82
  ## Example
42
83
 
43
84
  ```python
@@ -61,6 +61,28 @@ Returns request body as text:
61
61
  sent = resp.req_text() # Returns "raw data"
62
62
  ```
63
63
 
64
+ ### assets()
65
+
66
+ Extracts CSS and JavaScript asset URLs from HTML page:
67
+
68
+ ```python
69
+ # Get all assets
70
+ result = resp.assets()
71
+ # Returns: {"css": [...], "js": [...]}
72
+
73
+ # CSS only
74
+ css_only = resp.assets(js=False)
75
+
76
+ # JS only
77
+ js_only = resp.assets(css=False)
78
+ ```
79
+
80
+ The method parses:
81
+ - CSS: `<link rel="stylesheet" href="...">` tags
82
+ - JS: `<script src="...">` tags
83
+
84
+ All URLs are normalized relative to the request URL.
85
+
64
86
  ## Error Handling
65
87
 
66
88
  FastHTTP automatically handles errors and logs them:
@@ -103,17 +103,9 @@ fasthttp get https://api.example.com/data --debug
103
103
  - JSON/data тело
104
104
  - Заголовки ответа
105
105
 
106
- ## Формат вывода
107
-
108
- Второй аргумент после URL определяет что вывести:
109
-
110
- ### status — только статус (по умолчанию)
111
-
112
106
  ### Прокси (-p, --proxy)
113
107
 
114
108
  ```bash
115
- fasthttp get https://api.example.com/data status
116
- # 200
117
109
  # HTTP прокси
118
110
  fasthttp get https://api.example.com/data -p "http://proxy.example.com:8080"
119
111
 
@@ -127,8 +119,6 @@ fasthttp get https://api.example.com/data -p "socks5://proxy.example.com:1080"
127
119
  fasthttp get https://api.example.com/data -p "http://user:password@proxy.example.com:8080"
128
120
  ```
129
121
 
130
- ### json — JSON тело ответа
131
-
132
122
  ## Формат вывода
133
123
 
134
124
  Второй аргумент после URL определяет что вывести:
@@ -136,62 +126,34 @@ fasthttp get https://api.example.com/data -p "http://user:password@proxy.example
136
126
  ### status — только статус (по умолчанию)
137
127
 
138
128
  ```bash
139
- fasthttp get https://api.example.com/data json
140
- # {"id": 1, "name": "John"}
141
129
  fasthttp get https://api.example.com/data status
142
130
  # 200
143
131
  ```
144
132
 
145
- ### text — текст ответа
146
-
147
133
  ### json — JSON тело ответа
148
134
 
149
135
  ```bash
150
- fasthttp get https://api.example.com/data text
151
- # <html>...</html>
152
136
  fasthttp get https://api.example.com/data json
153
137
  # {"id": 1, "name": "John"}
154
138
  ```
155
139
 
156
- ### headers — заголовки ответа
157
-
158
140
  ### text — текст ответа
159
141
 
160
142
  ```bash
161
- fasthttp get https://api.example.com/data headers
162
- # {"Content-Type": "application/json", "Date": "..."}
163
143
  fasthttp get https://api.example.com/data text
164
144
  # <html>...</html>
165
145
  ```
166
146
 
167
- ### all — всё вместе
168
-
169
147
  ### headers — заголовки ответа
170
148
 
171
149
  ```bash
172
- fasthttp get https://api.example.com/data all
173
- # Status: 200
174
- # Elapsed: 234.56ms
175
- # Headers: {...}
176
- # Body: {...}
177
150
  fasthttp get https://api.example.com/data headers
178
151
  # {"Content-Type": "application/json", "Date": "..."}
179
152
  ```
180
153
 
181
- ## Примеры
182
-
183
- ### Простой GET
184
-
185
154
  ### all — всё вместе
186
155
 
187
156
  ```bash
188
- $ fasthttp get https://jsonplaceholder.typicode.com/posts/1 json
189
- {
190
- "userId": 1,
191
- "id": 1,
192
- "title": "sunt aut facere repellat provident occaecati",
193
- "body": "..."
194
- }
195
157
  fasthttp get https://api.example.com/data all
196
158
  # Status: 200
197
159
  # Elapsed: 234.56ms
@@ -199,41 +161,26 @@ fasthttp get https://api.example.com/data all
199
161
  # Body: {...}
200
162
  ```
201
163
 
202
- ### POST с JSON
203
-
204
164
  ## Примеры
205
165
 
206
166
  ### Простой GET
207
167
 
208
168
  ```bash
209
- $ fasthttp post https://jsonplaceholder.typicode.com/posts \
210
- --json '{"title": "foo", "body": "bar", "userId": 1}' json
211
169
  $ fasthttp get https://jsonplaceholder.typicode.com/posts/1 json
212
170
  {
213
- "title": "foo",
214
- "body": "bar",
215
171
  "userId": 1,
216
- "id": 101
217
172
  "id": 1,
218
173
  "title": "sunt aut facere repellat provident occaecati",
219
174
  "body": "..."
220
175
  }
221
176
  ```
222
177
 
223
- ### С заголовками
224
-
225
178
  ### POST с JSON
226
179
 
227
180
  ```bash
228
- $ fasthttp get https://httpbin.org/headers \
229
- -H "Authorization: Bearer test-token" json
230
181
  $ fasthttp post https://jsonplaceholder.typicode.com/posts \
231
182
  --json '{"title": "foo", "body": "bar", "userId": 1}' json
232
183
  {
233
- "headers": {
234
- "Authorization": "Bearer test-token",
235
- "Host": "httpbin.org"
236
- }
237
184
  "title": "foo",
238
185
  "body": "bar",
239
186
  "userId": 1,
@@ -241,17 +188,9 @@ $ fasthttp post https://jsonplaceholder.typicode.com/posts \
241
188
  }
242
189
  ```
243
190
 
244
- ### С отладкой
245
-
246
191
  ### С заголовками
247
192
 
248
193
  ```bash
249
- $ fasthttp get https://httpbin.org/get --debug
250
- ℹ → GET https://httpbin.org/get
251
- ✔ HTTP 200 in 234.56ms
252
- ℹ ← Response headers:
253
- ℹ Content-Type: application/json
254
- ℹ Date: Mon, 15 Jan 2025 10:30:00 GMT
255
194
  $ fasthttp get https://httpbin.org/headers \
256
195
  -H "Authorization: Bearer test-token" json
257
196
  {
@@ -262,14 +201,9 @@ $ fasthttp get https://httpbin.org/headers \
262
201
  }
263
202
  ```
264
203
 
265
- ### Проверить статус API
266
-
267
204
  ### С отладкой
268
205
 
269
206
  ```bash
270
- $ fasthttp get https://api.example.com/health
271
- ✔ HTTP 200 in 45.23ms
272
- 200
273
207
  $ fasthttp get https://httpbin.org/get --debug
274
208
  ℹ → GET https://httpbin.org/get
275
209
  ✔ HTTP 200 in 234.56ms
@@ -278,25 +212,130 @@ $ fasthttp get https://httpbin.org/get --debug
278
212
  ℹ Date: Mon, 15 Jan 2025 10:30:00 GMT
279
213
  ```
280
214
 
281
- ## Справка
282
-
283
215
  ### Проверить статус API
284
216
 
285
217
  ```bash
286
- fasthttp --help
287
- fasthttp get --help
288
- fasthttp post --help
289
218
  $ fasthttp get https://api.example.com/health
290
219
  ✔ HTTP 200 in 45.23ms
291
220
  200
292
221
  ```
293
222
 
223
+ ## Интерактивный REPL
224
+
225
+ Запуск интерактивного режима:
226
+
227
+ ```bash
228
+ fasthttp repl
229
+ ```
230
+
231
+ С прокси:
232
+
233
+ ```bash
234
+ fasthttp repl -p "http://proxy:8080"
235
+ ```
236
+
237
+ ### Команды REPL
238
+
239
+ ```bash
240
+ # Выполнение запросов
241
+ get https://api.example.com/data
242
+ post https://api.example.com/users -j '{"name": "John"}'
243
+ g https://api.example.com/data # сокращение для GET
244
+ p https://api.example.com/users # сокращение для POST
245
+
246
+ # Опции
247
+ -H "Key:Value" # заголовки
248
+ -j '{"json": 1}' # JSON тело
249
+ -d "data" # form данные
250
+ -t 30 # таймаут
251
+ -o json # формат вывода
252
+ -p "proxy" # URL прокси
253
+
254
+ # Специальные команды
255
+ help # показать справку
256
+ history # показать историю команд
257
+ last # показать последний ответ
258
+ clear # очистить экран
259
+ exit # выйти из REPL
260
+ ```
261
+
262
+ ## Запуск файлов приложения
263
+
264
+ FastHTTP CLI предоставляет две команды для запуска файлов приложения напрямую.
265
+
266
+ ### Режим run — Выполнение запросов
267
+
268
+ Запустите ваше FastHTTP приложение в режиме выполнения запросов:
269
+
270
+ ```bash
271
+ fasthttp run main.py
272
+ ```
273
+
274
+ С фильтрацией по тегам:
275
+
276
+ ```bash
277
+ fasthttp run main.py --tags api,users
278
+ ```
279
+
280
+ Включить режим отладки:
281
+
282
+ ```bash
283
+ fasthttp run main.py --debug
284
+ ```
285
+
286
+ Опции:
287
+ - `-t, --tags` — Запустить только маршруты с определёнными тегами (через запятую)
288
+ - `-d, --debug` — Включить режим отладки
289
+
290
+ ### Режим dev — Сервер разработки
291
+
292
+ Запустите ваше FastHTTP приложение с интерактивным Swagger UI для тестирования запросов:
293
+
294
+ ```bash
295
+ fasthttp dev main.py
296
+ ```
297
+
298
+ С кастомным хостом и портом:
299
+
300
+ ```bash
301
+ fasthttp dev main.py --host 0.0.0.0 --port 3000
302
+ ```
303
+
304
+ С базовым URL для документации:
305
+
306
+ ```bash
307
+ fasthttp dev main.py --base-url /api
308
+ ```
309
+
310
+ Включить режим отладки:
311
+
312
+ ```bash
313
+ fasthttp dev main.py --debug
314
+ ```
315
+
316
+ Опции:
317
+ - `-h, --host` — Хост для сервера (по умолчанию: 127.0.0.1)
318
+ - `-p, --port` — Порт для сервера (по умолчанию: 8000)
319
+ - `-b, --base-url` — Базовый URL для эндпоинтов документации
320
+ - `-d, --debug` — Включить режим отладки
321
+
322
+ Пример вывода:
323
+
324
+ ```
325
+ ▲ FastHTTP dev server
326
+ ➜ Server: http://127.0.0.1:8000
327
+ ➜ Docs: http://127.0.0.1:8000/docs
328
+ ─────────────────────────────────
329
+ ```
330
+
294
331
  ## Справка
295
332
 
296
333
  ```bash
297
334
  fasthttp --help
298
335
  fasthttp get --help
299
336
  fasthttp post --help
337
+ fasthttp run --help
338
+ fasthttp dev --help
300
339
  ```
301
340
 
302
341
  ## Смотрите также
@@ -0,0 +1,86 @@
1
+ # Класс Response
2
+
3
+ Объект ответа.
4
+
5
+ ## Атрибуты
6
+
7
+ | Атрибут | Тип | Описание |
8
+ |---------|-----|----------|
9
+ | `status` | `int` | Код статуса HTTP |
10
+ | `text` | `str` | Сырое тело ответа |
11
+ | `headers` | `dict` | Заголовки ответа |
12
+ | `content` | `bytes` | Сырые байты |
13
+ | `method` | `str` | HTTP метод |
14
+ | `url` | `str` | URL запроса |
15
+
16
+ ## Методы
17
+
18
+ ### json()
19
+
20
+ Преобразовать тело ответа в JSON:
21
+
22
+ ```python
23
+ data = resp.json() # Возвращает dict или list
24
+ ```
25
+
26
+ ### req_json()
27
+
28
+ Получить JSON, отправленный с запросом:
29
+
30
+ ```python
31
+ sent = resp.req_json() # Возвращает dict или None
32
+ ```
33
+
34
+ ### assets()
35
+
36
+ Извлечь URL-адреса CSS и JavaScript ресурсов из HTML-ответа:
37
+
38
+ ```python
39
+ result = resp.assets()
40
+ # Возвращает: {"css": [...], "js": [...]}
41
+ ```
42
+
43
+ **Параметры:**
44
+
45
+ | Параметр | Тип | По умолчанию | Описание |
46
+ |----------|-----|--------------|----------|
47
+ | `css` | `bool` | `True` | Включать ссылки CSS |
48
+ | `js` | `bool` | `True` | Включать ссылки JavaScript |
49
+
50
+ **Примеры:**
51
+
52
+ ```python
53
+ # Получить все ресурсы (CSS + JS)
54
+ @app.get(url="https://example.com")
55
+ async def handler(resp: Response):
56
+ return resp.assets()
57
+ # Возвращает: {"css": ["https://example.com/style.css"], "js": ["https://example.com/app.js"]}
58
+
59
+ # Только CSS
60
+ @app.get(url="https://example.com")
61
+ async def handler(resp: Response):
62
+ return resp.assets(js=False)
63
+ # Возвращает: {"css": [...], "js": []}
64
+
65
+ # Только JS
66
+ @app.get(url="https://example.com")
67
+ async def handler(resp: Response):
68
+ return resp.assets(css=False)
69
+ # Возвращает: {"css": [], "js": [...]}
70
+ ```
71
+
72
+ Метод парсит `<link rel="stylesheet" href="...">` для CSS и `<script src="...">` для JavaScript. Все URL нормализуются через `urljoin`, поэтому относительные пути преобразуются в абсолютные на основе URL запроса.
73
+
74
+ ## Пример
75
+
76
+ ```python
77
+ from fasthttp import FastHTTP
78
+ from fasthttp.response import Response
79
+
80
+ app = FastHTTP(debug=True)
81
+
82
+
83
+ @app.get(url="https://api.example.com/data")
84
+ async def handler(resp: Response) -> dict:
85
+ return {"status": resp.status, "data": resp.json(), "headers": resp.headers}
86
+ ```
@@ -52,6 +52,28 @@ text = resp.text # Возвращает str
52
52
  sent = resp.req_json() # Возвращает {"name": "John"}
53
53
  ```
54
54
 
55
+ ### assets()
56
+
57
+ Извлекает URL-адреса CSS и JavaScript ресурсов из HTML-страницы:
58
+
59
+ ```python
60
+ # Получить все ресурсы
61
+ result = resp.assets()
62
+ # Returns: {"css": [...], "js": [...]}
63
+
64
+ # Только CSS
65
+ css_only = resp.assets(js=False)
66
+
67
+ # Только JS
68
+ js_only = resp.assets(css=False)
69
+ ```
70
+
71
+ Метод парсит:
72
+ - CSS: теги `<link rel="stylesheet" href="...">`
73
+ - JS: теги `<script src="...">`
74
+
75
+ Все ссылки нормализуются относительно URL запроса.
76
+
55
77
  ## Обработка ошибок
56
78
 
57
79
  FastHTTP автоматически обрабатывает ошибки:
@@ -0,0 +1,24 @@
1
+ from fasthttp import FastHTTP
2
+ from fasthttp.response import Response
3
+
4
+
5
+ app = FastHTTP(debug=True)
6
+
7
+
8
+ @app.get(url="https://example.com")
9
+ async def get_assets(resp: Response) -> dict:
10
+ return resp.assets()
11
+
12
+
13
+ @app.get(url="https://example.com")
14
+ async def get_css_only(resp: Response) -> dict:
15
+ return resp.assets(js=False)
16
+
17
+
18
+ @app.get(url="https://example.com")
19
+ async def get_js_only(resp: Response) -> dict:
20
+ return resp.assets(css=False)
21
+
22
+
23
+ if __name__ == "__main__":
24
+ app.run()
@@ -0,0 +1,16 @@
1
+ from fasthttp import FastHTTP
2
+ from fasthttp.response import Response
3
+ from pydantic import BaseModel
4
+
5
+ class TestSwagger(BaseModel):
6
+ origin: str
7
+
8
+ app = FastHTTP(debug=True)
9
+
10
+
11
+ @app.delete("httpbin.org/delete", response_model=TestSwagger)
12
+ async def test_delete(resp: Response) -> int:
13
+ return resp.status
14
+
15
+
16
+