Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1821 - 1830 of 3,237 for get2 (0.03 sec)

  1. docs_src/dependencies/tutorial004_an_py39.py

    
    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/")
    async def read_items(commons: Annotated[CommonQueryParams, Depends()]):
        response = {}
        if commons.q:
            response.update({"q": commons.q})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 660 bytes
    - Viewed (0)
  2. docs_src/extra_models/tutorial003_py310.py

        "item2": {
            "description": "Music is my aeroplane, it's my aeroplane",
            "type": "plane",
            "size": 5,
        },
    }
    
    
    @app.get("/items/{item_id}", response_model=Union[PlaneItem, CarItem])
    async def read_item(item_id: str):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 644 bytes
    - Viewed (0)
  3. .github/workflows/vulncheck.yml

        steps:
          - name: Check out code into the Go module directory
            uses: actions/checkout@v4
          - name: Set up Go
            uses: actions/setup-go@v5
            with:
              go-version: 1.22.7
          - name: Get official govulncheck
            run: go install golang.org/x/vuln/cmd/govulncheck@latest
            shell: bash
          - name: Run govulncheck
            run: govulncheck -show verbose ./...
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 22:53:34 UTC 2024
    - 658 bytes
    - Viewed (0)
  4. okhttp/api/okhttp.api

    	public fun equals (Ljava/lang/Object;)Z
    	public final fun fragment ()Ljava/lang/String;
    	public static final fun get (Ljava/lang/String;)Lokhttp3/HttpUrl;
    	public static final fun get (Ljava/net/URI;)Lokhttp3/HttpUrl;
    	public static final fun get (Ljava/net/URL;)Lokhttp3/HttpUrl;
    	public fun hashCode ()I
    	public final fun host ()Ljava/lang/String;
    	public final fun isHttps ()Z
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 15 13:41:01 UTC 2024
    - 70.2K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/TreeBasedTableTest.java

        assertEquals(ImmutableMap.of(2, 'd'), map.get("dog"));
        map.clear();
        assertTrue(map.isEmpty());
        assertEquals(ImmutableSet.of("bar", "foo"), sortedTable.rowKeySet());
      }
    
      public void testRowMapValuesAreSorted() {
        sortedTable = create("foo", 1, 'a', "bar", 1, 'b', "foo", 3, 'c', "dog", 2, 'd');
        assertTrue(sortedTable.rowMap().get("foo") instanceof SortedMap);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 15K bytes
    - Viewed (0)
  6. docs_src/body_multiple_params/tutorial001.py

        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        *,
        item_id: int = Path(title="The ID of the item to get", ge=0, le=1000),
        q: Union[str, None] = None,
        item: Union[Item, None] = None,
    ):
        results = {"item_id": item_id}
        if q:
            results.update({"q": q})
        if item:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 596 bytes
    - Viewed (0)
  7. docs_src/dependencies/tutorial003_an.py

    
    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/")
    async def read_items(commons: Annotated[Any, Depends(CommonQueryParams)]):
        response = {}
        if commons.q:
            response.update({"q": commons.q})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 697 bytes
    - Viewed (0)
  8. docs_src/dependencies/tutorial004_an.py

    
    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/")
    async def read_items(commons: Annotated[CommonQueryParams, Depends()]):
        response = {}
        if commons.q:
            response.update({"q": commons.q})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 689 bytes
    - Viewed (0)
  9. docs_src/dependencies/tutorial008c_an_py39.py

    
    class InternalError(Exception):
        pass
    
    
    def get_username():
        try:
            yield "Rick"
        except InternalError:
            print("Oops, we didn't raise again, Britney 😱")
    
    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
        if item_id == "portal-gun":
            raise InternalError(
                f"The portal gun is too dangerous to be owned by {username}"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 700 bytes
    - Viewed (0)
  10. tests/test_tutorial/test_websockets/test_tutorial001.py

    from fastapi.testclient import TestClient
    from fastapi.websockets import WebSocketDisconnect
    
    from docs_src.websockets.tutorial001 import app
    
    client = TestClient(app)
    
    
    def test_main():
        response = client.get("/")
        assert response.status_code == 200, response.text
        assert b"<!DOCTYPE html>" in response.content
    
    
    def test_websocket():
        with pytest.raises(WebSocketDisconnect):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 10 09:08:19 UTC 2020
    - 822 bytes
    - Viewed (0)
Back to top