- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 117 for custom (0.18 sec)
-
docs/en/docs/advanced/custom-response.md
```Python hl_lines="2 10" {!../../../docs_src/custom_response/tutorial009.py!} ``` You can also use the `response_class` parameter: ```Python hl_lines="2 8 10" {!../../../docs_src/custom_response/tutorial009b.py!} ``` In this case, you can return the file path directly from your *path operation* function. ## Custom response class
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 11.7K bytes - Viewed (0) -
docs/em/docs/how-to/custom-request-and-route.md
```Python hl_lines="13 15" {!../../../docs_src/custom_request_and_route/tutorial002.py!} ``` 🚥 ⚠ 📉, `Request` 👐 🔜 ↔, 👥 💪 ✍ & ⚒ ⚙️ 📨 💪 🕐❔ 🚚 ❌: ```Python hl_lines="16-18" {!../../../docs_src/custom_request_and_route/tutorial002.py!} ``` ## 🛃 `APIRoute` 🎓 📻 👆 💪 ⚒ `route_class` 🔢 `APIRouter`: ```Python hl_lines="26" {!../../../docs_src/custom_request_and_route/tutorial003.py!} ```
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 3.6K bytes - Viewed (0) -
fastapi/encoders.py
[FastAPI docs for JSON Compatible Encoder](https://fastapi.tiangolo.com/tutorial/encoder/). """ custom_encoder = custom_encoder or {} if custom_encoder: if type(obj) in custom_encoder: return custom_encoder[type(obj)](obj) else: for encoder_type, encoder_instance in custom_encoder.items(): if isinstance(obj, encoder_type): return encoder_instance(obj)
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_jsonable_encoder.py
def test_custom_enum_encoders(): def custom_enum_encoder(v: Enum): return v.value.lower() class MyEnum(Enum): ENUM_VAL_1 = "ENUM_VAL_1" instance = MyEnum.ENUM_VAL_1 encoded_instance = jsonable_encoder( instance, custom_encoder={MyEnum: custom_enum_encoder} ) assert encoded_instance == custom_enum_encoder(instance)
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 21:56:59 GMT 2024 - 9K bytes - Viewed (0) -
analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/annotations/KtFirAnnotationListForType.kt
} } } } private fun ConeKotlinType.customAnnotationsWithLazyResolve(phase: FirResolvePhase): List<FirAnnotation> { val custom = attributes.custom ?: return emptyList() val annotations = custom.annotations.ifEmpty { return emptyList() } for (annotation in annotations) { val containerSymbol = (annotation as? FirAnnotationCall)?.containingDeclarationSymbol ?: continue
Plain Text - Registered: Fri Apr 26 08:18:10 GMT 2024 - Last Modified: Thu Apr 25 07:15:56 GMT 2024 - 4.7K bytes - Viewed (0) -
fastapi/routing.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 170.1K bytes - Viewed (0) -
docs/en/docs/reference/responses.md
# Custom Response Classes - File, HTML, Redirect, Streaming, etc. There are several custom response classes you can use to create an instance and return them directly from your *path operations*. Read more about it in the [FastAPI docs for Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/). You can import them directly from `fastapi.responses`: ```python from fastapi.responses import ( FileResponse,
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 3.7K bytes - Viewed (0) -
docs/metrics/prometheus/grafana/bucket/minio-bucket.json
"type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0,
Json - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Mon Apr 15 10:03:01 GMT 2024 - 102K bytes - Viewed (0) -
cmd/xl-storage-disk-id-check.go
return madmin.TraceInfo{ TraceType: madmin.TraceStorage, Time: startTime, NodeName: globalLocalNodeName, FuncName: "storage." + s.String(), Duration: duration, Path: path, Error: err, Custom: custom, } }
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Sun Apr 28 17:53:50 GMT 2024 - 33K bytes - Viewed (0) -
fastapi/applications.py
Doc( """ The default response class to be used. Read more in the [FastAPI docs for Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/#default-response-class). **Example** ```python from fastapi import FastAPI
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 172.2K bytes - Viewed (0)