- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for pead (0.17 sec)
-
docs_src/extra_models/tutorial003.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 644 bytes - Viewed (1) -
docs_src/dependencies/tutorial003.py
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=Depends(CommonQueryParams)): response = {} if commons.q: response.update({"q": commons.q}) items = fake_items_db[commons.skip : commons.skip + commons.limit]
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 635 bytes - Viewed (0) -
docs_src/websockets/tutorial003.py
from typing import List from fastapi import FastAPI, WebSocket, WebSocketDisconnect from fastapi.responses import HTMLResponse app = FastAPI() html = """ <!DOCTYPE html> <html> <head> <title>Chat</title> </head> <body> <h1>WebSocket Chat</h1> <h2>Your ID: <span id="ws-id"></span></h2> <form action="" onsubmit="sendMessage(event)">
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sun Aug 09 13:52:19 GMT 2020 - 2.5K bytes - Viewed (0) -
docs_src/metadata/tutorial003.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 02 04:55:20 GMT 2020 - 161 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial003.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 329 bytes - Viewed (0) -
docs_src/app_testing/tutorial003.py
@app.on_event("startup") async def startup_event(): items["foo"] = {"name": "Fighters"} items["bar"] = {"name": "Tenders"} @app.get("/items/{item_id}") async def read_items(item_id: str): return items[item_id] def test_read_items(): with TestClient(app) as client: response = client.get("/items/foo") assert response.status_code == 200
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 528 bytes - Viewed (0) -
docs_src/query_params/tutorial003.py
from typing import Union from fastapi import FastAPI app = FastAPI() @app.get("/items/{item_id}") async def read_item(item_id: str, q: Union[str, None] = None, short: bool = False): item = {"item_id": item_id} if q: item.update({"q": q}) if not short: item.update( {"description": "This is an amazing item that has a long description"} )
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 406 bytes - Viewed (0) -
docs_src/security/tutorial003.py
raise HTTPException(status_code=400, detail="Incorrect username or password") return {"access_token": user.username, "token_type": "bearer"} @app.get("/users/me") async def read_users_me(current_user: User = Depends(get_current_active_user)):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 2.4K bytes - Viewed (0) -
docs_src/custom_response/tutorial003.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 394 bytes - Viewed (0) -
docs_src/header_params/tutorial003.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 224 bytes - Viewed (0)