- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for Lyding (0.14 sec)
-
docs_src/response_model/tutorial002.py
from typing import Union from fastapi import FastAPI from pydantic import BaseModel, EmailStr app = FastAPI() class UserIn(BaseModel): username: str password: str email: EmailStr full_name: Union[str, None] = None # Don't do this in production! @app.post("/user/") async def create_user(user: UserIn) -> UserIn:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Jan 07 13:45:48 GMT 2023 - 350 bytes - Viewed (0) -
docs_src/header_params/tutorial002.py
from typing import Union from fastapi import FastAPI, Header app = FastAPI() @app.get("/items/") async def read_items( strange_header: Union[str, None] = Header(default=None, convert_underscores=False), ):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 260 bytes - Viewed (0) -
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",
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Aug 25 19:10:22 GMT 2023 - 524 bytes - Viewed (0) -
docs_src/schema_extra_example/tutorial002.py
from typing import Union from fastapi import FastAPI from pydantic import BaseModel, Field app = FastAPI() class Item(BaseModel): name: str = Field(examples=["Foo"]) description: Union[str, None] = Field(default=None, examples=["A very nice Item"]) price: float = Field(examples=[35.4]) tax: Union[float, None] = Field(default=None, examples=[3.2]) @app.put("/items/{item_id}")
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 517 bytes - Viewed (0) -
docs_src/websockets/tutorial002.py
from typing import Union from fastapi import ( Cookie, Depends, FastAPI, Query, WebSocket, WebSocketException, status, ) from fastapi.responses import HTMLResponse app = FastAPI() html = """ <!DOCTYPE html> <html> <head> <title>Chat</title> </head> <body> <h1>WebSocket Chat</h1> <form action="" onsubmit="sendMessage(event)">
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun Nov 13 16:10:54 GMT 2022 - 2.8K bytes - Viewed (0)