Search Options

Results per page
Sort
Preferred Languages
Advance

Results 491 - 500 of 3,646 for nope (0.03 sec)

  1. docs_src/body_multiple_params/tutorial003_an_py310.py

    from fastapi import Body, FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: str | None = None
        price: float
        tax: float | None = None
    
    
    class User(BaseModel):
        username: str
        full_name: str | None = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        item_id: int, item: Item, user: User, importance: Annotated[int, Body()]
    ):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 550 bytes
    - Viewed (0)
  2. docs_src/body_nested_models/tutorial004_py39.py

    app = FastAPI()
    
    
    class Image(BaseModel):
        url: str
        name: str
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
        tags: set[str] = set()
        image: Union[Image, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Item):
        results = {"item_id": item_id, "item": item}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 499 bytes
    - Viewed (0)
  3. api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Resolution.java

     * from the {@code pathScope} and the injected field type. If the type
     * is {@link org.apache.maven.api.Node Node} and {@code pathScope == ""},
     * then the dependencies will be <i>collected</i>.
     * If the type is {@link org.apache.maven.api.Node Node} or
     * {@code List<}{@link org.apache.maven.api.Node Node}{@code >},
     * and {@code pathScope != ""}, the dependencies will be <i>flattened</i>.
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Tue Jun 11 07:23:04 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/graph/PredecessorsFunction.java

     * transformation:
     *
     * <pre>{@code
     * someGraphAlgorithm(startNode, node -> ImmutableList.of(node.mother(), node.father()));
     * }</pre>
     *
     * <p>Graph algorithms that need additional capabilities (accessing both predecessors and
     * successors, iterating over the edges, etc.) should declare their input to be of a type that
     * provides those capabilities, such as {@link Graph}, {@link ValueGraph}, or {@link Network}.
     *
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 26 17:43:39 UTC 2021
    - 4.1K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_body_multiple_params/test_tutorial003_an.py

            "item": {
                "name": "Foo",
                "price": 50.5,
                "description": None,
                "tax": None,
            },
            "user": {"username": "Dave", "full_name": None},
        }
    
    
    def test_post_body_no_data(client: TestClient):
        response = client.put("/items/5", json=None)
        assert response.status_code == 422
        assert response.json() == IsDict(
            {
                "detail": [
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_body_multiple_params/test_tutorial003_an_py310.py

            "item": {
                "name": "Foo",
                "price": 50.5,
                "description": None,
                "tax": None,
            },
            "user": {"username": "Dave", "full_name": None},
        }
    
    
    @needs_py310
    def test_post_body_no_data(client: TestClient):
        response = client.put("/items/5", json=None)
        assert response.status_code == 422
        assert response.json() == IsDict(
            {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_body_multiple_params/test_tutorial003_an_py39.py

            "item": {
                "name": "Foo",
                "price": 50.5,
                "description": None,
                "tax": None,
            },
            "user": {"username": "Dave", "full_name": None},
        }
    
    
    @needs_py39
    def test_post_body_no_data(client: TestClient):
        response = client.put("/items/5", json=None)
        assert response.status_code == 422
        assert response.json() == IsDict(
            {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  8. docs_src/extra_models/tutorial001_py310.py

        username: str
        password: str
        email: EmailStr
        full_name: str | None = None
    
    
    class UserOut(BaseModel):
        username: str
        email: EmailStr
        full_name: str | None = None
    
    
    class UserInDB(BaseModel):
        username: str
        hashed_password: str
        email: EmailStr
        full_name: str | None = None
    
    
    def fake_password_hasher(raw_password: str):
        return "supersecret" + raw_password
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 899 bytes
    - Viewed (0)
  9. docs_src/security/tutorial002_an_py39.py

    from pydantic import BaseModel
    
    app = FastAPI()
    
    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
    
    
    class User(BaseModel):
        username: str
        email: Union[str, None] = None
        full_name: Union[str, None] = None
        disabled: Union[bool, None] = None
    
    
    def fake_decode_token(token):
        return User(
            username=token + "fakedecoded", email="******@****.***", full_name="John Doe"
        )
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 786 bytes
    - Viewed (0)
  10. tests/test_tutorial/test_body_multiple_params/test_tutorial003_py310.py

            "item": {
                "name": "Foo",
                "price": 50.5,
                "description": None,
                "tax": None,
            },
            "user": {"username": "Dave", "full_name": None},
        }
    
    
    @needs_py310
    def test_post_body_no_data(client: TestClient):
        response = client.put("/items/5", json=None)
        assert response.status_code == 422
        assert response.json() == IsDict(
            {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 9.5K bytes
    - Viewed (0)
Back to top