- Sort Score
- Num 10 results
- Language All
Results 51 - 60 of 337 for tipini (0.05 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
docs_src/dependencies/tutorial008c_an_py310.py
from typing import Annotated from fastapi import Depends, FastAPI, HTTPException app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("Oops, we didn't raise again, Britney 😱") @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]): if item_id == "portal-gun":
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 700 bytes - Click Count (0) -
docs/es/docs/python-types.md
* `bytes` {* ../../docs_src/python_types/tutorial005_py310.py hl[1] *} ### Módulo `typing` { #typing-module } Para algunos casos adicionales, podrías necesitar importar algunas cosas del módulo `typing` de la standard library, por ejemplo cuando quieres declarar que algo tiene "cualquier tipo", puedes usar `Any` de `typing`: ```python from typing import Any def some_function(data: Any): print(data) ```Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:15:55 GMT 2026 - 11.6K bytes - Click Count (1) -
docs/pt/docs/python-types.md
* `bytes` {* ../../docs_src/python_types/tutorial005_py310.py hl[1] *} ### Módulo `typing` { #typing-module } Para alguns casos adicionais, você pode precisar importar alguns itens do módulo padrão `typing`, por exemplo, quando quiser declarar que algo pode ter "qualquer tipo", você pode usar `Any` de `typing`: ```python from typing import Any def some_function(data: Any): print(data) ```Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:20:43 GMT 2026 - 11.7K bytes - Click Count (0) -
docs/en/docs/advanced/security/http-basic-auth.md
# Return some error ... ``` But by using the `secrets.compare_digest()` it will be secure against a type of attacks called "timing attacks". ### Timing Attacks { #timing-attacks } But what's a "timing attack"? Let's imagine some attackers are trying to guess the username and password. And they send a request with a username `johndoe` and a password `love123`.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 5K bytes - Click Count (0) -
fastapi/.agents/skills/fastapi/SKILL.md
```python from typing import Annotated from fastapi import Body, FastAPI from pydantic import Field app = FastAPI() @app.post("/items/") async def create_items(items: Annotated[list[int], Field(min_length=1), Body()]): return items ``` instead of: ```python # DO NOT DO THIS from typing import Annotated from fastapi import FastAPI
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 01 10:05:57 GMT 2026 - 10.1K bytes - Click Count (0) -
docs_src/custom_request_and_route/tutorial001_an_py310.py
import gzip from collections.abc import Callable from typing import Annotated from fastapi import Body, FastAPI, Request, Response from fastapi.routing import APIRoute class GzipRequest(Request): async def body(self) -> bytes: if not hasattr(self, "_body"): body = await super().body() if "gzip" in self.headers.getlist("Content-Encoding"): body = gzip.decompress(body)
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 10 08:55:32 GMT 2025 - 1015 bytes - Click Count (0) -
docs/uk/docs/python-types.md
{* ../../docs_src/python_types/tutorial005_py310.py hl[1] *} ### Модуль `typing` { #typing-module } Для деяких додаткових випадків використання може знадобитися імпортувати елементи зі стандартної бібліотеки, модуля `typing`. Наприклад, коли ви хочете оголосити, що щось має «будь-який тип», ви можете використати `Any` з `typing`: ```python from typing import Any def some_function(data: Any): print(data) ```Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:27:41 GMT 2026 - 17.4K bytes - Click Count (0) -
docs/tr/docs/tutorial/dependencies/classes-as-dependencies.md
Her iki durumda da şunlar olacak: * `str` olan opsiyonel bir `q` query parametresi. * Default değeri `0` olan `int` tipinde bir `skip` query parametresi. * Default değeri `100` olan `int` tipinde bir `limit` query parametresi. Her iki durumda da veriler dönüştürülecek, doğrulanacak, OpenAPI şemasında dokümante edilecek, vb. ## Kullanalım { #use-it }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 13 12:41:38 GMT 2026 - 7.3K bytes - Click Count (0) -
tests/test_schema_ref_pydantic_v2.py
from typing import Any import pytest from fastapi import FastAPI from fastapi.testclient import TestClient from inline_snapshot import snapshot from pydantic import BaseModel, ConfigDict, Field @pytest.fixture(name="client") def get_client(): app = FastAPI() class ModelWithRef(BaseModel): ref: str = Field(validation_alias="$ref", serialization_alias="$ref")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 2.1K bytes - Click Count (0) -
tests/test_stream_bare_type.py
import json from typing import AsyncIterable, Iterable # noqa: UP035 to test coverage from fastapi import FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel class Item(BaseModel): name: str app = FastAPI() @app.get("/items/stream-bare-async") async def stream_bare_async() -> AsyncIterable: yield {"name": "foo"} @app.get("/items/stream-bare-sync")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 27 18:56:47 GMT 2026 - 1.1K bytes - Click Count (0)