- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 126 for but (0.21 sec)
-
.github/workflows/issue-manager.yml
Others - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Jan 30 18:46:56 GMT 2024 - 1.1K bytes - Viewed (0) -
docs/en/docs/tutorial/handling-errors.md
If the client requests `http://example.com/items/foo` (an `item_id` `"foo"`), that client will receive an HTTP status code of 200, and a JSON response of: ```JSON { "item": "The Foo Wrestlers" } ``` But if the client requests `http://example.com/items/bar` (a non-existent `item_id` `"bar"`), that client will receive an HTTP status code of 404 (the "not found" error), and a JSON response of: ```JSON { "detail": "Item not found"
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 9.1K bytes - Viewed (0) -
docs/en/docs/tutorial/sql-databases.md
The examples here use `.dict()` for compatibility with Pydantic v1, but you should use `.model_dump()` instead if you can use Pydantic v2. !!! tip The SQLAlchemy model for `User` contains a `hashed_password` that should contain a secure hashed version of the password.
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 29.6K bytes - Viewed (0) -
tests/test_openapi_servers.py
app = FastAPI( servers=[ {"url": "/", "description": "Default, relative server"}, { "url": "http://staging.localhost.tiangolo.com:8000", "description": "Staging but actually localhost still", }, {"url": "https://prod.example.com"}, ] ) @app.get("/foo") def foo(): return {"message": "Hello World"} client = TestClient(app)
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 2K bytes - Viewed (0) -
docs/en/docs/tutorial/path-params-numeric-validations.md
And you don't need to declare anything else for that parameter, so you don't really need to use `Query`. But you still need to use `Path` for the `item_id` path parameter. And you don't want to use `Annotated` for some reason. Python will complain if you put a value with a "default" before a value that doesn't have a "default". But you can re-order them, and have the value without a default (the query parameter `q`) first.
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Jan 11 16:31:18 GMT 2024 - 9.1K bytes - Viewed (0) -
docs/en/docs/advanced/additional-responses.md
You can declare additional responses, with additional status codes, media types, descriptions, etc. Those additional responses will be included in the OpenAPI schema, so they will also appear in the API docs. But for those additional responses you have to make sure you return a `Response` like `JSONResponse` directly, with your status code and content. ## Additional Response with `model`
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Jan 11 16:31:18 GMT 2024 - 8.8K bytes - Viewed (0) -
docs/en/docs/advanced/events.md
You could load it at the top level of the module/file, but that would also mean that it would **load the model** even if you are just running a simple automated test, then that test would be **slow** because it would have to wait for the model to load before being able to run an independent part of the code.
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 7.8K bytes - Viewed (0) -
docs/en/docs/how-to/separate-openapi-schemas.md
<div class="screenshot"> <img src="/img/tutorial/separate-openapi-schemas/image01.png"> </div> ### Model for Output But if you use the same model as an output, like here: === "Python 3.10+" ```Python hl_lines="19" {!> ../../../docs_src/separate_openapi_schemas/tutorial001_py310.py!} ``` === "Python 3.9+"
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/en/docs/tutorial/index.md
# Tutorial - User Guide This tutorial shows you how to use **FastAPI** with most of its features, step by step. Each section gradually builds on the previous ones, but it's structured to separate topics, so that you can go directly to any specific one to solve your specific API needs. It is also built to work as a future reference. So you can come back and see exactly what you need. ## Run the code
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Jun 24 14:47:15 GMT 2023 - 2.5K bytes - Viewed (0) -
fastapi/security/api_key.py
with the API key and integrates that into the OpenAPI documentation. It extracts the key value sent in the query parameter automatically and provides it as the dependency result. But it doesn't define how to send that API key to the client. ## Usage Create an instance object and use that object as the dependency in `Depends()`.
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Apr 23 22:29:18 GMT 2024 - 9.1K bytes - Viewed (0)