- Sort Score
- Result 10 results
- Languages All
Results 241 - 250 of 1,072 for Str (0.04 sec)
-
docs_src/separate_openapi_schemas/tutorial001.py
from typing import List, Union from fastapi import FastAPI from pydantic import BaseModel class Item(BaseModel): name: str description: Union[str, None] = None app = FastAPI() @app.post("/items/") def create_item(item: Item): return item @app.get("/items/") def read_items() -> List[Item]: return [ Item( name="Portal Gun",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 25 19:10:22 UTC 2023 - 489 bytes - Viewed (0) -
tests/test_inherited_custom_class.py
import pytest from fastapi import FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel from .utils import needs_pydanticv1, needs_pydanticv2 class MyUuid: def __init__(self, uuid_string: str): self.uuid = uuid_string def __str__(self): return self.uuid @property # type: ignore def __class__(self): return uuid.UUID @property def __dict__(self):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 17 04:13:50 UTC 2024 - 3K bytes - Viewed (0) -
ci/official/utilities/convert_msys_paths_to_win_paths.py
Linux-like paths MSYS uses, for example, Docker. """ import argparse import os def should_convert(var_name: str, blacklist: list[str] | None, whitelist_prefix: list[str] | None): """Check the variable name against white/black lists.""" if blacklist and var_name in blacklist: return False if not whitelist_prefix: return True
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Wed Aug 07 23:01:25 UTC 2024 - 2.5K bytes - Viewed (0) -
docs_src/schema_extra_example/tutorial003.py
from typing import Union from fastapi import Body, FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None @app.put("/items/{item_id}") async def update_item( item_id: int, item: Item = Body( examples=[ { "name": "Foo",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 612 bytes - Viewed (0) -
docs_src/python_types/tutorial004.py
def get_name_with_age(name: str, age: int): name_with_age = name + " is this old: " + str(age)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 124 bytes - Viewed (0) -
docs_src/settings/app02_an/config.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 159 bytes - Viewed (0) -
docs_src/settings/app02_an_py39/config.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 159 bytes - Viewed (0) -
docs_src/python_types/tutorial002.py
def get_full_name(first_name: str, last_name: str): full_name = first_name.title() + " " + last_name.title() return full_name
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 172 bytes - Viewed (0) -
docs_src/python_types/tutorial013.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 138 bytes - Viewed (0) -
docs_src/python_types/tutorial013_py39.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 127 bytes - Viewed (0)