- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 51 for didn (0.19 sec)
-
docs_src/dependencies/tutorial008c_an_py39.py
app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("Oops, we didn't raise again, Britney 😱") @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]): if item_id == "portal-gun": raise InternalError(
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 700 bytes - Viewed (0) -
.github/DISCUSSION_TEMPLATE/questions.yml
required: true - label: I searched the FastAPI documentation, with the integrated search. required: true - label: I already searched in Google "How to X in FastAPI" and didn't find any information. required: true - label: I already read and followed all the tutorial in the docs and didn't find an answer. required: true
Others - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Aug 03 15:59:41 GMT 2023 - 5.8K bytes - Viewed (1) -
docs/en/docs/how-to/separate-openapi-schemas.md
### Model for Output Response Data If you interact with the docs and check the response, even though the code didn't add anything in one of the `description` fields, the JSON response contains the default value (`null`): <div class="screenshot"> <img src="/img/tutorial/separate-openapi-schemas/image02.png"> </div>
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 6.7K bytes - Viewed (0) -
docs_src/dependencies/tutorial008c.py
app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("Oops, we didn't raise again, Britney 😱") @app.get("/items/{item_id}") def get_item(item_id: str, username: str = Depends(get_username)): if item_id == "portal-gun": raise InternalError(
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 660 bytes - Viewed (0) -
docs/en/docs/tutorial/schema-extra-example.md
Now, as Swagger UI didn't support multiple JSON Schema examples (as of 2023-08-26), users didn't have a way to show multiple examples in the docs. To solve that, FastAPI `0.103.0` **added support** for declaring the same old **OpenAPI-specific** `examples` field with the new parameter `openapi_examples`. 🤓 ### Summary
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 11.8K bytes - Viewed (0) -
docs/en/docs/benchmarks.md
* If you didn't use FastAPI and used Starlette directly (or another tool, like Sanic, Flask, Responder, etc) you would have to implement all the data validation and serialization yourself. So, your final application would still have the same overhead as if it was...
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 3.4K bytes - Viewed (0) -
docs_src/response_change_status_code/tutorial001.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 391 bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/dependencies-with-yield.md
### Dependencies with `yield` and `except`, Technical Details Before FastAPI 0.110.0, if you used a dependency with `yield`, and then you captured an exception with `except` in that dependency, and you didn't raise the exception again, the exception would be automatically raised/forwarded to any exception handlers or the internal server error handler.
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 14.1K bytes - Viewed (0) -
docs/en/docs/advanced/response-change-status-code.md
But in some cases you need to return a different status code than the default. ## Use case For example, imagine that you want to return an HTTP status code of "OK" `200` by default. But if the data didn't exist, you want to create it, and return an HTTP status code of "CREATED" `201`. But you still want to be able to filter and convert the data you return with a `response_model`.
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Jan 11 16:31:18 GMT 2024 - 1.5K bytes - Viewed (0) -
tests/test_tutorial/test_response_change_status_code/test_tutorial001.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Jul 09 18:06:12 GMT 2020 - 521 bytes - Viewed (0)