Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 261 - 270 of 901 for item01 (0.04 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. tests/test_tutorial/test_header_params/test_tutorial003.py

        return client
    
    
    @pytest.mark.parametrize(
        "path,headers,expected_status,expected_response",
        [
            ("/items", None, 200, {"X-Token values": None}),
            ("/items", {"x-token": "foo"}, 200, {"X-Token values": ["foo"]}),
            (
                "/items",
                [("x-token", "foo"), ("x-token", "bar")],
                200,
                {"X-Token values": ["foo", "bar"]},
            ),
        ],
    )
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 18:19:10 GMT 2025
    - 4.1K bytes
    - Click Count (0)
  2. docs_src/app_testing/tutorial003_py39.py

    app = FastAPI()
    
    items = {}
    
    
    @app.on_event("startup")
    async def startup_event():
        items["foo"] = {"name": "Fighters"}
        items["bar"] = {"name": "Tenders"}
    
    
    @app.get("/items/{item_id}")
    async def read_items(item_id: str):
        return items[item_id]
    
    
    def test_read_items():
        with TestClient(app) as client:
            response = client.get("/items/foo")
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 528 bytes
    - Click Count (0)
  3. tests/query_test.go

    		Number2: 200,
    		Number3: 300.1,
    		Now:     &now,
    		Item1: &QueryResetItem{
    			ID:   "u_1_1",
    			Name: "item_1_1",
    		},
    		Item2: &QueryResetItem{
    			ID:   "u_1_2",
    			Name: "item_1_2",
    		},
    	}
    
    	q2 := QueryResetNullValue{
    		Item1: &QueryResetItem{
    			ID:   "u_2_1",
    			Name: "item_2_1",
    		},
    		Item2: &QueryResetItem{
    			ID:   "u_2_2",
    			Name: "item_2_2",
    		},
    Created: Sun Dec 28 09:35:17 GMT 2025
    - Last Modified: Tue Jul 22 06:21:04 GMT 2025
    - 51K bytes
    - Click Count (0)
  4. tests/test_tutorial/test_query_param_models/test_tutorial002.py

        response = client.get("/items/")
        assert response.status_code == 200
        assert response.json() == {
            "limit": 100,
            "offset": 0,
            "order_by": "created_at",
            "tags": [],
        }
    
    
    def test_query_param_model_invalid(client: TestClient):
        response = client.get(
            "/items/",
            params={
                "limit": 150,
                "offset": -1,
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 18:19:10 GMT 2025
    - 8K bytes
    - Click Count (0)
  5. tests/test_tuples.py

                                "items": {"$ref": "#/components/schemas/ValidationError"},
                            }
                        },
                    },
                    "ItemGroup": {
                        "title": "ItemGroup",
                        "required": ["items"],
                        "type": "object",
                        "properties": {
                            "items": {
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 18:19:10 GMT 2025
    - 9.8K bytes
    - Click Count (0)
  6. tests/test_tutorial/test_header_params/test_tutorial001.py

        return client
    
    
    @pytest.mark.parametrize(
        "path,headers,expected_status,expected_response",
        [
            ("/items", None, 200, {"User-Agent": "testclient"}),
            ("/items", {"X-Header": "notvalid"}, 200, {"User-Agent": "testclient"}),
            ("/items", {"User-Agent": "FastAPI test"}, 200, {"User-Agent": "FastAPI test"}),
        ],
    )
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 18:19:10 GMT 2025
    - 3.9K bytes
    - Click Count (0)
  7. tests/test_tutorial/test_query_params_str_validations/test_tutorial011.py

        return client
    
    
    def test_multi_query_values(client: TestClient):
        url = "/items/?q=foo&q=bar"
        response = client.get(url)
        assert response.status_code == 200, response.text
        assert response.json() == {"q": ["foo", "bar"]}
    
    
    def test_query_no_values(client: TestClient):
        url = "/items/"
        response = client.get(url)
        assert response.status_code == 200, response.text
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 18:19:10 GMT 2025
    - 3.9K bytes
    - Click Count (0)
  8. docs_src/body_updates/tutorial002_py39.py

    }
    
    
    @app.get("/items/{item_id}", response_model=Item)
    async def read_item(item_id: str):
        return items[item_id]
    
    
    @app.patch("/items/{item_id}", response_model=Item)
    async def update_item(item_id: str, item: Item):
        stored_item_data = items[item_id]
        stored_item_model = Item(**stored_item_data)
        update_data = item.model_dump(exclude_unset=True)
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 20 15:55:38 GMT 2025
    - 1K bytes
    - Click Count (0)
  9. tests/test_tutorial/test_body_nested_models/test_tutorial006.py

                                "type": "array",
                                "items": {"type": "string"},
                                "uniqueItems": True,
                            },
                            "images": {
                                "anyOf": [
                                    {
                                        "items": {
                                            "$ref": "#/components/schemas/Image",
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Dec 26 10:43:02 GMT 2025
    - 8.7K bytes
    - Click Count (0)
  10. docs/de/docs/tutorial/query-params.md

    Wenn Sie nun zu:
    
    ```
    http://127.0.0.1:8000/items/foo?short=1
    ```
    
    oder
    
    ```
    http://127.0.0.1:8000/items/foo?short=True
    ```
    
    oder
    
    ```
    http://127.0.0.1:8000/items/foo?short=true
    ```
    
    oder
    
    ```
    http://127.0.0.1:8000/items/foo?short=on
    ```
    
    oder
    
    ```
    http://127.0.0.1:8000/items/foo?short=yes
    ```
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 5K bytes
    - Click Count (0)
Back to Top