- Sort Score
- Result 10 results
- Languages All
Results 231 - 240 of 969 for resync (0.1 sec)
-
docs_src/request_files/tutorial001_02_py310.py
from fastapi import FastAPI, File, UploadFile app = FastAPI() @app.post("/files/") async def create_file(file: bytes | None = File(default=None)): if not file: return {"message": "No file sent"} else: return {"file_size": len(file)} @app.post("/uploadfile/") async def create_upload_file(file: UploadFile | None = None): if not file: return {"message": "No upload file sent"} else:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 470 bytes - Viewed (0) -
docs_src/events/tutorial003.py
return x * 42 ml_models = {} @asynccontextmanager async def lifespan(app: FastAPI): # Load the ML model ml_models["answer_to_everything"] = fake_answer_to_everything_ml_model yield # Clean up the ML models and release the resources ml_models.clear() app = FastAPI(lifespan=lifespan) @app.get("/predict") async def predict(x: float): result = ml_models["answer_to_everything"](x)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Mar 07 15:46:00 UTC 2023 - 569 bytes - Viewed (0) -
docs_src/request_files/tutorial001_02_an.py
from typing_extensions import Annotated app = FastAPI() @app.post("/files/") async def create_file(file: Annotated[Union[bytes, None], File()] = None): if not file: return {"message": "No file sent"} else: return {"file_size": len(file)} @app.post("/uploadfile/") async def create_upload_file(file: Union[UploadFile, None] = None): if not file:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 553 bytes - Viewed (0) -
docs_src/request_files/tutorial001_02_an_py39.py
from fastapi import FastAPI, File, UploadFile app = FastAPI() @app.post("/files/") async def create_file(file: Annotated[Union[bytes, None], File()] = None): if not file: return {"message": "No file sent"} else: return {"file_size": len(file)} @app.post("/uploadfile/") async def create_upload_file(file: Union[UploadFile, None] = None): if not file:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 524 bytes - Viewed (0) -
src/main/java/jcifs/internal/smb2/ServerMessageBlock2.java
* the readSize to set */ public void setReadSize ( int readSize ) { this.readSize = readSize; } /** * @return the async */ public boolean isAsync () { return this.async; } /** * @param command * the command to set */ @Override public final void setCommand ( int command ) {
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Sun Sep 30 10:47:31 UTC 2018 - 19.9K bytes - Viewed (0) -
tensorflow/c/eager/c_api_cluster_test.cc
TFE_Execute(op, out_value, &num_retvals, status); ASSERT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status); TFE_DeleteOp(op); TF_DeleteStatus(status); } void TestRemoteExecuteChangeServerDef(bool async) { tensorflow::ServerDef server_def = GetServerDef(2); // This server def has the task index set to 0. string serialized = server_def.SerializeAsString(); server_def.set_task_index(1);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 19.2K bytes - Viewed (0) -
tests/test_custom_middleware_exception.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Aug 25 21:44:40 UTC 2022 - 2.8K bytes - Viewed (0) -
docs_src/metadata/tutorial004.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Jun 13 11:58:06 UTC 2020 - 693 bytes - Viewed (0) -
tests/test_additional_responses_response_class.py
@app.get( "/a", response_class=JsonApiResponse, responses={500: {"description": "Error", "model": JsonApiError}}, ) async def a(): pass # pragma: no cover @app.get("/b", responses={500: {"description": "Error", "model": Error}}) async def b(): pass # pragma: no cover client = TestClient(app) def test_openapi_schema(): response = client.get("/openapi.json")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 3.5K bytes - Viewed (0) -
docs_src/security/tutorial002_py310.py
def fake_decode_token(token): return User( username=token + "fakedecoded", email="******@****.***", full_name="John Doe" ) async def get_current_user(token: str = Depends(oauth2_scheme)): user = fake_decode_token(token) return user @app.get("/users/me") async def read_users_me(current_user: User = Depends(get_current_user)):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 711 bytes - Viewed (0)