Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for Receiver (0.04 sec)

  1. tests/benchmarks/test_general_performance.py

    ):
        return ItemOut(name=item.name, value=item.value, dep=dep)
    
    
    @app.post("/sync/large-receive")
    def sync_large_receive(payload: LargeIn):
        return {"received": len(payload.items)}
    
    
    @app.post("/async/large-receive")
    async def async_large_receive(payload: LargeIn):
        return {"received": len(payload.items)}
    
    
    @app.get("/sync/large-dict-no-response-model")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 20:40:26 UTC 2025
    - 11.1K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_generate_clients/test_tutorial002.py

        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Item received"}
    
    
    def test_post_users():
        response = client.post(
            "/users/", json={"username": "Foo", "email": "******@****.***"}
        )
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "User received"}
    
    
    def test_get_items():
        response = client.get("/items/")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  3. 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)
  4. tests/test_tutorial/test_generate_clients/test_tutorial001.py

    
    def test_post_items(client: TestClient):
        response = client.post("/items/", json={"name": "Foo", "price": 5})
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "item received"}
    
    
    def test_get_items(client: TestClient):
        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.json() == [
            {"name": "Plumbus", "price": 3},
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 5.2K bytes
    - Viewed (0)
  5. 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)
  6. 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_stack
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 174.6K bytes
    - Viewed (0)
  7. 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: GetJsonSchemaHandler
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 5.1K bytes
    - Viewed (0)
  8. docs/en/docs/index.md

    You will see the JSON response as:
    
    ```JSON
    {"item_id": 5, "q": "somequery"}
    ```
    
    You already created an API that:
    
    * Receives HTTP requests in the _paths_ `/` and `/items/{item_id}`.
    * Both _paths_ take `GET` operations (also known as HTTP _methods_).
    * The _path_ `/items/{item_id}` has a _path parameter_ `item_id` that should be an `int`.
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Thu Dec 25 11:01:37 UTC 2025
    - 23.5K bytes
    - Viewed (0)
  9. README.md

    You will see the JSON response as:
    
    ```JSON
    {"item_id": 5, "q": "somequery"}
    ```
    
    You already created an API that:
    
    * Receives HTTP requests in the _paths_ `/` and `/items/{item_id}`.
    * Both _paths_ take `GET` operations (also known as HTTP _methods_).
    * The _path_ `/items/{item_id}` has a _path parameter_ `item_id` that should be an `int`.
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Thu Dec 25 11:01:37 UTC 2025
    - 26.4K bytes
    - Viewed (0)
  10. 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)
Back to top