- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 1,747 for can (0.15 sec)
-
docs/en/docs/reference/response.md
# `Response` class You can declare a parameter in a *path operation function* or dependency to be of type `Response` and then you can set data for the response like headers or cookies. You can also use it directly to create an instance of it and return it from your *path operations*. You can import it directly from `fastapi`: ```python from fastapi import Response ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 397 bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/index.md
Let's see a very simple example. It will be so simple that it is not very useful, for now. But this way we can focus on how the **Dependency Injection** system works. ### Create a dependency, or "dependable" Let's first focus on the dependency. It is just a function that can take all the same parameters that a *path operation function* can take: === "Python 3.10+" ```Python hl_lines="8-9"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 11.6K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/dependencies-with-yield.md
So, you can look for that specific exception inside the dependency with `except SomeException`. In the same way, you can use `finally` to make sure the exit steps are executed, no matter if there was an exception or not. ```Python hl_lines="3 5" {!../../../docs_src/dependencies/tutorial007.py!} ``` ## Sub-dependencies with `yield`
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 14.1K bytes - Viewed (0) -
docs/en/docs/advanced/websockets.md
## Await for messages and send messages In your WebSocket route you can `await` for messages and send messages. ```Python hl_lines="48-52" {!../../../docs_src/websockets/tutorial001.py!} ``` You can receive and send binary, text, and JSON data. ## Try it If your file is named `main.py`, run your application with: <div class="termy">
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 6.2K bytes - Viewed (0) -
docs/en/docs/deployment/concepts.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 18K bytes - Viewed (0) -
docs/en/docs/tutorial/path-params.md
You can use the same type declarations with `str`, `float`, `bool` and many other complex data types. Several of these are explored in the next chapters of the tutorial. ## Order matters When creating *path operations*, you can find situations where you have a fixed path.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 9.1K bytes - Viewed (0) -
docs/en/docs/deployment/https.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 11 16:31:18 GMT 2024 - 12K bytes - Viewed (0) -
docs/en/docs/advanced/generate-clients.md
#### Install `openapi-ts` You can install `openapi-ts` in your frontend code with: <div class="termy"> ```console $ npm install @hey-api/openapi-ts --save-dev ---> 100% ``` </div> #### Generate Client Code To generate the client code you can use the command line application `openapi-ts` that would now be installed.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 10.5K bytes - Viewed (0) -
docs/en/docs/tutorial/bigger-applications.md
{!../../../docs_src/bigger_applications/app/routers/users.py!} ``` You can think of `APIRouter` as a "mini `FastAPI`" class. All the same options are supported. All the same `parameters`, `responses`, `dependencies`, `tags`, etc. !!! tip In this example, the variable is called `router`, but you can name it however you want.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 18.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/connection/ConnectionPoolTest.kt
// Running at time 50, the pool returns that nothing can be evicted until time 150. assertThat(pool.closeConnections(50L)).isEqualTo(100L) assertThat(pool.connectionCount()).isEqualTo(1) assertThat(c1.socket().isClosed).isFalse() // Running at time 60, the pool returns that nothing can be evicted until time 150. assertThat(pool.closeConnections(60L)).isEqualTo(90L)
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 24 04:40:49 GMT 2024 - 12.7K bytes - Viewed (0)