fasthttp-client 1.2.0__tar.gz → 1.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/.github/workflows/release.yml +1 -2
  2. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/.github/workflows/welcome.yml +1 -0
  3. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/PKG-INFO +1 -1
  4. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/reference/fasthttp.md +13 -0
  5. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/routers.md +39 -1
  6. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/reference/fasthttp.md +17 -0
  7. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/routers.md +40 -1
  8. fasthttp_client-1.2.2/fasthttp/__meta__.py +1 -0
  9. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/app.py +36 -11
  10. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/helpers/routing.py +16 -1
  11. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/pyproject.toml +1 -1
  12. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/tests/test_app.py +25 -6
  13. fasthttp_client-1.2.0/fasthttp/__meta__.py +0 -1
  14. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/.all-contributorsrc +0 -0
  15. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/.github/DISCUSSION_TEMPLATE/general.yml +0 -0
  16. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/.github/DISCUSSION_TEMPLATE/ideas.yml +0 -0
  17. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  18. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  19. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/.github/ISSUE_TEMPLATE/question.yml +0 -0
  20. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  21. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/.github/dependabot.yml +0 -0
  22. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/.github/labeler.yml +0 -0
  23. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/.github/stale.yml +0 -0
  24. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/.github/workflows/all-contributors.yml +0 -0
  25. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/.github/workflows/cleanup.yml +0 -0
  26. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/.github/workflows/codeql.yml +0 -0
  27. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/.github/workflows/codspeed.yml +0 -0
  28. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/.github/workflows/coverage.yml +0 -0
  29. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/.github/workflows/labeler.yml +0 -0
  30. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/.github/workflows/scorecard.yml +0 -0
  31. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/.github/workflows/tests.yml +0 -0
  32. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/.gitignore +0 -0
  33. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/.python-version +0 -0
  34. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/.readthedocs.yaml +0 -0
  35. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/AUTHORS.md +0 -0
  36. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/CHANGELOG.md +0 -0
  37. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/CODE_OF_CONDUCT.md +0 -0
  38. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/CONTRIBUTING.md +0 -0
  39. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/LICENSE +0 -0
  40. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/MANIFEST.in +0 -0
  41. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/README.md +0 -0
  42. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/SECURITY.md +0 -0
  43. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/blog/how-i-created-fasthttp.md +0 -0
  44. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/blog/istoriya-sozdaniya-fasthttp.md +0 -0
  45. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/about/index.md +0 -0
  46. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/api-reference.md +0 -0
  47. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/cli/commands.md +0 -0
  48. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/cli/index.md +0 -0
  49. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/cli/options.md +0 -0
  50. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/cli.md +0 -0
  51. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/configuration.md +0 -0
  52. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/dependencies.md +0 -0
  53. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/examples.md +0 -0
  54. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/graphql.md +0 -0
  55. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/http2-support.md +0 -0
  56. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/index.md +0 -0
  57. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/learn/index.md +0 -0
  58. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/learn/python-types.md +0 -0
  59. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/middleware.md +0 -0
  60. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/openapi.md +0 -0
  61. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/pydantic-validation.md +0 -0
  62. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/python-types.md +0 -0
  63. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/quick-start.md +0 -0
  64. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/reference/cli.md +0 -0
  65. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/reference/dependencies.md +0 -0
  66. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/reference/index.md +0 -0
  67. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/reference/middleware.md +0 -0
  68. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/reference/response.md +0 -0
  69. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/request-signing.md +0 -0
  70. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/security.md +0 -0
  71. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/configuration/environment.md +0 -0
  72. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/configuration/headers.md +0 -0
  73. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/configuration/http2.md +0 -0
  74. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/configuration/index.md +0 -0
  75. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/configuration/logging.md +0 -0
  76. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/configuration/proxy.md +0 -0
  77. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/configuration/settings.md +0 -0
  78. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/configuration/timeouts.md +0 -0
  79. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/dependencies.md +0 -0
  80. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/first-steps.md +0 -0
  81. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/graphql/index.md +0 -0
  82. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/graphql/mutations.md +0 -0
  83. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/graphql/queries.md +0 -0
  84. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/http-methods.md +0 -0
  85. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/index.md +0 -0
  86. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/lifespan.md +0 -0
  87. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/middleware/creating.md +0 -0
  88. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/middleware/examples.md +0 -0
  89. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/middleware/index.md +0 -0
  90. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/openapi/index.md +0 -0
  91. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/openapi/swagger-ui.md +0 -0
  92. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/parallel-execution.md +0 -0
  93. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/request-parameters.md +0 -0
  94. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/response-handling.md +0 -0
  95. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/security/circuit-breaker.md +0 -0
  96. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/security/index.md +0 -0
  97. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/security/secrets-masking.md +0 -0
  98. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/security/ssrf-protection.md +0 -0
  99. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/tags.md +0 -0
  100. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/validation/error-validation.md +0 -0
  101. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/validation/index.md +0 -0
  102. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/validation/pydantic-validation.md +0 -0
  103. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/en/tutorial/validation/request-validation.md +0 -0
  104. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/index.md +0 -0
  105. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/logo.png +0 -0
  106. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/photo/404_not_found.png +0 -0
  107. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/photo/swagger_ui_check_execute.png +0 -0
  108. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/photo/swagger_ui_check_web.png +0 -0
  109. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/photo/swagger_ui_home.png +0 -0
  110. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/about/index.md +0 -0
  111. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/api-reference.md +0 -0
  112. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/cli/commands.md +0 -0
  113. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/cli/index.md +0 -0
  114. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/cli/options.md +0 -0
  115. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/cli.md +0 -0
  116. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/configuration.md +0 -0
  117. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/dependencies.md +0 -0
  118. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/examples.md +0 -0
  119. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/graphql.md +0 -0
  120. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/http2-support.md +0 -0
  121. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/index.md +0 -0
  122. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/learn/index.md +0 -0
  123. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/learn/python-types.md +0 -0
  124. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/middleware.md +0 -0
  125. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/openapi.md +0 -0
  126. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/pydantic-validation.md +0 -0
  127. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/quick-start.md +0 -0
  128. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/reference/cli.md +0 -0
  129. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/reference/dependencies.md +0 -0
  130. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/reference/index.md +0 -0
  131. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/reference/middleware.md +0 -0
  132. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/reference/response.md +0 -0
  133. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/request-signing.md +0 -0
  134. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/security.md +0 -0
  135. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/configuration/environment.md +0 -0
  136. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/configuration/headers.md +0 -0
  137. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/configuration/http2.md +0 -0
  138. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/configuration/index.md +0 -0
  139. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/configuration/logging.md +0 -0
  140. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/configuration/proxy.md +0 -0
  141. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/configuration/settings.md +0 -0
  142. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/configuration/timeouts.md +0 -0
  143. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/dependencies.md +0 -0
  144. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/first-steps.md +0 -0
  145. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/graphql/index.md +0 -0
  146. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/graphql/mutations.md +0 -0
  147. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/graphql/queries.md +0 -0
  148. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/http-methods.md +0 -0
  149. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/index.md +0 -0
  150. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/lifespan.md +0 -0
  151. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/middleware/creating.md +0 -0
  152. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/middleware/examples.md +0 -0
  153. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/middleware/index.md +0 -0
  154. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/openapi/index.md +0 -0
  155. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/openapi/swagger-ui.md +0 -0
  156. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/parallel-execution.md +0 -0
  157. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/request-parameters.md +0 -0
  158. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/response-handling.md +0 -0
  159. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/security/circuit-breaker.md +0 -0
  160. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/security/index.md +0 -0
  161. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/security/secrets-masking.md +0 -0
  162. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/security/ssrf-protection.md +0 -0
  163. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/tags.md +0 -0
  164. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/validation/error-validation.md +0 -0
  165. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/validation/index.md +0 -0
  166. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/validation/pydantic-validation.md +0 -0
  167. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/docs/ru/tutorial/validation/request-validation.md +0 -0
  168. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/README.md +0 -0
  169. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/advanced/error_handling.py +0 -0
  170. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/advanced/redirect_test.py +0 -0
  171. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/basic/defaults_example.py +0 -0
  172. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/basic/full_crud.py +0 -0
  173. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/basic/response_request_info.py +0 -0
  174. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/basic/test_delete.py +0 -0
  175. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/basic/test_get.py +0 -0
  176. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/basic/test_patch.py +0 -0
  177. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/basic/test_post.py +0 -0
  178. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/basic/test_put.py +0 -0
  179. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/data/form_data.py +0 -0
  180. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/dependencies/basic_dependencies.py +0 -0
  181. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/dependencies/with_cache_scope.py +0 -0
  182. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/endpoints/get_ip.py +0 -0
  183. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/endpoints/jsonplaceholder_get.py +0 -0
  184. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/endpoints/jsonplaceholder_posts.py +0 -0
  185. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/endpoints/multiple_endpoints.py +0 -0
  186. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/error/bad_status_codes.py +0 -0
  187. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/error/connection_error.py +0 -0
  188. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/error/invalid_url.py +0 -0
  189. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/error/not_found_site.py +0 -0
  190. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/error/responses.py +0 -0
  191. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/error/server_errors.py +0 -0
  192. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/error/successful_request.py +0 -0
  193. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/error/timeout_error.py +0 -0
  194. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/error/validation_error.py +0 -0
  195. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/graphql/pokemon.py +0 -0
  196. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/graphql/rick_and_morty.py +0 -0
  197. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/graphql/run_examples.py +0 -0
  198. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/graphql/star_wars.py +0 -0
  199. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/headers/headers.py +0 -0
  200. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/headers/user_agent.py +0 -0
  201. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/http2/README.md +0 -0
  202. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/http2/http2_example.py +0 -0
  203. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/methods/json_post.py +0 -0
  204. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/middleware/basic_middleware.py +0 -0
  205. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/middleware/error_middleware.py +0 -0
  206. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/middleware/response_transformer.py +0 -0
  207. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/openapi/openapi_example.py +0 -0
  208. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/parameters/delay_response.py +0 -0
  209. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/parameters/query_params.py +0 -0
  210. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/parameters/query_params_example.py +0 -0
  211. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/parameters/timeout_example.py +0 -0
  212. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/pydantic/advanced_validation.py +0 -0
  213. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/pydantic/basic_validation.py +0 -0
  214. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/pydantic/create_and_validate.py +0 -0
  215. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/pydantic/crud_with_validation.py +0 -0
  216. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/pydantic/nested_models.py +0 -0
  217. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/routers/base.py +0 -0
  218. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/run_all.py +0 -0
  219. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/examples/tags/basic_tags.py +0 -0
  220. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/__init__.py +0 -0
  221. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/cli/__init__.py +0 -0
  222. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/cli/client.py +0 -0
  223. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/cli/commands.py +0 -0
  224. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/cli/main.py +0 -0
  225. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/cli/output.py +0 -0
  226. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/cli/repl.py +0 -0
  227. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/client.py +0 -0
  228. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/dependencies/__init__.py +0 -0
  229. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/dependencies/dependencies.py +0 -0
  230. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/exceptions/__init__.py +0 -0
  231. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/exceptions/base.py +0 -0
  232. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/exceptions/connect.py +0 -0
  233. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/exceptions/request.py +0 -0
  234. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/exceptions/status.py +0 -0
  235. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/exceptions/timeout.py +0 -0
  236. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/exceptions/types.py +0 -0
  237. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/exceptions/validator.py +0 -0
  238. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/graphql/__init__.py +0 -0
  239. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/graphql/client.py +0 -0
  240. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/graphql/types.py +0 -0
  241. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/helpers/__init__.py +0 -0
  242. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/logging.py +0 -0
  243. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/middleware.py +0 -0
  244. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/openapi/__init__.py +0 -0
  245. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/openapi/generator.py +0 -0
  246. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/openapi/routes.py +0 -0
  247. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/openapi/swagger.py +0 -0
  248. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/openapi/urls.py +0 -0
  249. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/py.typed +0 -0
  250. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/response.py +0 -0
  251. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/routing.py +0 -0
  252. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/security/__init__.py +0 -0
  253. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/security/circuit_breaker.py +0 -0
  254. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/security/headers.py +0 -0
  255. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/security/limits.py +0 -0
  256. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/security/redirect.py +0 -0
  257. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/security/response.py +0 -0
  258. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/security/secrets.py +0 -0
  259. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/security/security.py +0 -0
  260. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/security/signer.py +0 -0
  261. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/security/ssrf.py +0 -0
  262. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/fasthttp/types.py +0 -0
  263. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/mkdocs.yml +0 -0
  264. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/scripts/Makefile +0 -0
  265. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/tests/__init__.py +0 -0
  266. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/tests/conftest.py +0 -0
  267. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/tests/test_cli.py +0 -0
  268. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/tests/test_client.py +0 -0
  269. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/tests/test_dependencies.py +0 -0
  270. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/tests/test_exceptions.py +0 -0
  271. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/tests/test_graphql.py +0 -0
  272. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/tests/test_openapi.py +0 -0
  273. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/tests/test_performance.py +0 -0
  274. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/tests/test_response.py +0 -0
  275. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/tests/test_security.py +0 -0
  276. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/tests/test_types.py +0 -0
  277. {fasthttp_client-1.2.0 → fasthttp_client-1.2.2}/uv.lock +0 -0
