Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 83 for filters (0.17 sec)

  1. docs/en/docs/how-to/async-sql-encode-databases.md

    ### Notice the `response_model=List[Note]`
    
    It uses `typing.List`.
    
    That documents (and validates, serializes, filters) the output data, as a `list` of `Note`s.
    
    ## Create notes
    
    Create the *path operation function* to create notes:
    
    ```Python hl_lines="61-65"
    {!../../../docs_src/async_sql_databases/tutorial001.py!}
    ```
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  2. tests/test_response_model_data_filter_no_inheritance.py

        return [pet1, pet2]
    
    
    client = TestClient(app)
    
    
    def test_filter_top_level_model():
        response = client.post(
            "/users", json={"email": "******@****.***", "password": "secret"}
        )
        assert response.json() == {"email": "******@****.***"}
    
    
    def test_filter_second_level_model():
        response = client.get("/pets/1")
        assert response.json() == {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 1.7K bytes
    - Viewed (0)
  3. docs/ko/docs/tutorial/static-files.md

    * 특정 경로에 `StaticFiles()` 인스턴스를 "마운트" 합니다.
    
    ```Python hl_lines="2  6"
    {!../../../docs_src/static_files/tutorial001.py!}
    ```
    
    !!! note "기술적 세부사항"
        `from starlette.staticfiles import StaticFiles` 를 사용할 수도 있습니다.
    
        **FastAPI**는 단지 개발자인, 당신에게 편의를 제공하기 위해 `fastapi.static files` 와 동일한 `starlett.static files`를 제공합니다. 하지만 사실 이것은 Starlett에서 직접 온 것입니다.
    
    ### "마운팅" 이란
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Jan 22 19:42:37 GMT 2024
    - 2K bytes
    - Viewed (0)
  4. docs/ru/docs/tutorial/request-files.md

        {!> ../../../docs_src/request_files/tutorial001.py!}
        ```
    
    ## Определите параметры `File`
    
    Создайте параметры `File` так же, как вы это делаете для `Body` или `Form`:
    
    === "Python 3.9+"
    
        ```Python hl_lines="9"
        {!> ../../../docs_src/request_files/tutorial001_an_py39.py!}
        ```
    
    === "Python 3.6+"
    
        ```Python hl_lines="8"
        {!> ../../../docs_src/request_files/tutorial001_an.py!}
        ```
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  5. docs/zh/docs/tutorial/request-files.md

        {!> ../../../docs_src/request_files/tutorial001_02_py310.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="9  17"
        {!> ../../../docs_src/request_files/tutorial001_02.py!}
        ```
    
    ## 带有额外元数据的 `UploadFile`
    
    您也可以将 `File()` 与 `UploadFile` 一起使用,例如,设置额外的元数据:
    
    ```Python hl_lines="13"
    {!../../../docs_src/request_files/tutorial001_03.py!}
    ```
    
    ## 多文件上传
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  6. docs/de/docs/tutorial/response-model.md

    Im vorherigen Beispiel mussten wir den `response_model`-Parameter verwenden, weil die Klassen unterschiedlich waren. Das bedeutet aber auch, wir bekommen keine Unterstützung vom Editor und anderen Tools, die den Funktions-Rückgabewert überprüfen.
    
    Aber in den meisten Fällen, wenn wir so etwas machen, wollen wir nur, dass das Modell einige der Daten **filtert/entfernt**, so wie in diesem Beispiel.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 20:26:58 GMT 2024
    - 19.9K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/request-forms-and-files.md

        {!> ../../../docs_src/request_forms_and_files/tutorial001.py!}
        ```
    
    The files and form fields will be uploaded as form data and you will receive the files and form fields.
    
    And you can declare some of the files as `bytes` and some as `UploadFile`.
    
    !!! warning
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 2K bytes
    - Viewed (0)
  8. docs_src/sql_databases/sql_app_py310/crud.py

    from sqlalchemy.orm import Session
    
    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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 1K bytes
    - Viewed (0)
  9. docs/en/docs/how-to/general.md

    # General - How To - Recipes
    
    Here are several pointers to other places in the docs, for general or frequent questions.
    
    ## Filter Data - Security
    
    To ensure that you don't return more data than you should, read the docs for [Tutorial - Response Model - Return Type](../tutorial/response-model.md){.internal-link target=_blank}.
    
    ## Documentation Tags - OpenAPI
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Aug 19 19:54:04 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_response_model/test_tutorial006.py

        assert response.json() == {"name": "Bar", "description": "The Bar fighters"}
    
    
    def test_read_item_public_data():
        response = client.get("/items/bar/public")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "name": "Bar",
            "description": "The Bar fighters",
            "price": 62,
        }
    
    
    def test_openapi_schema():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Aug 04 20:47:07 GMT 2023
    - 6K bytes
    - Viewed (0)
Back to top