Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 754 for example (0.23 sec)

  1. tests/test_tutorial/test_settings/test_tutorial001_pv1.py

        monkeypatch.setenv("ADMIN_EMAIL", "admin@example.com")
        from docs_src.settings.tutorial001_pv1 import app
    
        client = TestClient(app)
        response = client.get("/info")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "app_name": "Awesome API",
            "admin_email": "admin@example.com",
            "items_per_user": 50,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 556 bytes
    - Viewed (0)
  2. tests/test_tutorial/test_background_tasks/test_tutorial001.py

        if log.is_file():
            os.remove(log)  # pragma: no cover
        response = client.post("/send-notification/foo@example.com")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Notification sent in the background"}
        with open("./log.txt") as f:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jul 09 18:06:12 GMT 2020
    - 578 bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/handling-errors.md

    In this example, when the client requests an item by an ID that doesn't exist, raise an exception with a status code of `404`:
    
    ```Python hl_lines="11"
    {!../../../docs_src/handling_errors/tutorial001.py!}
    ```
    
    ### The resulting response
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  4. docs/en/docs/advanced/events.md

    ## Use Case
    
    Let's start with an example **use case** and then see how to solve it with this.
    
    Let's imagine that you have some **machine learning models** that you want to use to handle requests. 🤖
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  5. common-protos/k8s.io/api/admission/v1/generated.proto

      optional k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionKind kind = 2;
    
      // Resource is the fully-qualified resource being requested (for example, v1.pods)
      optional k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionResource resource = 3;
    
      // SubResource is the subresource being requested, if any (for example, "status" or "scale")
      // +optional
    Plain Text
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Mon Mar 11 18:43:24 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_schema_extra_example/test_tutorial004_an_py310.py

    from ...utils import needs_py310
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.schema_extra_example.tutorial004_an_py310 import app
    
        client = TestClient(app)
        return client
    
    
    # Test required and embedded body parameters with no bodies sent
    @needs_py310
    def test_post_body_example(client: TestClient):
        response = client.put(
            "/items/5",
            json={
                "name": "Foo",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 7.1K bytes
    - Viewed (0)
  7. docs/sts/wso2.md

    1. The id_token is an identifier that is hard to guess. For example, a randomly generated string of sufficient length, that the server handling the protected resource can use to lookup the associated authorization information.
    2. The id_token self-contains the authorization information in a manner that can be verified. For example, by encoding authorization information along with a signature into the token.
    
    Plain Text
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Sep 29 04:28:45 GMT 2022
    - 8.7K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/body-updates.md

    * Convert the copied model to something that can be stored in your DB (for example, using the `jsonable_encoder`).
        * This is comparable to using the model's `.model_dump()` method again, but it makes sure (and converts) the values to data types that can be converted to JSON, for example, `datetime` to `str`.
    * Save the data to your DB.
    * Return the updated model.
    
    === "Python 3.10+"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/cache/RemovalListener.java

     * shared resources.
     *
     * @param <K> the most general type of keys this listener can listen for; for example {@code Object}
     *     if any key is acceptable
     * @param <V> the most general type of values this listener can listen for; for example {@code
     *     Object} if any key is acceptable
     * @author Charles Fry
     * @since 10.0
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jun 15 18:00:07 GMT 2021
    - 2K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/encoder.md

    For example, if you need to store it in a database.
    
    For that, **FastAPI** provides a `jsonable_encoder()` function.
    
    ## Using the `jsonable_encoder`
    
    Let's imagine that you have a database `fake_db` that only receives JSON compatible data.
    
    For example, it doesn't receive `datetime` objects, as those are not compatible with JSON.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 1.8K bytes
    - Viewed (0)
Back to top