@@ -63,8 +63,7 @@ jobs:
63
63
  generate_release_notes: true
64
64
  draft: false
65
65
  prerelease: false
66
- env:
67
- GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
66
+ token: ${{ secrets.GH_TOKEN }}
68
67
 
69
68
  - name: Set up Python
70
69
  if: steps.tag_check.outputs.skip == 'false'
@@ -17,6 +17,7 @@ jobs:
17
17
  - name: Welcome contributor
18
18
  uses: actions/github-script@v8
19
19
  with:
20
+ token: ${{ secrets.GH_TOKEN }}
20
21
  script: |
21
22
  const { issue, pull_request, sender } = context.payload;
22
23
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fasthttp-client
3
- Version: 1.2.0
3
+ Version: 1.2.2
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
@@ -14,6 +14,7 @@ app = FastHTTP(
14
14
  security: bool = True,
15
15
  lifespan: Callable = None,
16
16
  middleware: list = [],
17
+ base_url: str = None,
17
18
  get_request: dict = {},
18
19
  post_request: dict = {},
19
20
  put_request: dict = {},
@@ -32,12 +33,24 @@ app = FastHTTP(
32
33
  | `security` | `bool` | `True` | Enable security |
33
34
  | `lifespan` | `Callable` | `None` | Startup/shutdown handler |
34
35
  | `middleware` | `list` | `[]` | Middleware list |
36
+ | `base_url` | `str` | `None` | Default base URL for decorators and routers |
35
37
  | `get_request` | `dict` | `{}` | Default GET settings |
36
38
  | `post_request` | `dict` | `{}` | Default POST settings |
37
39
  | `put_request` | `dict` | `{}` | Default PUT settings |
38
40
  | `patch_request` | `dict` | `{}` | Default PATCH settings |
39
41
  | `delete_request` | `dict` | `{}` | Default DELETE settings |
40
42
 
43
+ **base_url Usage:**
44
+
45
+ ```python
46
+ app = FastHTTP(base_url="https://api.example.com")
47
+
48
+ @app.get("/users") # → https://api.example.com/users
49
+ @app.post("/users") # → https://api.example.com/users
50
+
51
+ @app.get("https://other.com/api") # → https://other.com/api (absolute URL)
52
+ ```
53
+
41
54
  ## Methods
42
55
 
43
56
  ### run()
@@ -182,7 +182,7 @@ from fasthttp import FastHTTP
182
182
 
183
183
  from src.clients.integrations import setup_integrations_router
184
184
 
185
- app = FastHTTP()
185
+ app = FastHTTP(base_url="https://api.example.com")
186
186
  app.include_router(setup_integrations_router())
187
187
  ```
188
188
 
@@ -229,6 +229,44 @@ app.include_router(router, base_url="https://api.example.com")
229
229
 
230
230
  If no `base_url` is provided, FastHTTP raises `ValueError`.
231
231
 
232
+ ## base_url in FastHTTP Constructor
233
+
234
+ You can set `base_url` directly in the `FastHTTP` constructor, and it will be applied to all decorators:
235
+
236
+ ```python
237
+ from fasthttp import FastHTTP
238
+ from fasthttp.response import Response
239
+
240
+ app = FastHTTP(base_url="https://api.example.com")
241
+
242
+
243
+ @app.get("/users") # → https://api.example.com/users
244
+ async def get_users(resp: Response) -> dict:
245
+ return resp.json()
246
+
247
+
248
+ @app.post("/users") # → https://api.example.com/users
249
+ async def create_user(resp: Response) -> dict:
250
+ return resp.json()
251
+
252
+
253
+ @app.graphql("/graphql") # → https://api.example.com/graphql
254
+ async def query(resp: Response) -> dict:
255
+ return {"query": "{ users { id } }"}
256
+ ```
257
+
258
+ This works the same way for all decorators: `get`, `post`, `put`, `patch`, `delete`, and `graphql`.
259
+
260
+ Absolute URLs are used as-is and ignore `base_url`:
261
+
262
+ ```python
263
+ app = FastHTTP(base_url="https://api.example.com")
264
+
265
+ @app.get("https://other.com/api") # → https://other.com/api (base_url ignored)
266
+ async def other_api(resp: Response) -> dict:
267
+ return resp.json()
268
+ ```
269
+
232
270
  ## When to Use Routers
233
271
 
234
272
  Use routers when your project has:
@@ -14,6 +14,7 @@ app = FastHTTP(
14
14
  security: bool = True,
15
15
  lifespan: Callable = None,
16
16
  middleware: list = [],
17
+ base_url: str = None,
17
18
  get_request: dict = {},
18
19
  post_request: dict = {},
19
20
  put_request: dict = {},
@@ -32,7 +33,23 @@ app = FastHTTP(
32
33
  | `security` | `bool` | `True` | Включить безопасность |
33
34
  | `lifespan` | `Callable` | `None` | Обработчик запуска/завершения |
34
35
  | `middleware` | `list` | `[]` | Список middleware |
36
+ | `base_url` | `str` | `None` | Базовый URL для декораторов и роутеров |
35
37
  | `get_request` | `dict` | `{}` | Настройки GET |
38
+ | `post_request` | `dict` | `{}` | Настройки POST |
39
+ | `put_request` | `dict` | `{}` | Настройки PUT |
40
+ | `patch_request` | `dict` | `{}` | Настройки PATCH |
41
+ | `delete_request` | `dict` | `{}` | Настройки DELETE |
42
+
43
+ **Использование base_url:**
44
+
45
+ ```python
46
+ app = FastHTTP(base_url="https://api.example.com")
47
+
48
+ @app.get("/users") # → https://api.example.com/users
49
+ @app.post("/users") # → https://api.example.com/users
50
+
51
+ @app.get("https://other.com/api") # → https://other.com/api (абсолютный URL)
52
+ ```
36
53
 
37
54
  ## Методы
38
55
 
@@ -186,7 +186,7 @@ from fasthttp import FastHTTP
186
186
 
187
187
  from src.clients.integrations import setup_integrations_router
188
188
 
189
- app = FastHTTP()
189
+ app = FastHTTP(base_url="https://api.example.com")
190
190
  app.include_router(setup_integrations_router())
191
191
  ```
192
192
 
@@ -235,6 +235,45 @@ app.include_router(router, base_url="https://api.example.com")
235
235
 
236
236
  Если `base_url` не передан, FastHTTP выбросит `ValueError`.
237
237
 
238
+ ## base_url в конструкторе FastHTTP
239
+
240
+ Можно указать `base_url` прямо в конструкторе `FastHTTP`, и он будет
241
+ применяться ко всем декораторам:
242
+
243
+ ```python
244
+ from fasthttp import FastHTTP
245
+ from fasthttp.response import Response
246
+
247
+ app = FastHTTP(base_url="https://api.example.com")
248
+
249
+
250
+ @app.get("/users") # → https://api.example.com/users
251
+ async def get_users(resp: Response) -> dict:
252
+ return resp.json()
253
+
254
+
255
+ @app.post("/users") # → https://api.example.com/users
256
+ async def create_user(resp: Response) -> dict:
257
+ return resp.json()
258
+
259
+
260
+ @app.graphql("/graphql") # → https://api.example.com/graphql
261
+ async def query(resp: Response) -> dict:
262
+ return {"query": "{ users { id } }"}
263
+ ```
264
+
265
+ Это работает для всех декораторов: `get`, `post`, `put`, `patch`, `delete` и `graphql`.
266
+
267
+ Абсолютные URL используются как есть и игнорируют `base_url`:
268
+
269
+ ```python
270
+ app = FastHTTP(base_url="https://api.example.com")
271
+
272
+ @app.get("https://other.com/api") # → https://other.com/api (base_url игнорируется)
273
+ async def other_api(resp: Response) -> dict:
274
+ return resp.json()
275
+ ```
276
+
238
277
  ## Когда использовать роутеры
239
278
 
240
279
  Используйте роутеры, когда в проекте есть:
@@ -0,0 +1 @@
1
+ __version__ = "1.2.2"
@@ -1,7 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import asyncio
4
- import inspect
5
4
  import json
6
5
  import secrets
7
6
  import time
@@ -12,7 +11,7 @@ import httpx
12
11
  from annotated_doc import Doc
13
12
 
14
13
  from .client import HTTPClient
15
- from .helpers.routing import check_annotated_parameters, check_annotated_return, check_https_url
14
+ from .helpers.routing import apply_base_url, check_annotated_parameters, check_annotated_return, check_https_url
16
15
  from .graphql.client import create_graphql_client
17
16
  from .logging import setup_logger
18
17
  from .middleware import BaseMiddleware, MiddlewareManager
@@ -278,6 +277,26 @@ class FastHTTP:
278
277
  ),
279
278
  ] = "v4",
