Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 81 - 90 of 1,038 for Async (0.03 seconds)

  1. docs_src/security/tutorial004_an_py310.py

        if user is None:
            raise credentials_exception
        return user
    
    
    async def get_current_active_user(
        current_user: Annotated[User, Depends(get_current_user)],
    ):
        if current_user.disabled:
            raise HTTPException(status_code=400, detail="Inactive user")
        return current_user
    
    
    @app.post("/token")
    async def login_for_access_token(
        form_data: Annotated[OAuth2PasswordRequestForm, Depends()],
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 18:10:35 GMT 2026
    - 4.2K bytes
    - Click Count (0)
  2. docs_src/request_files/tutorial003_an_py310.py

    from fastapi.responses import HTMLResponse
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_files(
        files: Annotated[list[bytes], File(description="Multiple files as bytes")],
    ):
        return {"file_sizes": [len(file) for file in files]}
    
    
    @app.post("/uploadfiles/")
    async def create_upload_files(
        files: Annotated[
            list[UploadFile], File(description="Multiple files as UploadFile")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 952 bytes
    - Click Count (0)
  3. .teamcity/src/main/kotlin/util/AdHocPerformanceScenario.kt

            allowEmpty = false,
            description =
                "Command line option for the performance test task to enable profiling. " +
                    "For example `async-profiler`, `async-profiler-heap`, `async-profiler-wall`, `async-profiler-all` or `jfr`. Use `none` for benchmarking only.",
        )
    }
    
    object AdHocPerformanceScenarioLinux : AdHocPerformanceScenario(Os.LINUX)
    
    Created: Wed Apr 01 11:36:16 GMT 2026
    - Last Modified: Mon Mar 30 14:08:32 GMT 2026
    - 6K bytes
    - Click Count (0)
  4. docs/en/docs/tutorial/dependencies/index.md

    ## To `async` or not to `async` { #to-async-or-not-to-async }
    
    As dependencies will also be called by **FastAPI** (the same as your *path operation functions*), the same rules apply while defining your functions.
    
    You can use `async def` or normal `def`.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 9.5K bytes
    - Click Count (0)
  5. src/test/java/jcifs/internal/smb2/Smb2CancelRequestTest.java

            assertEquals(asyncId, request.getAsyncId());
            assertTrue((request.getFlags() & SMB2_FLAGS_ASYNC_COMMAND) != 0, "Async flag should be set when asyncId is non-zero");
        }
    
        @Test
        @DisplayName("Test constructor with zero asyncId does not set async flag")
        void testConstructorWithZeroAsyncId() {
            // Given
            long mid = 12345L;
            long asyncId = 0L;
    
            // When
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 9.8K bytes
    - Click Count (0)
  6. src/test/java/jcifs/internal/smb2/ServerMessageBlock2ResponseTest.java

                    throw new RuntimeException(e);
                }
            }
    
            @Override
            public boolean isAsync() {
                return async;
            }
    
            public void setAsync(boolean async) {
                this.async = async;
            }
    
            @Override
            public boolean isRetainPayload() {
                return retainPayload;
            }
    
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 19.3K bytes
    - Click Count (0)
  7. tests/test_response_model_data_filter_no_inheritance.py

        name: str
        owner: UserDB
    
    
    class PetOut(BaseModel):
        name: str
        owner: User
    
    
    @app.post("/users/", response_model=User)
    async def create_user(user: UserCreate):
        return user
    
    
    @app.get("/pets/{pet_id}", response_model=PetOut)
    async def read_pet(pet_id: int):
        user = UserDB(
            email="******@****.***",
            hashed_password="secrethashed",
        )
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 1.7K bytes
    - Click Count (0)
  8. docs_src/custom_response/tutorial007_py310.py

    import anyio
    from fastapi import FastAPI
    from fastapi.responses import StreamingResponse
    
    app = FastAPI()
    
    
    async def fake_video_streamer():
        for i in range(10):
            yield b"some fake video bytes"
            await anyio.sleep(0)
    
    
    @app.get("/")
    async def main():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Feb 27 19:12:46 GMT 2026
    - 319 bytes
    - Click Count (0)
  9. docs_src/request_files/tutorial001_03_py310.py

    from fastapi import FastAPI, File, UploadFile
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_file(file: bytes = File(description="A file read as bytes")):
        return {"file_size": len(file)}
    
    
    @app.post("/uploadfile/")
    async def create_upload_file(
        file: UploadFile = File(description="A file read as UploadFile"),
    ):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 371 bytes
    - Click Count (0)
  10. docs_src/app_testing/tutorial003_py310.py

    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    items = {}
    
    
    @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:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 528 bytes
    - Click Count (0)
Back to Top