- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 26 for Graves (5.92 sec)
-
docs/pt/docs/tutorial/extra-models.md
'full_name': None, } ``` #### Desembrulhando um `dict` Se tomarmos um `dict` como `user_dict` e passarmos para uma função (ou classe) com `**user_dict`, o Python irá "desembrulhá-lo". Ele passará as chaves e valores do `user_dict` diretamente como argumentos chave-valor. Então, continuando com o `user_dict` acima, escrevendo: ```Python UserInDB(**user_dict) ``` Resultaria em algo equivalente a: ```Python
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 7.8K bytes - Viewed (0) -
docs/pt/docs/tutorial/schema-extra-example.md
### `Body` com vários `examples` Alternativamente ao único `example`, você pode passar `examples` usando um `dict` com **vários examples**, cada um com informações extras que serão adicionadas no **OpenAPI** também. As chaves do `dict` identificam cada exemplo, e cada valor é outro `dict`. Cada `dict` de exemplo específico em `examples` pode conter: * `summary`: Pequena descrição do exemplo.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 6.1K bytes - Viewed (0) -
docs/en/data/external_links.yml
- author: Nicoló Lino author_link: https://www.nlino.com link: https://github.com/softwarebloat/python-tracing-demo title: Instrument a FastAPI service adding tracing with OpenTelemetry and send/show traces in Grafana Tempo - author: Mikhail Rozhkov, Elena Samuylova author_link: https://www.linkedin.com/in/mnrozhkov/ link: https://www.evidentlyai.com/blog/fastapi-tutorial
Others - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 21 20:57:27 GMT 2024 - 21.3K bytes - Viewed (2) -
docs_src/separate_openapi_schemas/tutorial001_py310.py
@app.post("/items/") def create_item(item: Item): return item @app.get("/items/") def read_items() -> list[Item]: return [ Item( name="Portal Gun", description="Device to travel through the multi-rick-verse", ), Item(name="Plumbus"),
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Aug 25 19:10:22 GMT 2023 - 451 bytes - Viewed (0) -
tests/test_openapi_separate_input_output_schemas.py
return item @app.get("/items/") def read_items() -> List[Item]: return [ Item( name="Portal Gun", description="Device to travel through the multi-rick-verse", sub=SubItem(subname="subname"), ), Item(name="Plumbus"), ] client = TestClient(app) return client
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Sep 28 04:14:40 GMT 2023 - 18.4K bytes - Viewed (2) -
tests/test_tutorial/test_separate_openapi_schemas/test_tutorial001_py310.py
response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == [ { "name": "Portal Gun", "description": "Device to travel through the multi-rick-verse", }, {"name": "Plumbus", "description": None}, ] @needs_py310 @needs_pydanticv2 def test_openapi_schema(client: TestClient) -> None:
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Sep 28 04:14:40 GMT 2023 - 4.9K bytes - Viewed (0) -
tests/test_tutorial/test_separate_openapi_schemas/test_tutorial002.py
response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == [ { "name": "Portal Gun", "description": "Device to travel through the multi-rick-verse", }, {"name": "Plumbus", "description": None}, ] @needs_pydanticv2 def test_openapi_schema(client: TestClient) -> None: response = client.get("/openapi.json")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Aug 25 19:10:22 GMT 2023 - 4.8K bytes - Viewed (0) -
docs/pt/docs/python-types.md
O primeiro parâmetro de tipo é para as chaves do `dict`. O segundo parâmetro de tipo é para os valores do `dict`: ```Python hl_lines="1 4" {!../../../docs_src/python_types/tutorial008.py!} ``` Isso significa que: * A variável `prices` é um dict`: * As chaves deste `dict` são do tipo `str` (digamos, o nome de cada item).
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 9.6K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/dependencies-with-yield.md
Nevertheless, as this would mean waiting for the response to travel through the network while unnecessarily holding a resource in a dependency with yield (for example a database connection), this was changed in FastAPI 0.106.0. !!! tip
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/pt/docs/tutorial/body-nested-models.md
Você também pode declarar um corpo como um `dict` com chaves de algum tipo e valores de outro tipo. Sem ter que saber de antemão quais são os nomes de campos/atributos válidos (como seria o caso dos modelos Pydantic). Isso seria útil se você deseja receber chaves que ainda não conhece. --- Outro caso útil é quando você deseja ter chaves de outro tipo, por exemplo, `int`. É isso que vamos ver aqui.
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)