- Sort Score
- Result 10 results
- Languages All
Results 321 - 330 of 4,225 for None (0.04 sec)
-
docs_src/separate_openapi_schemas/tutorial002.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(separate_input_output_schemas=False) @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 - 524 bytes - Viewed (0) -
docs_src/query_params/tutorial004.py
from typing import Union from fastapi import FastAPI app = FastAPI() @app.get("/users/{user_id}/items/{item_id}") async def read_user_item( user_id: int, item_id: str, q: Union[str, None] = None, short: bool = False ): item = {"item_id": item_id, "owner_id": user_id} if q: item.update({"q": q}) if not short: item.update(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 468 bytes - Viewed (0) -
tests/test_tutorial/test_body_multiple_params/test_tutorial001_an_py39.py
"item_id": 5, "item": { "name": "Foo", "price": 50.5, "description": None, "tax": None, }, "q": "bar", } @needs_py39 def test_post_no_body_q_bar(client: TestClient): response = client.put("/items/5?q=bar", json=None) assert response.status_code == 200 assert response.json() == {"item_id": 5, "q": "bar"} @needs_py39
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 7.6K bytes - Viewed (0) -
docs/sts/client_grants/sts_element.py
elt = self.element.find('sts:{}'.format(name), _STS_NS) return STSElement(self.root_name, elt) if elt is not None else None def get_child_text(self, name, strict=True): """Extract text of a child element. If strict, and child element is not present, raises InvalidXMLError and otherwise returns None. """ if strict: try:
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Apr 23 18:58:53 UTC 2021 - 2.5K bytes - Viewed (0) -
src/main/webapp/css/style.css
} #result .site cite { color: #093; font-style: normal; } #result .more { display: none; } #result .info { font-size: 80%; } #result .url-copy { color: #007bff; } #result .url-copied { color: #2c974b; } #result .favorited { display: none; } #result .favorited i { color: #fab005; } #result .thumbnail { width: 100px;
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Jun 02 11:39:35 UTC 2022 - 2K bytes - Viewed (0) -
docs_src/extra_data_types/tutorial001.py
@app.put("/items/{item_id}") async def read_items( item_id: UUID, start_datetime: datetime = Body(), end_datetime: datetime = Body(), process_after: timedelta = Body(), repeat_at: Union[time, None] = Body(default=None), ): start_process = start_datetime + process_after duration = end_datetime - start_process return { "item_id": item_id, "start_datetime": start_datetime,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Apr 19 00:11:40 UTC 2024 - 755 bytes - Viewed (0) -
tests/test_tutorial/test_bigger_applications/test_main.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 24.6K bytes - Viewed (0) -
docs_src/dependencies/tutorial004.py
from fastapi import Depends, FastAPI app = FastAPI() fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}] class CommonQueryParams: def __init__(self, q: Union[str, None] = None, skip: int = 0, limit: int = 100): self.q = q self.skip = skip self.limit = limit @app.get("/items/") async def read_items(commons: CommonQueryParams = Depends()): response = {}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 639 bytes - Viewed (0) -
docs_src/extra_data_types/tutorial001_an.py
async def read_items( item_id: UUID, start_datetime: Annotated[datetime, Body()], end_datetime: Annotated[datetime, Body()], process_after: Annotated[timedelta, Body()], repeat_at: Annotated[Union[time, None], Body()] = None, ): start_process = start_datetime + process_after duration = end_datetime - start_process return { "item_id": item_id, "start_datetime": start_datetime,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Apr 19 00:11:40 UTC 2024 - 830 bytes - Viewed (0) -
tests/test_security_oauth2_optional_description.py
if oauth_header is None: return None user = User(username=oauth_header) return user @app.post("/login") def login(form_data: OAuth2PasswordRequestFormStrict = Depends()): return form_data @app.get("/users/me") def read_users_me(current_user: Optional[User] = Depends(get_current_user)): if current_user is None: return {"msg": "Create an account first"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 10.9K bytes - Viewed (0)