- Sort Score
- Result 10 results
- Languages All
Results 221 - 230 of 1,086 for str (0.04 sec)
-
src/main/java/jcifs/dcerpc/DcerpcHandle.java
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Sun Jun 30 10:11:57 UTC 2019 - 12.9K bytes - Viewed (0) -
docs/pt/docs/python-types.md
```Python hl_lines="1 4" {!../../docs_src/python_types/tutorial009.py!} ``` O uso de `Optional[str]` em vez de apenas `str` permitirá que o editor o ajude a detectar erros, onde você pode estar assumindo que um valor é sempre um `str`, quando na verdade também pode ser `None`. `Optional[Something]` é na verdade um atalho para `Union[Something, None]`, eles são equivalentes. Isso também significa que no Python 3.10, você pode utilizar `Something | None`:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 15 12:32:27 UTC 2024 - 18K bytes - Viewed (0) -
docs_src/settings/tutorial001.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,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 419 bytes - Viewed (0) -
docs_src/query_params/tutorial006.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 301 bytes - Viewed (0) -
docs_src/path_operation_advanced_configuration/tutorial004.py
from typing import Set, Union from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None tags: Set[str] = set() @app.post("/items/", response_model=Item, summary="Create an item") async def create_item(item: Item): """ Create an item with all the information:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 717 bytes - Viewed (0) -
docs_src/path_operation_configuration/tutorial005_py39.py
from typing import Union from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None tags: set[str] = set() @app.post( "/items/", response_model=Item, summary="Create an item", response_description="The created item", )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 736 bytes - Viewed (0) -
src/main/java/jcifs/smb1/dcerpc/UnicodeString.java
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Fri Mar 22 20:39:42 UTC 2019 - 1.9K bytes - Viewed (0) -
docs/bn/docs/python-types.md
```Python hl_lines="1 4" {!../../docs_src/python_types/tutorial009.py!} ``` `Optional[str]` ব্যবহার করা মানে হল শুধু `str` নয়, এটি হতে পারে `None`-ও, যা আপনার এডিটরকে সেই ত্রুটিগুলি শনাক্ত করতে সাহায্য করবে যেখানে আপনি ধরে নিচ্ছেন যে একটি মান সবসময় `str` হবে, অথচ এটি `None`-ও হতে পারেও। `Optional[Something]` মূলত `Union[Something, None]`-এর একটি শর্টকাট, এবং তারা সমতুল্য।
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 35.8K bytes - Viewed (0) -
docs_src/security/tutorial004_an.py
} class Token(BaseModel): access_token: str token_type: str class TokenData(BaseModel): username: Union[str, None] = None 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
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon May 20 17:37:28 UTC 2024 - 4.2K bytes - Viewed (0) -
docs_src/websockets/tutorial002_an_py310.py
websocket: WebSocket, session: Annotated[str | None, Cookie()] = None, token: Annotated[str | None, Query()] = None, ): if session is None and token is None: raise WebSocketException(code=status.WS_1008_POLICY_VIOLATION) return session or token @app.websocket("/items/{item_id}/ws") async def websocket_endpoint( *, websocket: WebSocket, item_id: str, q: int | None = None,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 2.8K bytes - Viewed (0)