- Sort Score
- Num 10 results
- Language All
Results 891 - 900 of 1,083 for str (0.01 seconds)
-
docs/de/docs/features.md
```Python from datetime import date from pydantic import BaseModel # Deklarieren Sie eine Variable als ein str # und bekommen Sie Editor-Unterstützung innerhalb der Funktion def main(user_id: str): return user_id # Ein Pydantic-Modell class User(BaseModel): id: int name: str joined: date ``` Das kann nun wie folgt verwendet werden: ```Python
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:58:09 GMT 2026 - 10.3K bytes - Click Count (0) -
docs/uk/docs/tutorial/path-params.md
### Створіть клас `Enum` { #create-an-enum-class } Імпортуйте `Enum` і створіть підклас, що наслідується від `str` та `Enum`. Завдяки наслідуванню від `str` документація API зможе визначити, що значення повинні бути типу `string`, і зможе коректно їх відобразити.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:27:41 GMT 2026 - 14K bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial001_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 239 bytes - Click Count (0) -
tests/test_callable_endpoint.py
from functools import partial from fastapi import FastAPI from fastapi.testclient import TestClient def main(some_arg, q: str | None = None): return {"some_arg": some_arg, "q": q} endpoint = partial(main, "foo") app = FastAPI() app.get("/")(endpoint) client = TestClient(app) def test_partial(): response = client.get("/?q=bar") data = response.json()
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 426 bytes - Click Count (0) -
docs/pt/docs/tutorial/response-model.md
Seu modelo de resposta pode ter valores padrão, como: {* ../../docs_src/response_model/tutorial004_py310.py hl[9,11:12] *} * `description: Union[str, None] = None` (ou `str | None = None` no Python 3.10) tem um padrão de `None`. * `tax: float = 10.5` tem um padrão de `10.5`. * `tags: List[str] = []` tem um padrão de uma lista vazia: `[]`. mas você pode querer omiti-los do resultado se eles não foram realmente armazenados.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:20:43 GMT 2026 - 16.7K bytes - Click Count (0) -
docs/tr/docs/tutorial/query-params.md
Ancak bir query parametresini zorunlu yapmak istediğinizde, herhangi bir varsayılan değer tanımlamamanız yeterlidir: {* ../../docs_src/query_params/tutorial005_py310.py hl[6:7] *} Burada query parametresi `needy`, `str` tipinde zorunlu bir query parametresidir. Tarayıcınızda şöyle bir URL açarsanız: ``` http://127.0.0.1:8000/items/foo-item ``` ...zorunlu `needy` parametresini eklemeden, şuna benzer bir hata görürsünüz:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 07:53:17 GMT 2026 - 4.9K bytes - Click Count (0) -
docs/pt/docs/tutorial/dependencies/classes-as-dependencies.md
Você deve ter percebido que para criar um instância de uma classe em Python, a mesma sintaxe é utilizada. Por exemplo: ```Python class Cat: def __init__(self, name: str): self.name = name fluffy = Cat(name="Mr Fluffy") ``` Nesse caso, `fluffy` é uma instância da classe `Cat`. E para criar `fluffy`, você está "chamando" `Cat`.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 13 13:48:53 GMT 2026 - 7.3K bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial009_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 281 bytes - Click Count (0) -
docs/es/docs/tutorial/response-model.md
{* ../../docs_src/response_model/tutorial004_py310.py hl[9,11:12] *} * `description: Union[str, None] = None` (o `str | None = None` en Python 3.10) tiene un valor por defecto de `None`. * `tax: float = 10.5` tiene un valor por defecto de `10.5`. * `tags: List[str] = []` tiene un valor por defecto de una list vacía: `[]`. pero podrías querer omitirlos del resultado si no fueron en realidad almacenados.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:15:55 GMT 2026 - 17.1K bytes - Click Count (0) -
docs/fr/docs/tutorial/request-files.md
### `UploadFile` { #uploadfile } `UploadFile` a les attributs suivants : - `filename` : une `str` contenant le nom de fichier original téléversé (par ex. `myimage.jpg`). - `content_type` : une `str` avec le type de contenu (type MIME / type média) (par ex. `image/jpeg`).Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:37:13 GMT 2026 - 8.2K bytes - Click Count (0)