- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for float (0.2 sec)
-
tests/main.py
def get_path_param_gt(item_id: float = Path(gt=3)): return item_id @app.get("/path/param-gt0/{item_id}") def get_path_param_gt0(item_id: float = Path(gt=0)): return item_id @app.get("/path/param-ge/{item_id}") def get_path_param_ge(item_id: float = Path(ge=3)): return item_id @app.get("/path/param-lt/{item_id}") def get_path_param_lt(item_id: float = Path(lt=3)): return item_id
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 21:56:59 GMT 2024 - 4.3K bytes - Viewed (0) -
tests/test_tutorial/test_dataclasses/test_tutorial001.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 5.2K bytes - Viewed (0) -
docs/pt/docs/tutorial/body-nested-models.md
* Conversão de dados * Validação de dados * Documentação automatica ## Tipos especiais e validação Além dos tipos singulares normais como `str`, `int`, `float`, etc. Você também pode usar tipos singulares mais complexos que herdam de `str`.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 7.4K bytes - Viewed (0) -
docs/tr/docs/python-types.md
# Python Veri Tiplerine Giriş Python isteğe bağlı olarak "tip belirteçlerini" destekler. **"Tip belirteçleri"** bir değişkenin <abbr title="örneğin: str, int, float, bool">tipinin</abbr> belirtilmesine olanak sağlayan özel bir sözdizimidir. Değişkenlerin tiplerini belirterek editör ve araçlardan daha fazla destek alabilirsiniz.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 9.7K bytes - Viewed (0) -
docs/pt/docs/tutorial/path-params.md
"type": "type_error.integer" } ] } ``` devido ao parâmetro da rota `item_id` ter um valor `"foo"`, que não é um `int`. O mesmo erro apareceria se você tivesse fornecido um `float` ao invés de um `int`, como em: <a href="http://127.0.0.1:8000/items/4.2" class="external-link" target="_blank">http://127.0.0.1:8000/items/4.2</a> !!! check "Verifique"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 9.7K bytes - Viewed (0) -
docs/pt/docs/tutorial/body.md
``` Os parâmetros da função serão reconhecidos conforme abaixo: * Se o parâmetro também é declarado na **rota**, será utilizado como um parâmetro de rota. * Se o parâmetro é de um **tipo único** (como `int`, `float`, `str`, `bool`, etc) será interpretado como um parâmetro de **consulta**. * Se o parâmetro é declarado como um **modelo Pydantic**, será interpretado como o **corpo** da requisição. !!! note "Observação"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 7.1K bytes - Viewed (0) -
tests/test_jsonable_encoder.py
class ModelWithRoot(BaseModel): __root__: str model = ModelWithRoot(__root__="Foo") assert jsonable_encoder(model) == "Foo" @needs_pydanticv2 def test_decimal_encoder_float(): data = {"value": Decimal(1.23)} assert jsonable_encoder(data) == {"value": 1.23} @needs_pydanticv2 def test_decimal_encoder_int(): data = {"value": Decimal(2)}
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 21:56:59 GMT 2024 - 9K bytes - Viewed (0) -
docs/zh/docs/tutorial/body.md
``` === "Python 3.8+" ```Python hl_lines="18" {!> ../../../docs_src/body/tutorial004.py!} ``` 函数参数按如下规则进行识别: - **路径**中声明了相同参数的参数,是路径参数 - 类型是(`int`、`float`、`str`、`bool` 等)**单类型**的参数,是**查询**参数 - 类型是 **Pydantic 模型**的参数,是**请求体** !!! note "笔记" 因为默认值是 `None`, FastAPI 会把 `q` 当作可选参数。 FastAPI 不使用 `Optional[str]` 中的 `Optional`, 但 `Optional` 可以让编辑器提供更好的支持,并检测错误。
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 6.5K bytes - Viewed (0) -
docs/em/docs/tutorial/body.md
=== "🐍 3️⃣.1️⃣0️⃣ & 🔛" ```Python hl_lines="16" {!> ../../../docs_src/body/tutorial004_py310.py!} ``` 🔢 🔢 🔜 🤔 ⏩: * 🚥 🔢 📣 **➡**, ⚫️ 🔜 ⚙️ ➡ 🔢. * 🚥 🔢 **⭐ 🆎** (💖 `int`, `float`, `str`, `bool`, ♒️) ⚫️ 🔜 🔬 **🔢** 🔢. * 🚥 🔢 📣 🆎 **Pydantic 🏷**, ⚫️ 🔜 🔬 📨 **💪**. !!! note FastAPI 🔜 💭 👈 💲 `q` 🚫 ✔ ↩️ 🔢 💲 `= None`.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 6.5K bytes - Viewed (0) -
docs/ko/docs/tutorial/body.md
=== "Python 3.8+" ```Python hl_lines="18" {!> ../../../docs_src/body/tutorial004.py!} ``` 함수 매개변수는 다음을 따라서 인지하게 됩니다: * 만약 매개변수가 **경로**에도 선언되어 있다면, 이는 경로 매개변수로 사용될 것입니다. * 만약 매개변수가 (`int`, `float`, `str`, `bool` 등과 같은) **유일한 타입**으로 되어있으면, **쿼리** 매개변수로 해석될 것입니다. * 만약 매개변수가 **Pydantic 모델** 타입으로 선언되어 있으면, 요청 **본문**으로 해석될 것입니다. !!! note "참고" FastAPI는 `q`의 값이 필요없음을 알게 될 것입니다. 기본 값이 `= None`이기 때문입니다.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 8.7K bytes - Viewed (0)