- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 1,072 for Str (0.03 sec)
-
docs_src/header_param_models/tutorial001_py310.py
from fastapi import FastAPI, Header from pydantic import BaseModel app = FastAPI() class CommonHeaders(BaseModel): host: str save_data: bool if_modified_since: str | None = None traceparent: str | None = None x_tag: list[str] = [] @app.get("/items/") async def read_items(headers: CommonHeaders = Header()):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 352 bytes - Viewed (0) -
docs_src/app_testing/app_b/main.py
"bar": {"id": "bar", "title": "Bar", "description": "The bartenders"}, } app = FastAPI() class Item(BaseModel): id: str title: str description: Union[str, None] = None @app.get("/items/{item_id}", response_model=Item) async def read_main(item_id: str, x_token: str = Header()): if x_token != fake_secret_token: raise HTTPException(status_code=400, detail="Invalid X-Token header")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Jan 09 14:44:08 UTC 2024 - 1.1K bytes - Viewed (0) -
docs/uk/docs/tutorial/extra-data-types.md
* У запитах та відповідях буде представлений як `str`. * `datetime.datetime`: * Пайтонівський `datetime.datetime`. * У запитах та відповідях буде представлений як `str` в форматі ISO 8601, як: `2008-09-15T15:53:00+05:00`. * `datetime.date`: * Пайтонівський `datetime.date`. * У запитах та відповідях буде представлений як `str` в форматі ISO 8601, як: `2008-09-15`. * `datetime.time`:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.8K bytes - Viewed (0) -
internal/store/store_test.go
} } } func TestParseKey(t *testing.T) { testCases := []struct { str string expectedKey Key }{ { str: "01894394-d046-4783-ba0d-f1c6885790dc.event", expectedKey: Key{ Name: "01894394-d046-4783-ba0d-f1c6885790dc", Extension: ".event", ItemCount: 1, }, }, { str: "100:01894394-d046-4783-ba0d-f1c6885790dc.event.snappy", expectedKey: Key{
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 4K bytes - Viewed (0) -
docs/en/docs/tutorial/metadata.md
| Parameter | Type | Description | |------------|------|-------------| | `title` | `str` | The title of the API. | | `summary` | `str` | A short summary of the API. <small>Available since OpenAPI 3.1.0, FastAPI 0.99.0.</small> | | `description` | `str` | A short description of the API. It can use Markdown. |
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.8K bytes - Viewed (0) -
tests/test_skip_defaults.py
class SubModel(BaseModel): a: Optional[str] = "foo" class Model(BaseModel): x: Optional[int] = None sub: SubModel class ModelSubclass(Model): y: int z: int = 0 w: Optional[int] = None class ModelDefaults(BaseModel): w: Optional[str] = None x: Optional[str] = None y: str = "y" z: str = "z"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 2K bytes - Viewed (0) -
docs_src/header_param_models/tutorial002_an.py
from typing_extensions import Annotated app = FastAPI() class CommonHeaders(BaseModel): model_config = {"extra": "forbid"} host: str save_data: bool if_modified_since: Union[str, None] = None traceparent: Union[str, None] = None x_tag: List[str] = [] @app.get("/items/") async def read_items(headers: Annotated[CommonHeaders, Header()]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 486 bytes - Viewed (0) -
docs_src/security/tutorial003_an.py
app = FastAPI() def fake_hash_password(password: str): return "fakehashed" + password oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token") class User(BaseModel): username: str email: Union[str, None] = None full_name: Union[str, None] = None disabled: Union[bool, None] = None class UserInDB(User): hashed_password: str def get_user(db, username: str):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 2.5K bytes - Viewed (0) -
docs_src/security/tutorial003_an_py39.py
app = FastAPI() def fake_hash_password(password: str): return "fakehashed" + password oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token") class User(BaseModel): username: str email: Union[str, None] = None full_name: Union[str, None] = None disabled: Union[bool, None] = None class UserInDB(User): hashed_password: str def get_user(db, username: str):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 2.5K bytes - Viewed (0) -
docs_src/response_model/tutorial003_py310.py
from fastapi import FastAPI from pydantic import BaseModel, EmailStr app = FastAPI() class UserIn(BaseModel): username: str password: str email: EmailStr full_name: str | None = None class UserOut(BaseModel): username: str email: EmailStr full_name: str | None = None @app.post("/user/", response_model=UserOut) async def create_user(user: UserIn) -> Any:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Jan 07 13:45:48 UTC 2023 - 431 bytes - Viewed (0)