Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 387 for Kata (0.18 sec)

  1. docs/em/docs/tutorial/extra-data-types.md

        {!> ../../../docs_src/extra_data_types/tutorial001.py!}
        ```
    
    === "🐍 3️⃣.1️⃣0️⃣ & 🔛"
    
        ```Python hl_lines="1  2  11-15"
        {!> ../../../docs_src/extra_data_types/tutorial001_py310.py!}
        ```
    
    🗒 👈 🔢 🔘 🔢 ✔️ 👫 🐠 💽 🆎, & 👆 💪, 🖼, 🎭 😐 📅 🎭, 💖:
    
    === "🐍 3️⃣.6️⃣ & 🔛"
    
        ```Python hl_lines="18-19"
        {!> ../../../docs_src/extra_data_types/tutorial001.py!}
        ```
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/extra-data-types.md

    # Extra Data Types
    
    Up to now, you have been using common data types, like:
    
    * `int`
    * `float`
    * `str`
    * `bool`
    
    But you can also use more complex data types.
    
    And you will still have the same features as seen up to now:
    
    * Great editor support.
    * Data conversion from incoming requests.
    * Data conversion for response data.
    * Data validation.
    * Automatic annotation and documentation.
    
    ## Other data types
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  3. tests/test_read_with_orm_mode.py

        client = TestClient(app)
    
        person_data = {"name": "Dive", "lastname": "Wilson"}
        response = client.post("/people/", json=person_data)
        data = response.json()
        assert response.status_code == 200, response.text
        assert data["name"] == person_data["name"]
        assert data["lastname"] == person_data["lastname"]
        assert data["full_name"] == person_data["name"] + " " + person_data["lastname"]
    
    
    @needs_pydanticv1
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 2.4K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_sql_databases/test_sql_databases_middleware.py

        item_data = response.json()
        assert item["title"] == item_data["title"]
        assert item["description"] == item_data["description"]
        assert "id" in item_data
        assert "owner_id" in item_data
        response = client.get("/users/1")
        assert response.status_code == 200, response.text
        user_data = response.json()
        item_to_check = [it for it in user_data["items"] if it["id"] == item_data["id"]][0]
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  5. tests/test_response_model_as_return_annotation.py

    @app.get(
        "/response_model-no_annotation-return_dict_with_extra_data", response_model=User
    )
    def response_model_no_annotation_return_dict_with_extra_data():
        return {"name": "John", "surname": "Doe", "password_hash": "secret"}
    
    
    @app.get(
        "/response_model-no_annotation-return_submodel_with_extra_data", response_model=User
    )
    def response_model_no_annotation_return_submodel_with_extra_data():
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Mon Aug 14 09:49:57 GMT 2023
    - 47.7K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/body-updates.md

    And the data would be saved with that "new" `tax` of `10.5`.
    
    ## Partial updates with `PATCH`
    
    You can also use the <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PATCH" class="external-link" target="_blank">HTTP `PATCH`</a> operation to *partially* update data.
    
    This means that you can send only the data that you want to update, leaving the rest intact.
    
    !!! note
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  7. docs_src/security/tutorial005.py

            token_data = TokenData(scopes=token_scopes, username=username)
        except (JWTError, ValidationError):
            raise credentials_exception
        user = get_user(fake_users_db, username=token_data.username)
        if user is None:
            raise credentials_exception
        for scope in security_scopes.scopes:
            if scope not in token_data.scopes:
                raise HTTPException(
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  8. docs_src/security/tutorial005_an_py39.py

            token_data = TokenData(scopes=token_scopes, username=username)
        except (JWTError, ValidationError):
            raise credentials_exception
        user = get_user(fake_users_db, username=token_data.username)
        if user is None:
            raise credentials_exception
        for scope in security_scopes.scopes:
            if scope not in token_data.scopes:
                raise HTTPException(
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  9. docs_src/security/tutorial005_py39.py

            token_data = TokenData(scopes=token_scopes, username=username)
        except (JWTError, ValidationError):
            raise credentials_exception
        user = get_user(fake_users_db, username=token_data.username)
        if user is None:
            raise credentials_exception
        for scope in security_scopes.scopes:
            if scope not in token_data.scopes:
                raise HTTPException(
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  10. docs_src/security/tutorial004_an_py39.py

        return current_user
    
    
    @app.post("/token")
    async def login_for_access_token(
        form_data: Annotated[OAuth2PasswordRequestForm, Depends()],
    ) -> Token:
        user = authenticate_user(fake_users_db, form_data.username, form_data.password)
        if not user:
            raise HTTPException(
                status_code=status.HTTP_401_UNAUTHORIZED,
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 4.1K bytes
    - Viewed (0)
Back to top