- Sort Score
- Result 10 results
- Languages All
Results 131 - 140 of 969 for resync (0.27 sec)
-
docs_src/dependencies/tutorial012_an_py39.py
from fastapi import Depends, FastAPI, Header, HTTPException from typing_extensions import Annotated async def verify_token(x_token: Annotated[str, Header()]): if x_token != "fake-super-secret-token": raise HTTPException(status_code=400, detail="X-Token header invalid") async def verify_key(x_key: Annotated[str, Header()]): if x_key != "fake-super-secret-key": raise HTTPException(status_code=400, detail="X-Key header invalid")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 756 bytes - Viewed (0) -
docs_src/custom_response/tutorial007.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 277 bytes - Viewed (0) -
docs/pt/docs/advanced/dataclasses.md
8. Note que esta *função de operação de rota* usa `def` regular em vez de `async def`. Como sempre, no FastAPI você pode combinar `def` e `async def` conforme necessário. Se você precisar de uma atualização sobre quando usar qual, confira a seção _"Com pressa?"_ na documentação sobre [`async` e `await`](../async.md#in-a-hurry){.internal-link target=_blank}.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 22 17:33:53 UTC 2024 - 4.4K bytes - Viewed (0) -
docs_src/custom_docs_ui/tutorial002.py
swagger_css_url="/static/swagger-ui.css", ) @app.get(app.swagger_ui_oauth2_redirect_url, include_in_schema=False) async def swagger_ui_redirect(): return get_swagger_ui_oauth2_redirect_html() @app.get("/redoc", include_in_schema=False) async def redoc_html(): return get_redoc_html( openapi_url=app.openapi_url, title=app.title + " - ReDoc",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 19 19:54:04 UTC 2023 - 1.1K bytes - Viewed (0) -
docs/en/docs/js/custom.js
const div = document.querySelector('.github-topic-projects') async function getDataBatch(page) { const response = await fetch(`https://api.github.com/search/repositories?q=topic:fastapi&per_page=100&page=${page}`, { headers: { Accept: 'application/vnd.github.mercy-preview+json' } }) const data = await response.json() return data } async function getData() { let page = 1 let data = [] let dataBatch = await getDataBatch(page)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 6.6K bytes - Viewed (0) -
docs/em/docs/tutorial/request-files.md
* `close()`: 🔐 📁. 🌐 👫 👩🔬 `async` 👩🔬, 👆 💪 "⌛" 👫. 🖼, 🔘 `async` *➡ 🛠️ 🔢* 👆 💪 🤚 🎚 ⏮️: ```Python contents = await myfile.read() ``` 🚥 👆 🔘 😐 `def` *➡ 🛠️ 🔢*, 👆 💪 🔐 `UploadFile.file` 🔗, 🖼: ```Python contents = myfile.file.read() ``` /// note | "`async` 📡 ℹ" 🕐❔ 👆 ⚙️ `async` 👩🔬, **FastAPI** 🏃 📁 👩🔬 🧵 & ⌛ 👫. ///
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 6.6K bytes - Viewed (0) -
docs_src/request_files/tutorial001_03_an_py39.py
from typing import Annotated from fastapi import FastAPI, File, UploadFile app = FastAPI() @app.post("/files/") async def create_file(file: Annotated[bytes, File(description="A file read as bytes")]): return {"file_size": len(file)} @app.post("/uploadfile/") async def create_upload_file( file: Annotated[UploadFile, File(description="A file read as UploadFile")], ):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 421 bytes - Viewed (0) -
tests/test_dependency_overrides.py
router = APIRouter() async def common_parameters(q: str, skip: int = 0, limit: int = 100): return {"q": q, "skip": skip, "limit": limit} @app.get("/main-depends/") async def main_depends(commons: dict = Depends(common_parameters)): return {"in": "main-depends", "params": commons} @app.get("/decorator-depends/", dependencies=[Depends(common_parameters)]) async def decorator_depends():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 15.4K bytes - Viewed (0) -
docs_src/response_model/tutorial001_01_py310.py
class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None tags: list[str] = [] @app.post("/items/") async def create_item(item: Item) -> Item: return item @app.get("/items/") async def read_items() -> list[Item]: return [ Item(name="Portal Gun", price=42.0), Item(name="Plumbus", price=32.0),
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Jan 07 13:45:48 UTC 2023 - 469 bytes - Viewed (0) -
docs_src/path_params/tutorial003b.py
from fastapi import FastAPI app = FastAPI() @app.get("/users") async def read_users(): return ["Rick", "Morty"] @app.get("/users") async def read_users2():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu May 12 16:16:16 UTC 2022 - 193 bytes - Viewed (0)