Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 52 for Salinas (0.14 sec)

  1. docs/en/docs/tutorial/query-params-str-validations.md

        ```
    
    ## Alias parameters
    
    Imagine that you want the parameter to be `item-query`.
    
    Like in:
    
    ```
    http://127.0.0.1:8000/items/?item-query=foobaritems
    ```
    
    But `item-query` is not a valid Python variable name.
    
    The closest would be `item_query`.
    
    But you still need it to be exactly `item-query`...
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 25.7K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/dependencies/index.md

        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="15  19  24"
        {!> ../../../docs_src/dependencies/tutorial001_02_an.py!}
        ```
    
    !!! tip
        This is just standard Python, it's called a "type alias", it's actually not specific to **FastAPI**.
    
        But because **FastAPI** is based on the Python standards, including `Annotated`, you can use this trick in your code. 😎
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  3. docs/ko/docs/tutorial/dependencies/index.md

        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="15  19  24"
        {!> ../../../docs_src/dependencies/tutorial001_02_an.py!}
        ```
    
    !!! tip "팁"
        이는 그저 표준 파이썬이고 "type alias"라고 부르며 사실 **FastAPI**에 국한되는 것은 아닙니다.
    
        하지만, `Annotated`를 포함하여, **FastAPI**가 파이썬 표준을 기반으로 하고 있기에, 이를 여러분의 코드 트릭으로 사용할 수 있습니다. 😎
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  4. fastapi/openapi/models.py

        schema_: Optional[str] = Field(default=None, alias="$schema")
        vocabulary: Optional[str] = Field(default=None, alias="$vocabulary")
        id: Optional[str] = Field(default=None, alias="$id")
        anchor: Optional[str] = Field(default=None, alias="$anchor")
        dynamicAnchor: Optional[str] = Field(default=None, alias="$dynamicAnchor")
        ref: Optional[str] = Field(default=None, alias="$ref")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 22:49:33 GMT 2024
    - 15K bytes
    - Viewed (1)
  5. fastapi/applications.py

                    """
                ),
            ] = None,
            response_model_by_alias: Annotated[
                bool,
                Doc(
                    """
                    Configuration passed to Pydantic to define if the response model
                    should be serialized by alias when an alias is used.
    
                    Read more about it in the
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 172.2K bytes
    - Viewed (0)
  6. docs_src/path_params_numeric_validations/tutorial001_an_py310.py

    from fastapi import FastAPI, Path, Query
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_items(
        item_id: Annotated[int, Path(title="The ID of the item to get")],
        q: Annotated[str | None, Query(alias="item-query")] = None,
    ):
        results = {"item_id": item_id}
        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
    - 375 bytes
    - Viewed (0)
  7. 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$",
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 622 bytes
    - Viewed (0)
  8. tests/test_serialize_response_model.py

    from typing import Dict, List, Optional
    
    from fastapi import FastAPI
    from pydantic import BaseModel, Field
    from starlette.testclient import TestClient
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str = Field(alias="aliased_name")
        price: Optional[float] = None
        owner_ids: Optional[List[int]] = None
    
    
    @app.get("/items/valid", response_model=Item)
    def get_valid():
        return Item(aliased_name="valid", price=1.0)
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 4.2K bytes
    - Viewed (0)
  9. docs/ru/docs/tutorial/response-model.md

        То же самое применимо к параметру `response_model_by_alias`.
    
    === "Python 3.10+"
    
        ```Python hl_lines="29  35"
        {!> ../../../docs_src/response_model/tutorial005_py310.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="31  37"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 30.5K bytes
    - Viewed (0)
  10. fastapi/dependencies/utils.py

                use_annotation,
                field_info,
                param_name,
            )
            if not field_info.alias and getattr(field_info, "convert_underscores", None):
                alias = param_name.replace("_", "-")
            else:
                alias = field_info.alias or param_name
            field_info.alias = alias
            field = create_response_field(
                name=param_name,
                type_=use_annotation_from_field_info,
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:52:56 GMT 2024
    - 29.5K bytes
    - Viewed (0)
Back to top