Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 319 for ngquery (2.54 sec)

  1. docs_src/query_params_str_validations/tutorial012_an.py

    from typing import List
    
    from fastapi import FastAPI, Query
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: Annotated[List[str], Query()] = ["foo", "bar"]):
        query_items = {"q": q}
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 262 bytes
    - Viewed (0)
  2. docs/em/docs/tutorial/path-params-numeric-validations.md

    ```
    
    ## ๐ŸŒƒ
    
    โฎ๏ธ `Query`, `Path` (& ๐ŸŽ ๐Ÿ‘† ๐Ÿšซ ๐Ÿ‘€) ๐Ÿ‘† ๐Ÿ’ช ๐Ÿ“ฃ ๐Ÿ—ƒ & ๐ŸŽป ๐Ÿ”ฌ ๐ŸŽ ๐ŸŒŒ โฎ๏ธ [๐Ÿ”ข ๐Ÿ”ข & ๐ŸŽป ๐Ÿ”ฌ](query-params-str-validations.md){.internal-link target=_blank}.
    
    & ๐Ÿ‘† ๐Ÿ’ช ๐Ÿ“ฃ ๐Ÿ”ข ๐Ÿ”ฌ:
    
    * `gt`: `g`๐Ÿ…พ `t`๐Ÿ‘ฒ
    * `ge`: `g`๐Ÿ…พ ๐ŸŒ˜ โš–๏ธ `e`๐Ÿ…พ
    * `lt`: `l`๐Ÿ‘ญ `t`๐Ÿ‘ฒ
    * `le`: `l`๐Ÿ‘ญ ๐ŸŒ˜ โš–๏ธ `e`๐Ÿ…พ
    
    !!! info
        `Query`, `Path`, & ๐ŸŽ ๐ŸŽ“ ๐Ÿ‘† ๐Ÿ”œ ๐Ÿ‘€ โช ๐Ÿฟ โš  `Param` ๐ŸŽ“.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 4.4K bytes
    - Viewed (0)
  3. docs/es/docs/tutorial/cookie-params.md

        `Cookie` es una clase "hermana" de `Path` y `Query`. Tambiรฉn hereda de la misma clase comรบn `Param`.
    
        Pero recuerda que cuando importas `Query`, `Path`, `Cookie`  y otros de `fastapi`, en realidad son funciones que devuelven clases especiales.
    
    !!! info
        Para declarar cookies, necesitas usar `Cookie`, porque de lo contrario los parรกmetros serรญan interpretados como parรกmetros de query.
    
    ## Resumen
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Apr 19 19:30:26 GMT 2024
    - 2.4K bytes
    - Viewed (0)
  4. docs_src/sql_databases/sql_app_py39/crud.py

    from . import models, schemas
    
    
    def get_user(db: Session, user_id: int):
        return db.query(models.User).filter(models.User.id == user_id).first()
    
    
    def get_user_by_email(db: Session, email: str):
        return db.query(models.User).filter(models.User.email == email).first()
    
    
    def get_users(db: Session, skip: int = 0, limit: int = 100):
        return db.query(models.User).offset(skip).limit(limit).all()
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 1K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/body-fields.md

        ```Python hl_lines="11-14"
        {!> ../../../docs_src/body_fields/tutorial001.py!}
        ```
    
    `Field` works the same way as `Query`, `Path` and `Body`, it has all the same parameters, etc.
    
    !!! note "Technical Details"
        Actually, `Query`, `Path` and others you'll see next create objects of subclasses of a common `Param` class, which is itself a subclass of Pydantic's `FieldInfo` class.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 3.6K bytes
    - Viewed (0)
  6. docs/zh/docs/tutorial/body-fields.md

        {!> ../../../docs_src/body_fields/tutorial001.py!}
        ```
    
    `Field` ็š„ๅทฅไฝœๆ–นๅผๅ’Œ `Query`ใ€`Path`ใ€`Body` ็›ธๅŒ๏ผŒๅ‚ๆ•ฐไนŸ็›ธๅŒใ€‚
    
    !!! note "ๆŠ€ๆœฏ็ป†่Š‚"
    
        ๅฎž้™…ไธŠ๏ผŒ`Query`ใ€`Path` ้ƒฝๆ˜ฏ `Params` ็š„ๅญ็ฑป๏ผŒ่€Œ `Params` ็ฑปๅˆๆ˜ฏ Pydantic ไธญ `FieldInfo` ็š„ๅญ็ฑปใ€‚
    
        Pydantic ็š„ `Field` ่ฟ”ๅ›žไนŸๆ˜ฏ `FieldInfo` ็š„็ฑปๅฎžไพ‹ใ€‚
    
        `Body` ็›ดๆŽฅ่ฟ”ๅ›ž็š„ไนŸๆ˜ฏ `FieldInfo` ็š„ๅญ็ฑป็š„ๅฏน่ฑกใ€‚ๅŽๆ–‡่ฟ˜ไผšไป‹็ปไธ€ไบ› `Body` ็š„ๅญ็ฑปใ€‚
    
        ๆณจๆ„๏ผŒไปŽ `fastapi` ๅฏผๅ…ฅ็š„ `Query`ใ€`Path` ็ญ‰ๅฏน่ฑกๅฎž้™…ไธŠ้ƒฝๆ˜ฏ่ฟ”ๅ›ž็‰นๆฎŠ็ฑป็š„ๅ‡ฝๆ•ฐใ€‚
    
    !!! tip "ๆ็คบ"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 01 05:35:27 GMT 2024
    - 3K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_dependencies/test_tutorial001_an.py

                                    {"title": "Q", "type": "string"}
                                ),
                                "name": "q",
                                "in": "query",
                            },
                            {
                                "required": False,
                                "schema": {
                                    "title": "Skip",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 7.1K bytes
    - Viewed (0)
  8. docs_src/query_params_str_validations/tutorial009_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")] = None):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 314 bytes
    - Viewed (0)
  9. docs_src/query_params_str_validations/tutorial009.py

    from typing import Union
    
    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: Union[str, None] = Query(default=None, alias="item-query")):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 313 bytes
    - Viewed (0)
  10. docs_src/graphql/tutorial001.py

    from strawberry.asgi import GraphQL
    
    
    @strawberry.type
    class User:
        name: str
        age: int
    
    
    @strawberry.type
    class Query:
        @strawberry.field
        def user(self) -> User:
            return User(name="Patrick", age=100)
    
    
    schema = strawberry.Schema(query=Query)
    
    
    graphql_app = GraphQL(schema)
    
    app = FastAPI()
    app.add_route("/graphql", graphql_app)
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Oct 03 18:00:28 GMT 2021
    - 446 bytes
    - Viewed (0)
Back to top