- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for set1 (0.02 sec)
-
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) -
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) -
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) -
fastapi/param_functions.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 63K bytes - Viewed (0) -
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) -
.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) -
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) -
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) -
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) -
fastapi/_compat/shared.py
PYDANTIC_VERSION_MINOR_TUPLE = tuple(int(x) for x in PYDANTIC_VERSION.split(".")[:2]) PYDANTIC_V2 = PYDANTIC_VERSION_MINOR_TUPLE[0] == 2 sequence_annotation_to_type = { Sequence: list, list: list, tuple: tuple, set: set, frozenset: frozenset, deque: deque, } sequence_types = tuple(sequence_annotation_to_type.keys()) Url: type[Any] # Copy of Pydantic v2, compatible with v1 def lenient_issubclass(
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 6.7K bytes - Viewed (0)