- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for Receiver (0.12 sec)
-
tests/test_sub_callbacks.py
external API with the notification of the invoice event (e.g. "payment successful"). """ # Send the invoice, collect the money, send the notification (the callback) return {"msg": "Invoice received"} app.include_router(subrouter, callbacks=events_callback_router.routes) client = TestClient(app) def test_get(): response = client.post(Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 12.9K bytes - Viewed (0) -
tests/test_tutorial/test_openapi_callbacks/test_tutorial001.py
response = client.post( "/invoices/", json={"id": "fooinvoice", "customer": "John", "total": 5.3} ) assert response.status_code == 200, response.text assert response.json() == {"msg": "Invoice received"} def test_dummy_callback(mod: ModuleType): # Just for coverage mod.invoice_notification({}) def test_openapi_schema(client: TestClient): response = client.get("/openapi.json")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 8.6K bytes - Viewed (0) -
fastapi/routing.py
""" # assert asyncio.iscoroutinefunction(func), "WebSocket endpoints must be async" async def app(scope: Scope, receive: Receive, send: Send) -> None: session = WebSocket(scope, receive=receive, send=send) async def app(scope: Scope, receive: Receive, send: Send) -> None: async with AsyncExitStack() as request_stack: scope["fastapi_inner_astack"] = request_stackRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 174.6K bytes - Viewed (0) -
fastapi/datastructures.py
@classmethod def _validate(cls, __input_value: Any, _: Any) -> "UploadFile": if not isinstance(__input_value, StarletteUploadFile): raise ValueError(f"Expected UploadFile, received: {type(__input_value)}") return cast(UploadFile, __input_value) @classmethod def __get_pydantic_json_schema__( cls, core_schema: Mapping[str, Any], handler: GetJsonSchemaHandlerRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 5.1K bytes - Viewed (0) -
fastapi/dependencies/utils.py
value: Optional[Any] = None if body_to_process is not None: try: value = body_to_process.get(get_validation_alias(field)) # If the received body is a list, not a dict except AttributeError: errors.append(get_missing_field_error(loc)) continue v_, errors_ = _validate_value_with_model_field(
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 37.6K bytes - Viewed (3) -
docs/en/docs/release-notes.md
If you depended on exceptions not being received by dependencies with `yield`, and receiving an exception breaks the code after `yield`, you can use a block with `try` and `finally`: ```Python async def do_something(): try: yield something
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 19:06:15 UTC 2025 - 586.7K bytes - Viewed (0)