Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 644 for Items (0.05 sec)

  1. docs/em/docs/tutorial/bigger-applications.md

    ///
    
    ## ➕1️⃣ 🕹 ⏮️ `APIRouter`
    
    ➡️ 💬 👆 ✔️ 🔗 💡 🚚 "🏬" ⚪️➡️ 👆 🈸 🕹 `app/routers/items.py`.
    
    👆 ✔️ *➡ 🛠️* :
    
    * `/items/`
    * `/items/{item_id}`
    
    ⚫️ 🌐 🎏 📊 ⏮️ `app/routers/users.py`.
    
    ✋️ 👥 💚 🙃 & 📉 📟 🍖.
    
    👥 💭 🌐 *➡ 🛠️* 👉 🕹 ✔️ 🎏:
    
    * ➡ `prefix`: `/items`.
    * `tags`: (1️⃣ 🔖: `items`).
    * ➕ `responses`.
    * `dependencies`: 👫 🌐 💪 👈 `X-Token` 🔗 👥 ✍.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  2. tests/test_openapi_separate_input_output_schemas.py

        app = FastAPI(separate_input_output_schemas=separate_input_output_schemas)
    
        @app.post("/items/", responses={402: {"model": Item}})
        def create_item(item: Item) -> Item:
            return item
    
        @app.post("/items-list/")
        def create_item_list(item: List[Item]):
            return item
    
        @app.get("/items/")
        def read_items() -> List[Item]:
            return [
                Item(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Oct 12 09:44:57 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/bigger-applications.md

    * look for the subpackage `routers` (the directory at `app/routers/`)...
    * and from it, import the submodule `items` (the file at `app/routers/items.py`) and `users` (the file at `app/routers/users.py`)...
    
    The module `items` will have a variable `router` (`items.router`). This is the same one we created in the file `app/routers/items.py`, it's an `APIRouter` object.
    
    And then we do the same for the module `users`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 18.4K bytes
    - Viewed (0)
  4. tests/test_generate_unique_id_function.py

                                        "schema": {
                                            "title": "Response Foo Post Root",
                                            "type": "array",
                                            "items": {"$ref": "#/components/schemas/Item"},
                                        }
                                    }
                                },
                            },
                            "404": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Jan 13 15:10:26 UTC 2024
    - 66.7K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_query_params_str_validations/test_tutorial010_an_py39.py

    @needs_py39
    def test_query_params_str_validations_no_query(client: TestClient):
        response = client.get("/items/")
        assert response.status_code == 200
        assert response.json() == {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
    
    
    @needs_py39
    def test_query_params_str_validations_item_query_fixedquery(client: TestClient):
        response = client.get("/items/", params={"item-query": "fixedquery"})
        assert response.status_code == 200
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_header_params/test_tutorial003.py

    client = TestClient(app)
    
    
    @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"]},
            ),
        ],
    )
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jan 12 14:52:00 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  7. internal/store/batch.go

    			return err
    		}
    	}
    
    	b.items = append(b.items, item)
    	return nil
    }
    
    // Len returns the no of items in the batch
    func (b *Batch[_]) Len() int {
    	b.Lock()
    	defer b.Unlock()
    
    	return len(b.items)
    }
    
    func (b *Batch[_]) isFull() bool {
    	return len(b.items) >= int(b.limit)
    }
    
    func (b *Batch[I]) commit() error {
    	switch len(b.items) {
    	case 0:
    		return nil
    	case 1:
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_body/test_tutorial001.py

    def test_body_float(client: TestClient):
        response = client.post("/items/", json={"name": "Foo", "price": 50.5})
        assert response.status_code == 200
        assert response.json() == {
            "name": "Foo",
            "price": 50.5,
            "description": None,
            "tax": None,
        }
    
    
    def test_post_with_str_float(client: TestClient):
        response = client.post("/items/", json={"name": "Foo", "price": "50.5"})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 14.7K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_body/test_tutorial001_py310.py

        response = client.post("/items/", json={"name": "Foo", "price": 50.5})
        assert response.status_code == 200
        assert response.json() == {
            "name": "Foo",
            "price": 50.5,
            "description": None,
            "tax": None,
        }
    
    
    @needs_py310
    def test_post_with_str_float(client: TestClient):
        response = client.post("/items/", json={"name": "Foo", "price": "50.5"})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 15K bytes
    - Viewed (1)
  10. istioctl/pkg/tag/tag_test.go

    			webhooksAfter, _ := client.AdmissionregistrationV1().MutatingWebhookConfigurations().List(context.Background(), metav1.ListOptions{})
    			if len(webhooksAfter.Items) != len(tc.webhooksAfter.Items) {
    				t.Fatalf("expected %d after running, got %d", len(tc.webhooksAfter.Items), len(webhooksAfter.Items))
    			}
    		})
    	}
    }
    
    func TestSetTagErrors(t *testing.T) {
    	tcs := []struct {
    		name          string
    		tag           string
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Wed Oct 09 16:05:45 UTC 2024
    - 8.5K bytes
    - Viewed (0)
Back to top