Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 491 - 500 of 795 for asyncId (0.11 seconds)

  1. docs/tr/docs/index.md

    ```
    
    <details markdown="1">
    <summary>Ya da <code>async def</code> kullanalım...</summary>
    
    Eğer kodunuz `async` / `await` kullanıyorsa, `async def` kullanın:
    
    ```Python hl_lines="7  12"
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    async def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    async def read_item(item_id: int, q: str | None = None):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 07:53:17 GMT 2026
    - 23.2K bytes
    - Click Count (0)
  2. docs_src/query_params_str_validations/tutorial010_an_py310.py

    from typing import Annotated
    
    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(
        q: Annotated[
            str | None,
            Query(
                alias="item-query",
                title="Query string",
                description="Query string for the items to search in the database that have a good match",
                min_length=3,
                max_length=50,
                pattern="^fixedquery$",
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 622 bytes
    - Click Count (0)
  3. docs_src/dependencies/tutorial007_py310.py

    async def get_db():
        db = DBSession()
        try:
            yield db
        finally:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 99 bytes
    - Click Count (0)
  4. src/test/java/jcifs/internal/smb2/ServerMessageBlock2Test.java

                byte[] buffer = new byte[256];
                System.arraycopy(SMBUtil.SMB2_HEADER, 0, buffer, 0, 4);
                // Set up async message fields
                SMBUtil.writeInt4(ServerMessageBlock2.SMB2_FLAGS_ASYNC_COMMAND, buffer, 16); // flags with async
                SMBUtil.writeInt8(789L, buffer, 32); // async ID
                SMBUtil.writeInt8(456L, buffer, 40); // session ID
                return buffer;
            }
    
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 39.5K bytes
    - Click Count (0)
  5. docs/fr/docs/tutorial/background-tasks.md

    Elle peut être une fonction asynchrone (`async def`) ou une fonction normale (`def`), **FastAPI** saura la gérer correctement.
    
    Dans cet exemple, la fonction de tâche écrira dans un fichier (afin de simuler un envoi d'email).
    
    L'opération d'écriture n'utilisant ni `async` ni `await`, on définit la fonction avec un `def` normal.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 5.5K bytes
    - Click Count (0)
  6. docs_src/query_params_str_validations/tutorial015_an_py310.py

    }
    
    
    def check_valid_id(id: str):
        if not id.startswith(("isbn-", "imdb-")):
            raise ValueError('Invalid ID format, it must start with "isbn-" or "imdb-"')
        return id
    
    
    @app.get("/items/")
    async def read_items(
        id: Annotated[str | None, AfterValidator(check_valid_id)] = None,
    ):
        if id:
            item = data.get(id)
        else:
            id, item = random.choice(list(data.items()))
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Mar 01 22:02:35 GMT 2025
    - 768 bytes
    - Click Count (0)
  7. docs_src/dependencies/tutorial002_py310.py

    
    class CommonQueryParams:
        def __init__(self, q: 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: CommonQueryParams = Depends(CommonQueryParams)):
        response = {}
        if commons.q:
            response.update({"q": commons.q})
        items = fake_items_db[commons.skip : commons.skip + commons.limit]
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 624 bytes
    - Click Count (0)
  8. docs_src/dependencies/tutorial004_py310.py

    
    class CommonQueryParams:
        def __init__(self, q: 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: CommonQueryParams = Depends()):
        response = {}
        if commons.q:
            response.update({"q": commons.q})
        items = fake_items_db[commons.skip : commons.skip + commons.limit]
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 607 bytes
    - Click Count (0)
  9. docs_src/response_model/tutorial004_py310.py

        "baz": {"name": "Baz", "description": None, "price": 50.2, "tax": 10.5, "tags": []},
    }
    
    
    @app.get("/items/{item_id}", response_model=Item, response_model_exclude_unset=True)
    async def read_item(item_id: str):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 595 bytes
    - Click Count (0)
  10. docs_src/schema_extra_example/tutorial004_py310.py

    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: str | None = None
        price: float
        tax: float | None = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        *,
        item_id: int,
        item: Item = Body(
            examples=[
                {
                    "name": "Foo",
                    "description": "A very nice Item",
                    "price": 35.4,
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Jul 01 16:43:29 GMT 2023
    - 786 bytes
    - Click Count (0)
Back to Top