- Sort Score
- Num 10 results
- Language All
Results 281 - 290 of 853 for tstr (0.02 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
docs_src/schema_extra_example/tutorial004_an_py310.py
from typing import Annotated from fastapi import Body, FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None @app.put("/items/{item_id}") async def update_item( *, item_id: int, item: Annotated[ Item, Body( examples=[ {
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Jul 01 16:43:29 GMT 2023 - 917 bytes - Click Count (0) -
docs_src/pydantic_v1_in_v2/tutorial002_an_py39.py
from typing import Union from fastapi import FastAPI from pydantic.v1 import BaseModel class Item(BaseModel): name: str description: Union[str, None] = None size: float app = FastAPI() @app.post("/items/") async def create_item(item: Item) -> Item:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 284 bytes - Click Count (0) -
docs_src/settings/tutorial001_py39.py
from fastapi import FastAPI from pydantic_settings import BaseSettings class Settings(BaseSettings): app_name: str = "Awesome API" admin_email: str items_per_user: int = 50 settings = Settings() app = FastAPI() @app.get("/info") async def info(): return { "app_name": settings.app_name, "admin_email": settings.admin_email, "items_per_user": settings.items_per_user,
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 419 bytes - Click Count (0) -
docs_src/body/tutorial003_py310.py
from fastapi import FastAPI from pydantic import BaseModel class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None app = FastAPI() @app.put("/items/{item_id}") async def update_item(item_id: int, item: Item):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 330 bytes - Click Count (0) -
docs_src/openapi_callbacks/tutorial001_py39.py
from fastapi import APIRouter, FastAPI from pydantic import BaseModel, HttpUrl app = FastAPI() class Invoice(BaseModel): id: str title: Union[str, None] = None customer: str total: float class InvoiceEvent(BaseModel): description: str paid: bool class InvoiceEventReceived(BaseModel): ok: bool invoices_callback_router = APIRouter()
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 1.3K bytes - Click Count (0) -
src/test/java/jcifs/internal/smb1/com/SmbComNTCreateAndXTest.java
SmbComNTCreateAndX req = createRequest(0, 0); String str = req.toString(); assertTrue(str.startsWith("SmbComNTCreateAndX["), "toString should start with class name"); assertTrue(str.contains("name=test.txt"), "The file name should appear"); // securityFlags are set to 0x03 – verify hex sequence assertTrue(str.contains("securityFlags=0x03"), "securityFlags should be present"); }
Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 5.6K bytes - Click Count (0) -
docs/en/docs/tutorial/encoder.md
In this example, it would convert the Pydantic model to a `dict`, and the `datetime` to a `str`. The result of calling it is something that can be encoded with the Python standard <a href="https://docs.python.org/3/library/json.html#json.dumps" class="external-link" target="_blank">`json.dumps()`</a>.
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sun Aug 31 09:15:41 GMT 2025 - 1.7K bytes - Click Count (0) -
src/test/java/jcifs/smb1/smb1/ServerMessageBlockTest.java
void testToString() { smb.command = ServerMessageBlock.SMB_COM_ECHO; smb.errorCode = 0; smb.mid = 1; String str = smb.toString(); assertTrue(str.contains("command=SMB_COM_ECHO")); assertTrue(str.contains("errorCode=0")); assertTrue(str.contains("mid=1")); } @Test void testToStringUnknownCommand() { smb.command = (byte) 0xFF; // Unknown command
Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 9.9K bytes - Click Count (0) -
docs/ko/docs/python-types.md
#### `Optional` `str`과 같이 타입을 선언할 때 `Optional`을 쓸 수도 있는데, "선택적(Optional)"이기때문에 `None`도 될 수 있습니다: ```Python hl_lines="1 4" {!../../docs_src/python_types/tutorial009.py!} ``` `Optional[str]`을 `str` 대신 쓰게 되면, 특정 값이 실제로는 `None`이 될 수도 있는데 항상 `str`이라고 가정하는 상황에서 에디터가 에러를 찾게 도와줄 수 있습니다. #### Generic(제네릭) 타입 이 타입은 대괄호 안에 매개변수를 가지며, 종류는: * `List` * `Tuple` * `Set` * `Dict`Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Nov 18 02:25:44 GMT 2024 - 10.2K bytes - Click Count (0) -
tests/test_no_schema_split.py
class MessageEventType(str, Enum): alpha = "alpha" beta = "beta" class MessageEvent(BaseModel): event_type: MessageEventType = Field(default=MessageEventType.alpha) output: str class MessageOutput(BaseModel): body: str = "" events: list[MessageEvent] = [] class Message(BaseModel): input: str output: MessageOutput
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 6.4K bytes - Click Count (0)