Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for SET (0.01 sec)

  1. fastapi/encoders.py

                    if isinstance(obj, encoder_type):
                        return encoder_instance(obj)
        if include is not None and not isinstance(include, (set, dict)):
            include = set(include)
        if exclude is not None and not isinstance(exclude, (set, dict)):
            exclude = set(exclude)
        if isinstance(obj, BaseModel):
            obj_dict = obj.model_dump(
                mode="json",
                include=include,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 10.7K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_cookie_param_models/test_tutorial001.py

        client = TestClient(mod.app)
        return client
    
    
    def test_cookie_param_model(client: TestClient):
        with client as c:
            c.cookies.set("session_id", "123")
            c.cookies.set("fatebook_tracker", "456")
            c.cookies.set("googall_tracker", "789")
            response = c.get("/items/")
        assert response.status_code == 200
        assert response.json() == {
            "session_id": "123",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 6K bytes
    - Viewed (0)
  3. tests/test_request_params/test_cookie/test_required_str.py

                }
            ]
        }
    
    
    @pytest.mark.parametrize(
        "path",
        ["/required-str", "/model-required-str"],
    )
    def test_required_str(path: str):
        client = TestClient(app)
        client.cookies.set("p", "hello")
        response = client.get(path)
        assert response.status_code == 200
        assert response.json() == {"p": "hello"}
    
    
    # =====================================================================================
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 10.2K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_cookie_param_models/test_tutorial002.py

        client = TestClient(mod.app)
        return client
    
    
    def test_cookie_param_model(client: TestClient):
        with client as c:
            c.cookies.set("session_id", "123")
            c.cookies.set("fatebook_tracker", "456")
            c.cookies.set("googall_tracker", "789")
            response = c.get("/items/")
        assert response.status_code == 200
        assert response.json() == {
            "session_id": "123",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  5. fastapi/param_functions.py

                allowed by the alias or set of aliases defined.
                """
            ),
        ] = None,
        serialization_alias: Annotated[
            Union[str, None],
            Doc(
                """
                'Blacklist' validation step. The vanilla parameter field will be the
                single one of the alias' or set of aliases' fields and all the other
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 63K bytes
    - Viewed (0)
  6. tests/test_request_params/test_cookie/test_optional_str.py

        assert response.json() == {"p": None}
    
    
    @pytest.mark.parametrize(
        "path",
        ["/optional-str", "/model-optional-str"],
    )
    def test_optional_str(path: str):
        client = TestClient(app)
        client.cookies.set("p", "hello")
        response = client.get(path)
        assert response.status_code == 200
        assert response.json() == {"p": "hello"}
    
    
    # =====================================================================================
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 8.4K bytes
    - Viewed (0)
  7. .github/workflows/translate.yml

      langs:
        runs-on: ubuntu-latest
        outputs:
          langs: ${{ steps.show-langs.outputs.langs }}
          commands: ${{ steps.show-langs.outputs.commands }}
        steps:
          - uses: actions/checkout@v6
          - name: Set up Python
            uses: actions/setup-python@v6
            with:
              python-version: "3.11"
          - name: Setup uv
            uses: astral-sh/setup-uv@v7
            with:
              cache-dependency-glob: |
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:48:45 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  8. fastapi/routing.py

                    Configuration passed to Pydantic to define if the response data
                    should have all the fields, including the ones that were not set and
                    have their default values. This is different from
                    `response_model_exclude_defaults` in that if the fields are set,
                    they will be included in the response, even if the value is the same
                    as the default.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 174.6K bytes
    - Viewed (0)
  9. fastapi/utils.py

        }:
            return True
        current_status_code = int(status_code)
        return not (current_status_code < 200 or current_status_code in {204, 205, 304})
    
    
    def get_path_param_names(path: str) -> set[str]:
        return set(re.findall("{(.*?)}", path))
    
    
    _invalid_args_message = (
        "Invalid args for response field! Hint: "
        "check that {type_} is a valid Pydantic field type. "
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 5.1K bytes
    - Viewed (0)
  10. fastapi/_compat/v2.py

        flat_validation_models = get_flat_models_from_fields(
            validation_fields, known_models=set()
        )
        flat_serialization_models = get_flat_models_from_fields(
            serialization_fields, known_models=set()
        )
        flat_validation_model_fields = [
            ModelField(
                field_info=FieldInfo(annotation=model),
                name=model.__name__,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 19.1K bytes
    - Viewed (0)
Back to top