Search Options

Results per page
Sort
Preferred Languages
Advance

Results 681 - 690 of 1,046 for fo2o (0.04 sec)

  1. docs_src/additional_status_codes/tutorial001.py

    from typing import Union
    
    from fastapi import Body, FastAPI, status
    from fastapi.responses import JSONResponse
    
    app = FastAPI()
    
    items = {"foo": {"name": "Fighters", "size": 6}, "bar": {"name": "Tenders", "size": 3}}
    
    
    @app.put("/items/{item_id}")
    async def upsert_item(
        item_id: str,
        name: Union[str, None] = Body(default=None),
        size: Union[int, None] = Body(default=None),
    ):
        if item_id in items:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 684 bytes
    - Viewed (0)
  2. docs_src/additional_status_codes/tutorial001_an_py310.py

    from typing import Annotated
    
    from fastapi import Body, FastAPI, status
    from fastapi.responses import JSONResponse
    
    app = FastAPI()
    
    items = {"foo": {"name": "Fighters", "size": 6}, "bar": {"name": "Tenders", "size": 3}}
    
    
    @app.put("/items/{item_id}")
    async def upsert_item(
        item_id: str,
        name: Annotated[str | None, Body()] = None,
        size: Annotated[int | None, Body()] = None,
    ):
        if item_id in items:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 686 bytes
    - Viewed (0)
  3. docs_src/dependencies/tutorial002_an.py

    from typing import Union
    
    from fastapi import Depends, FastAPI
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}]
    
    
    class CommonQueryParams:
        def __init__(self, q: Union[str, None] = None, skip: int = 0, limit: int = 100):
            self.q = q
            self.skip = skip
            self.limit = limit
    
    
    @app.get("/items/")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 706 bytes
    - Viewed (0)
  4. tests/test_tutorial/test_additional_status_codes/test_tutorial001_an_py310.py

        from docs_src.additional_status_codes.tutorial001_an_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    def test_update(client: TestClient):
        response = client.put("/items/foo", json={"name": "Wrestlers"})
        assert response.status_code == 200, response.text
        assert response.json() == {"name": "Wrestlers", "size": None}
    
    
    @needs_py310
    def test_create(client: TestClient):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 741 bytes
    - Viewed (0)
  5. docs_src/schema_extra_example/tutorial001_pv1.py

        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
        class Config:
            schema_extra = {
                "examples": [
                    {
                        "name": "Foo",
                        "description": "A very nice Item",
                        "price": 35.4,
                        "tax": 3.2,
                    }
                ]
            }
    
    
    @app.put("/items/{item_id}")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 669 bytes
    - Viewed (0)
  6. docs_src/schema_extra_example/tutorial003_an_py39.py

    
    @app.put("/items/{item_id}")
    async def update_item(
        item_id: int,
        item: Annotated[
            Item,
            Body(
                examples=[
                    {
                        "name": "Foo",
                        "description": "A very nice Item",
                        "price": 35.4,
                        "tax": 3.2,
                    }
                ],
            ),
        ],
    ):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 692 bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/SetsTest.java

        assertTrue(set.isEmpty());
        set.add(new Derived("foo"));
        set.add(new Derived("bar"));
        assertThat(set).containsExactly(new Derived("bar"), new Derived("foo")).inOrder();
      }
    
      public void testNewTreeSetEmptyNonGeneric() {
        TreeSet<LegacyComparable> set = Sets.newTreeSet();
        assertTrue(set.isEmpty());
        set.add(new LegacyComparable("foo"));
        set.add(new LegacyComparable("bar"));
        assertThat(set)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 48.6K bytes
    - Viewed (0)
  8. docs/de/docs/tutorial/security/oauth2-jwt.md

    Mit diesen Ideen kann JWT für weitaus anspruchsvollere Szenarien verwendet werden.
    
    In diesen Fällen könnten mehrere dieser Entitäten die gleiche ID haben, sagen wir `foo` (ein Benutzer `foo`, ein Auto `foo` und ein Blog-Beitrag `foo`).
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 15K bytes
    - Viewed (0)
  9. docs_src/schema_extra_example/tutorial003_an.py

    
    @app.put("/items/{item_id}")
    async def update_item(
        item_id: int,
        item: Annotated[
            Item,
            Body(
                examples=[
                    {
                        "name": "Foo",
                        "description": "A very nice Item",
                        "price": 35.4,
                        "tax": 3.2,
                    }
                ],
            ),
        ],
    ):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 721 bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/base/AsciiTest.java

        assertEquals("foobar", Ascii.truncate("foobar", 10, "…"));
        assertEquals("foo…", Ascii.truncate("foobar", 4, "…"));
        assertEquals("fo--", Ascii.truncate("foobar", 4, "--"));
        assertEquals("foobar", Ascii.truncate("foobar", 6, "…"));
        assertEquals("foob…", Ascii.truncate("foobar", 5, "…"));
        assertEquals("foo", Ascii.truncate("foobar", 3, ""));
        assertEquals("", Ascii.truncate("", 5, ""));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 17 18:14:12 UTC 2024
    - 5.4K bytes
    - Viewed (0)
Back to top