Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for Raw (0.2 sec)

  1. docs_src/extra_models/tutorial002.py

    
    class UserIn(UserBase):
        password: str
    
    
    class UserOut(UserBase):
        pass
    
    
    class UserInDB(UserBase):
        hashed_password: str
    
    
    def fake_password_hasher(raw_password: str):
        return "supersecret" + raw_password
    
    
    def fake_save_user(user_in: UserIn):
        hashed_password = fake_password_hasher(user_in.password)
        user_in_db = UserInDB(**user_in.dict(), hashed_password=hashed_password)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 824 bytes
    - Viewed (0)
  2. docs/de/docs/reference/responses.md

                - background
                - raw_headers
                - render
                - init_headers
                - headers
                - set_cookie
                - delete_cookie
    
    ::: fastapi.responses.ORJSONResponse
        options:
            members:
                - charset
                - status_code
                - media_type
                - body
                - background
                - raw_headers
                - render
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Feb 19 15:53:39 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  3. docs/pt/docs/advanced/templates.md

    ```jinja hl_lines="7"
    {!../../../docs_src/templates/templates/item.html!}
    ```
    
    ### Interpolação de Valores no Template
    
    No código HTML que contém:
    
    {% raw %}
    
    ```jinja
    Item ID: {{ id }}
    ```
    
    {% endraw %}
    
    ...aparecerá o `id` obtido do "context" `dict` que você passou:
    
    ```Python
    {"id": id}
    ```
    
    Por exemplo, dado um ID de valor `42`, aparecerá:
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 28 04:05:17 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  4. docs_src/path_operation_advanced_configuration/tutorial007.py

                "content": {"application/x-yaml": {"schema": Item.model_json_schema()}},
                "required": True,
            },
        },
    )
    async def create_item(request: Request):
        raw_body = await request.body()
        try:
            data = yaml.safe_load(raw_body)
        except yaml.YAMLError:
            raise HTTPException(status_code=422, detail="Invalid YAML")
        try:
            item = Item.model_validate(data)
        except ValidationError as e:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 822 bytes
    - Viewed (0)
  5. docs_src/extra_models/tutorial002_py310.py

    
    class UserIn(UserBase):
        password: str
    
    
    class UserOut(UserBase):
        pass
    
    
    class UserInDB(UserBase):
        hashed_password: str
    
    
    def fake_password_hasher(raw_password: str):
        return "supersecret" + raw_password
    
    
    def fake_save_user(user_in: UserIn):
        hashed_password = fake_password_hasher(user_in.password)
        user_in_db = UserInDB(**user_in.dict(), hashed_password=hashed_password)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 792 bytes
    - Viewed (0)
  6. docs/en/docs/advanced/templates.md

    ```jinja hl_lines="7"
    {!../../../docs_src/templates/templates/item.html!}
    ```
    
    ### Template Context Values
    
    In the HTML that contains:
    
    {% raw %}
    
    ```jinja
    Item ID: {{ id }}
    ```
    
    {% endraw %}
    
    ...it will show the `id` taken from the "context" `dict` you passed:
    
    ```Python
    {"id": id}
    ```
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 22:25:37 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  7. docs/en/docs/reference/request.md

    # `Request` class
    
    You can declare a parameter in a *path operation function* or dependency to be of type `Request` and then you can access the raw request object directly, without any validation, etc.
    
    You can import it directly from `fastapi`:
    
    ```python
    from fastapi import Request
    ```
    
    !!! tip
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 516 bytes
    - Viewed (0)
  8. .github/actions/notify-translations/app/main.py

            raise RuntimeError(
                f"No github event file available at: {settings.github_event_path}"
            )
        contents = settings.github_event_path.read_text()
        github_event = PartialGitHubEvent.parse_raw(contents)
    
        # Avoid race conditions with multiple labels
        sleep_time = random.random() * 10  # random number between 0 and 10 seconds
        logging.info(
            f"Sleeping for {sleep_time} seconds to avoid "
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Sep 27 23:01:46 GMT 2023
    - 12.4K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/path-params.md

    * Data validation
    * API annotation and automatic documentation
    
    And you only have to declare them once.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/first-steps.md

    #### Check the `openapi.json`
    
    If you are curious about how the raw OpenAPI schema looks like, FastAPI automatically generates a JSON (schema) with the descriptions of all your API.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 9.2K bytes
    - Viewed (0)
Back to top