- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 68 for allowed (0.21 sec)
-
tests/test_jsonable_encoder.py
def test_encode_model_with_pure_path(): class ModelWithPath(BaseModel): path: PurePath if PYDANTIC_V2: model_config = {"arbitrary_types_allowed": True} else: class Config: arbitrary_types_allowed = True test_path = PurePath("/foo", "bar") obj = ModelWithPath(path=test_path) assert jsonable_encoder(obj) == {"path": str(test_path)}
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 21:56:59 GMT 2024 - 9K bytes - Viewed (0) -
fastapi/exception_handlers.py
from fastapi.encoders import jsonable_encoder from fastapi.exceptions import RequestValidationError, WebSocketRequestValidationError from fastapi.utils import is_body_allowed_for_status_code from fastapi.websockets import WebSocket from starlette.exceptions import HTTPException from starlette.requests import Request from starlette.responses import JSONResponse, Response from starlette.status import HTTP_422_UNPROCESSABLE_ENTITY, WS_1008_POLICY_VIOLATION
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sun Jun 11 19:08:14 GMT 2023 - 1.3K bytes - Viewed (0) -
docs_src/advanced_middleware/tutorial002.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 279 bytes - Viewed (0) -
docs/de/docs/advanced/middleware.md
{!../../../docs_src/advanced_middleware/tutorial002.py!} ``` Die folgenden Argumente werden unterstรผtzt: * `allowed_hosts` โ Eine Liste von Domain-Namen, die als Hostnamen zulรคssig sein sollten. Wildcard-Domains wie `*.example.com` werden unterstรผtzt, um Subdomains zu matchen. Um jeden Hostnamen zu erlauben, verwenden Sie entweder `allowed_hosts=["*"]` oder lassen Sie diese Middleware weg.
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 30 20:18:15 GMT 2024 - 4.4K bytes - Viewed (0) -
docs/em/docs/advanced/middleware.md
๐ ๏ธ ๐ ๐ ๐จ ๐จ โ๏ธ โ โ `Host` ๐, โ ๐โโ ๐ก ๐บ๐ธ๐ ๐ฆ ๐ ๐. ```Python hl_lines="2 6-8" {!../../../docs_src/advanced_middleware/tutorial002.py!} ``` ๐ โ ๐โ๐ฆบ: * `allowed_hosts` - ๐ ๐ ๐ ๐ ๐ โ ๐. ๐ ๐ โ `*.example.com` ๐โ๐ฆบ ๐ ๐. โ ๐ ๐ ๐ฏโโ๏ธ โ๏ธ `allowed_hosts=["*"]` โ๏ธ ๐ซ ๐ ๏ธ. ๐ฅ ๐จ ๐จ ๐จ ๐ซ โ โ โคด๏ธ `400` ๐จ ๐ ๐จ. ## `GZipMiddleware` ๐ต ๐ ๐จ ๐ ๐จ ๐ ๐ `"gzip"` `Accept-Encoding` ๐.
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 3.3K bytes - Viewed (0) -
docs/en/docs/tutorial/cors.md
* `allow_headers` - A list of HTTP request headers that should be supported for cross-origin requests. Defaults to `[]`. You can use `['*']` to allow all headers. The `Accept`, `Accept-Language`, `Content-Language` and `Content-Type` headers are always allowed for <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#simple_requests" class="external-link" rel="noopener" target="_blank">simple CORS...
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sun Nov 13 20:28:37 GMT 2022 - 5.1K bytes - Viewed (0) -
fastapi/openapi/utils.py
from fastapi.params import Body, Param from fastapi.responses import Response from fastapi.types import ModelNameMap from fastapi.utils import ( deep_dict_update, generate_operation_id_for_path, is_body_allowed_for_status_code, ) from starlette.responses import JSONResponse from starlette.routing import BaseRoute from starlette.status import HTTP_422_UNPROCESSABLE_ENTITY from typing_extensions import Literal
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 21.8K bytes - Viewed (0) -
fastapi/encoders.py
if isinstance(obj, UndefinedType): return None if isinstance(obj, dict): encoded_dict = {} allowed_keys = set(obj.keys()) if include is not None: allowed_keys &= set(include) if exclude is not None: allowed_keys -= set(exclude) for key, value in obj.items(): if ( ( not sqlalchemy_safe
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 21:56:59 GMT 2024 - 10.8K bytes - Viewed (0) -
tests/test_inherited_custom_class.py
with pytest.raises(TypeError): vars(asyncpg_uuid) return {"fast_uuid": asyncpg_uuid} class SomeCustomClass(BaseModel): model_config = {"arbitrary_types_allowed": True} a_uuid: MyUuid @field_serializer("a_uuid") def serialize_a_uuid(self, v): return str(v) @app.get("/get_custom_class") def return_some_user():
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 3K bytes - Viewed (0) -
docs/zh/docs/advanced/middleware.md
## `TrustedHostMiddleware` ๅผบๅถๆๆไผ ๅ ฅ่ฏทๆฑ้ฝๅฟ ้กปๆญฃ็กฎ่ฎพ็ฝฎ `Host` ่ฏทๆฑๅคด๏ผไปฅ้ฒ HTTP ไธปๆบๅคดๆปๅปใ ```Python hl_lines="2 6-8" {!../../../docs_src/advanced_middleware/tutorial002.py!} ``` ๆฏๆไปฅไธๅๆฐ๏ผ * `allowed_hosts` - ๅ ่ฎธ็ๅๅ๏ผไธปๆบๅ๏ผๅ่กจใ`*.example.com` ็ญ้้ ็ฌฆๅๅๅฏไปฅๅน้ ๅญๅๅ๏ผๆไฝฟ็จ `allowed_hosts=["*"]` ๅ ่ฎธไปปๆไธปๆบๅ๏ผๆ็็ฅไธญ้ดไปถใ ๅฆๆไผ ๅ ฅ็่ฏทๆฑๆฒกๆ้่ฟ้ช่ฏ๏ผๅๅ้ `400` ๅๅบใ ## `GZipMiddleware` ๅค็ `Accept-Encoding` ่ฏทๆฑๅคดไธญๅ ๅซ `gzip` ่ฏทๆฑ็ GZip ๅๅบใ ไธญ้ดไปถไผๅค็ๆ ๅๅๅบไธๆตๅๅบใ ```Python hl_lines="2 6"
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 30 22:44:27 GMT 2024 - 3.6K bytes - Viewed (0)