280
279
  base_url: Annotated[
280
+ str | None,
281
+ Doc(
282
+ """
283
+ Default base URL for requests.
284
+
285
+ This value is used by:
286
+ - Decorators (`@app.get`, `@app.post`, etc.) with relative paths
287
+ - GraphQL (`@app.graphql`) with relative paths
288
+ - `include_router()` when the router tree contains relative URLs
289
+
290
+ Example:
291
+ ```python
292
+ app = FastHTTP(base_url="https://api.example.com")
293
+
294
+ @app.get("/users") # → https://api.example.com/users
295
+ ```
296
+ """
297
+ ),
298
+ ] = None,
299
+ docs_base_url: Annotated[
281
300
  str,
282
301
  Doc(
283
302
  """
@@ -288,7 +307,7 @@ class FastHTTP:
288
307
 
289
308
  Example:
290
309
  ```python
291
- app = FastHTTP(base_url="/api")
310
+ app = FastHTTP(docs_base_url="/api")
292
311
  ```
293
312
  """
294
313
  ),
@@ -300,6 +319,7 @@ class FastHTTP:
300
319
  self.lifespan = lifespan
301
320
  self.proxy = proxy
302
321
  self.base_url = base_url
322
+ self.docs_base_url = docs_base_url
303
323
  self.generate_startup_uuid = generate_startup_uuid
304
324
  self.startup_uuid_version = startup_uuid_version
305
325
 
@@ -431,6 +451,9 @@ class FastHTTP:
431
451
  """
432
452
  return check_https_url(url=url)
433
453
 
454
+ def _resolve_url(self, url: str) -> str:
455
+ return apply_base_url(url=url, base_url=self.base_url)
456
+
434
457
  def _add_route(
435
458
  self,
436
459
  *,
@@ -452,7 +475,7 @@ class FastHTTP:
452
475
  self.routes.append(
453
476
  Route(
454
477
  method=method,
455
- url=self._check_https_url(url=url),
478
+ url=self._resolve_url(url),
456
479
  handler=func,
457
480
  params=params,
458
481
  json=json,
@@ -550,9 +573,11 @@ class FastHTTP:
550
573
  tags: Tags prepended before router tags.
551
574
  dependencies: Dependencies prepended before router dependencies.
552
575
  base_url: Base URL override for the included router tree.
576
+ If not provided, `FastHTTP.base_url` will be used.
553
577
  """
578
+ resolved_base_url = base_url if base_url is not None else self.base_url
554
579
  routes = router.build_routes(
555
- base_url=base_url,
580
+ base_url=resolved_base_url,
556
581
  prefix=prefix,
557
582
  tags=tags,
558
583
  dependencies=dependencies,
@@ -814,7 +839,7 @@ class FastHTTP:
814
839
  self.routes.append(
815
840
  Route(
816
841
  method="POST",
817
- url=url,
842
+ url=self._resolve_url(url),
818
843
  handler=graphql_handler,
819
844
  tags=tags,
820
845
  skip_request=True,
@@ -1028,17 +1053,17 @@ class FastHTTP:
1028
1053
  host: Host to bind to. Default is "127.0.0.1".
1029
1054
  port: Port to bind to. Default is 8000.
1030
1055
  base_url: Optional prefix for documentation endpoints.
1031
- If not provided, `FastHTTP.base_url` will be used.
1056
+ If not provided, `FastHTTP.docs_base_url` will be used.
1032
1057
  """
1033
1058
  self.logger.info("FastHTTP started")
1034
1059
 
1035
- base_url = (
1036
- base_url if base_url is not None else self.base_url
1060
+ docs_base_url = (
1061
+ base_url if base_url is not None else self.docs_base_url
1037
1062
  )
1038
- app = ASGIApp(self, base_url=base_url)
1063
+ app = ASGIApp(self, base_url=docs_base_url)
1039
1064
 
1040
1065
  server_base_url = f"http://{host}:{port}"
1041
- docs_urls = build_docs_urls(base_url)
1066
+ docs_urls = build_docs_urls(docs_base_url)
1042
1067
 
1043
1068
  print(f"\n\033[92mfasthttp\033[0m running on \033[94m{server_base_url}\033[0m")
1044
1069
  print(
@@ -1,9 +1,12 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import inspect
4
- from collections.abc import Callable
4
+ from typing import TYPE_CHECKING
5
5
  from urllib.parse import urljoin
6
6
 
7
+ if TYPE_CHECKING:
8
+ from collections.abc import Callable
9
+
7
10
 
8
11
  def check_annotated_parameters(*, func: Callable[..., object]) -> None:
9
12
  """
@@ -133,7 +136,19 @@ def resolve_url(*, url: str, base_url: str | None, prefix: str) -> str:
133
136
  return urljoin(base, path)
134
137
 
135
138
 
139
+ def apply_base_url(*, url: str, base_url: str | None) -> str:
140
+ url = url.strip()
141
+ if url.startswith(("https://", "http://")):
142
+ return url
143
+
144
+ if base_url:
145
+ return check_https_url(url=f"{base_url.rstrip('/')}/{url.lstrip('/')}")
146
+
147
+ return check_https_url(url=url)
148
+
149
+
136
150
  __all__ = (
151
+ "apply_base_url",
137
152
  "check_annotated_parameters",
138
153
  "check_annotated_return",
139
154
  "check_https_url",
@@ -10,7 +10,7 @@ exclude = ["/tests", "/docs", "/examples"]
10
10
 
11
11
  [project]
12
12
  name = "fasthttp-client"
13
- version = "1.2.0"
13
+ version = "1.2.2"
14
14
  description = "Fast and simple HTTP client library with async support and beautiful logging"
15
15
  readme = "README.md"
16
16
  license = {text = "MIT"}
@@ -34,11 +34,17 @@ class TestFastHTTPApp:
34
34
  assert app.request_configs["GET"]["timeout"] == 60.0
35
35
  assert app.request_configs["POST"]["timeout"] == 120.0
36
36
 
37
- def test_app_creation_with_docs_base_url(self) -> None:
37
+ def test_app_creation_with_base_url(self) -> None:
38
38
  """Test FastHTTP creation with base_url."""
39
- app = FastHTTP(base_url="/api")
39
+ app = FastHTTP(base_url="https://example.com")
40
+
41
+ assert app.base_url == "https://example.com"
42
+
43
+ def test_app_creation_with_docs_base_url(self) -> None:
44
+ """Test FastHTTP creation with docs_base_url."""
45
+ app = FastHTTP(docs_base_url="/api")
40
46
 
41
- assert app.base_url == "/api"
47
+ assert app.docs_base_url == "/api"
42
48
 
43
49
  def test_app_get_decorator(self) -> None:
44
50
  """Test GET decorator registers route."""
@@ -170,13 +176,26 @@ class TestFastHTTPApp:
170
176
  with pytest.raises(ValueError, match="Relative URL requires base_url"):
171
177
  app.include_router(router)
172
178
 
179
+ def test_app_include_router_uses_app_base_url_by_default(self) -> None:
180
+ app = FastHTTP(base_url="https://example.com")
181
+ router = Router(prefix="/v1")
182
+
183
+ @router.get("/me")
184
+ async def handler(resp: Response) -> dict:
185
+ return resp.json()
186
+
187
+ app.include_router(router)
188
+
189
+ assert len(app.routes) == 1
190
+ assert app.routes[0].url == "https://example.com/v1/me"
191
+
173
192
  @pytest.mark.asyncio
174
193
  async def test_asgi_handle_request_docs_uses_app_docs_base_url(self) -> None:
175
- """Test ASGI docs path uses base_url from FastHTTP."""
194
+ """Test ASGI docs path uses docs_base_url from FastHTTP."""
176
195
  from fasthttp.app import ASGIApp
177
196
 
178
- app = FastHTTP(base_url="/api")
179
- asgi_app = ASGIApp(app, base_url=app.base_url)
197
+ app = FastHTTP(docs_base_url="/api")
198
+ asgi_app = ASGIApp(app, base_url=app.docs_base_url)
180
199
 
181
200
  scope = {"type": "http", "path": "/api/docs", "method": "GET"}
182
201
  receive = AsyncMock()
@@ -1 +0,0 @@
1
- __version__ = "1.2.0"
File without changes