Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for Portal (0.04 sec)

  1. tests/test_tutorial/test_dependencies/test_tutorial012.py

                "X-Token": "fake-super-secret-token",
                "X-Key": "fake-super-secret-key",
            },
        )
        assert response.status_code == 200, response.text
        assert response.json() == [{"item": "Portal Gun"}, {"item": "Plumbus"}]
    
    
    def test_get_valid_headers_users(client: TestClient):
        response = client.get(
            "/users/",
            headers={
                "X-Token": "fake-super-secret-token",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 7.7K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_bigger_applications/test_main.py

            "/items?token=jessica", headers={"X-Token": "fake-super-secret-token"}
        )
        assert response.status_code == 200
        assert response.json() == {
            "plumbus": {"name": "Plumbus"},
            "gun": {"name": "Portal Gun"},
        }
    
    
    def test_items_with_no_token_jessica(client: TestClient):
        response = client.get("/items", headers={"X-Token": "fake-super-secret-token"})
        assert response.status_code == 422
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 21.3K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_schema_extra_example/test_tutorial005.py

                                    "schema": {"$ref": "#/components/schemas/Item"},
                                    "examples": {
                                        "normal": {
                                            "summary": "A normal example",
                                            "description": "A **normal** item works correctly.",
                                            "value": {
                                                "name": "Foo",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 6.1K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_openapi_callbacks/test_tutorial001.py

                                "anyOf": [{"type": "string"}, {"type": "null"}],
                            },
                            "customer": {"title": "Customer", "type": "string"},
                            "total": {"title": "Total", "type": "number"},
                        },
                    },
                    "InvoiceEvent": {
                        "title": "InvoiceEvent",
                        "required": ["description", "paid"],
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 8.6K bytes
    - Viewed (0)
  5. tests/test_jsonable_encoder.py

        def __iter__(self):
            raise NotImplementedError()
    
        @property
        def __dict__(self):
            raise NotImplementedError()
    
    
    class RoleEnum(Enum):
        admin = "admin"
        normal = "normal"
    
    
    class ModelWithConfig(BaseModel):
        role: Optional[RoleEnum] = None
    
        model_config = {"use_enum_values": True}
    
    
    class ModelWithAlias(BaseModel):
        foo: str = Field(alias="Foo")
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 9.2K bytes
    - Viewed (0)
  6. docs/en/docs/release-notes.md

        * This allows adding extra code after a dependency is done. It can be used, for example, to close database connections.
        * Dependencies with `yield` can be normal or `async`, **FastAPI** will run normal dependencies in a threadpool.
        * They can be combined with normal dependencies.
        * It's possible to have arbitrary trees/levels of dependencies with `yield` and exit steps are handled in the correct order automatically.
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 19:06:15 UTC 2025
    - 586.7K bytes
    - Viewed (0)
  7. fastapi/exceptions.py

    from starlette.exceptions import HTTPException as StarletteHTTPException
    from starlette.exceptions import WebSocketException as StarletteWebSocketException
    
    
    class EndpointContext(TypedDict, total=False):
        function: str
        path: str
        file: str
        line: int
    
    
    class HTTPException(StarletteHTTPException):
        """
        An HTTP exception you can raise in your own code to show errors to the client.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 6.8K bytes
    - Viewed (0)
Back to top