- Sort Score
- Num 10 results
- Language All
Results 101 - 110 of 181 for 1013 (0.03 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
docs/en/docs/tutorial/background-tasks.md
First, import `BackgroundTasks` and define a parameter in your *path operation function* with a type declaration of `BackgroundTasks`: {* ../../docs_src/background_tasks/tutorial001_py310.py hl[1,13] *} **FastAPI** will create the object of type `BackgroundTasks` for you and pass it as that parameter. ## Create a task function { #create-a-task-function } Create a function to be run as the background task.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 4.7K bytes - Click Count (0) -
docs/zh-hant/docs/advanced/dataclasses.md
在某些情況下,你可能仍需要使用 Pydantic 版本的 `dataclasses`。例如,當自動產生的 API 文件出現錯誤時。 這種情況下,你可以把標準的 `dataclasses` 直接換成 `pydantic.dataclasses`,它是可直接替換(drop-in replacement)的: {* ../../docs_src/dataclasses_/tutorial003_py310.py hl[1,4,7:10,13:16,22:24,27] *} 1. 我們仍然從標準的 `dataclasses` 匯入 `field`。 2. `pydantic.dataclasses` 是 `dataclasses` 的可直接替換版本。 3. `Author` dataclass 內含一個 `Item` dataclass 的清單。 4. `Author` dataclass 被用作 `response_model` 參數。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 3.8K bytes - Click Count (0) -
fastapi/encoders.py
where an integer (but not int typed) is used. Encoding this as a float results in failed round-tripping between encode and parse. Our Id type is a prime example of this. >>> decimal_encoder(Decimal("1.0")) 1.0 >>> decimal_encoder(Decimal("1")) 1 >>> decimal_encoder(Decimal("NaN")) nan """ exponent = dec_value.as_tuple().exponent if isinstance(exponent, int) and exponent >= 0:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 15 11:44:39 GMT 2026 - 10.9K bytes - Click Count (0) -
guava-tests/test/com/google/common/primitives/DoublesTest.java
assertThat(Doubles.contains(EMPTY, 1.0)).isFalse(); assertThat(Doubles.contains(ARRAY1, 2.0)).isFalse(); assertThat(Doubles.contains(ARRAY234, 1.0)).isFalse(); assertThat(Doubles.contains(new double[] {-1.0}, -1.0)).isTrue(); assertThat(Doubles.contains(ARRAY234, 2.0)).isTrue(); assertThat(Doubles.contains(ARRAY234, 3.0)).isTrue(); assertThat(Doubles.contains(ARRAY234, 4.0)).isTrue();
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sun Mar 08 01:43:32 GMT 2026 - 30.9K bytes - Click Count (0) -
guava/src/com/google/common/collect/RangeMap.java
* (10, ∞) => "baz"} then {@code rangeMap.subRangeMap(Range.open(3, 12))} would return a range map * with the entries {@code (3, 5] => "foo", (6, 8) => "bar", (10, 12) => "baz"}. * * <p>The returned range map supports all optional operations that this range map supports, except * for {@code asMapOfRanges().iterator().remove()}. *
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sun Dec 22 03:38:46 GMT 2024 - 7.6K bytes - Click Count (0) -
docs/ru/docs/advanced/events.md
Если присмотреться, функция декорирована `@asynccontextmanager`. Это превращает функцию в «асинхронный менеджер контекста». {* ../../docs_src/events/tutorial003_py310.py hl[1,13] *} Менеджер контекста в Python — это то, что можно использовать в операторе `with`. Например, `open()` можно использовать как менеджер контекста: ```Python with open("file.txt") as file: file.read() ```Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:56:20 GMT 2026 - 12.6K bytes - Click Count (0) -
docs/pt/docs/tutorial/background-tasks.md
Primeiro, importe `BackgroundTasks` e defina um parâmetro na sua *função de operação de rota* com uma declaração de tipo `BackgroundTasks`: {* ../../docs_src/background_tasks/tutorial001_py310.py hl[1,13] *} O **FastAPI** criará o objeto do tipo `BackgroundTasks` para você e o passará como esse parâmetro. ## Crie uma função de tarefa { #create-a-task-function }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:20:43 GMT 2026 - 5.1K bytes - Click Count (0) -
docs/en/docs/advanced/events.md
If you check, the function is decorated with an `@asynccontextmanager`. That converts the function into something called an "**async context manager**". {* ../../docs_src/events/tutorial003_py310.py hl[1,13] *} A **context manager** in Python is something that you can use in a `with` statement, for example, `open()` can be used as a context manager: ```Python with open("file.txt") as file: file.read() ```
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 7.8K bytes - Click Count (0) -
docs/pt/docs/advanced/events.md
Se você verificar, a função está decorada com um `@asynccontextmanager`. Isso converte a função em algo chamado "**gerenciador de contexto assíncrono**". {* ../../docs_src/events/tutorial003_py310.py hl[1,13] *} Um **gerenciador de contexto** em Python é algo que você pode usar em uma declaração `with`, por exemplo, `open()` pode ser usado como um gerenciador de contexto: ```Python with open("file.txt") as file:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:20:43 GMT 2026 - 8.7K bytes - Click Count (0) -
internal/dsync/drwmutex_test.go
hammerRWMutex(t, 1, 1, n) hammerRWMutex(t, 1, 3, n) hammerRWMutex(t, 1, 10, n) hammerRWMutex(t, 4, 1, n) hammerRWMutex(t, 4, 3, n) hammerRWMutex(t, 4, 10, n) hammerRWMutex(t, 10, 1, n) hammerRWMutex(t, 10, 3, n) hammerRWMutex(t, 10, 10, n) hammerRWMutex(t, 10, 5, n) } // Borrowed from rwmutex_test.go func TestUnlockPanic(t *testing.T) { defer func() { if recover() == nil {
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Sun Sep 28 20:59:21 GMT 2025 - 9.4K bytes - Click Count (0)