Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 93 for something (0.2 sec)

  1. tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py39.py

        assert "email" in data[0]
        assert "id" in data[0]
    
    
    @needs_py39
    # TODO: pv2 add version with Pydantic v2
    @needs_pydanticv1
    def test_create_item(client):
        item = {"title": "Foo", "description": "Something that fights"}
        response = client.post("/users/1/items/", json=item)
        assert response.status_code == 200, response.text
        item_data = response.json()
        assert item["title"] == item_data["title"]
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_sql_databases/test_sql_databases_py310.py

        assert "email" in data[0]
        assert "id" in data[0]
    
    
    @needs_py310
    # TODO: pv2 add Pydantic v2 version
    @needs_pydanticv1
    def test_create_item(client):
        item = {"title": "Foo", "description": "Something that fights"}
        response = client.post("/users/1/items/", json=item)
        assert response.status_code == 200, response.text
        item_data = response.json()
        assert item["title"] == item_data["title"]
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_sql_databases/test_sql_databases_py39.py

        assert "email" in data[0]
        assert "id" in data[0]
    
    
    @needs_py39
    # TODO: pv2 add Pydantic v2 version
    @needs_pydanticv1
    def test_create_item(client):
        item = {"title": "Foo", "description": "Something that fights"}
        response = client.post("/users/1/items/", json=item)
        assert response.status_code == 200, response.text
        item_data = response.json()
        assert item["title"] == item_data["title"]
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/handling-errors.md

    But it will be handled by the `unicorn_exception_handler`.
    
    So, you will receive a clean error, with an HTTP status code of `418` and a JSON content of:
    
    ```JSON
    {"message": "Oops! yolo did something. There goes a rainbow..."}
    ```
    
    !!! note "Technical Details"
        You could also use `from starlette.requests import Request` and `from starlette.responses import JSONResponse`.
    
    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)
  5. docs/pl/docs/tutorial/first-steps.md

    * ścieżki `/`
    * używając <abbr title="metoda HTTP GET">operacji <code>get</code></abbr>
    
    !!! info "`@decorator` Info"
        Składnia `@something` jest w Pythonie nazywana "dekoratorem".
    
        Umieszczasz to na szczycie funkcji. Jak ładną ozdobną czapkę (chyba stąd wzięła się nazwa).
    
        "Dekorator" przyjmuje funkcję znajdującą się poniżej jego i coś z nią robi.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  6. docs/vi/docs/tutorial/first-steps.md

    * đường dẫn `/`
    * sử dụng một <abbr title="an HTTP GET method">toán tử<code>get</code></abbr>
    
    !!! info Thông tin về "`@decorator`"
        Cú pháp `@something` trong Python được gọi là một "decorator".
    
        Bạn đặt nó trên một hàm. Giống như một chiếc mũ xinh xắn (Tôi ddonas đó là lí do mà thuật ngữ này ra đời).
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Sep 02 15:44:17 GMT 2023
    - 11.2K bytes
    - Viewed (0)
  7. docs/de/docs/tutorial/schema-extra-example.md

    ### Pydantic- und FastAPI-`examples`
    
    Wenn Sie `examples` innerhalb eines Pydantic-Modells hinzufügen, indem Sie `schema_extra` oder `Field(examples=["something"])` verwenden, wird dieses Beispiel dem **JSON-Schema** für dieses Pydantic-Modell hinzugefügt.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:19:53 GMT 2024
    - 13.3K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/schema-extra-example.md

    ### Pydantic and FastAPI `examples`
    
    When you add `examples` inside a Pydantic model, using `schema_extra` or `Field(examples=["something"])` that example is added to the **JSON Schema** for that Pydantic model.
    
    And that **JSON Schema** of the Pydantic model is included in the **OpenAPI** of your API, and then it's used in the docs UI.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  9. docs/em/docs/how-to/sql-databases-peewee.md

    ...✋️ ↩️ 👥 ⚙️:
    
    ```Python
    user = models.User.select().first()
    ```
    
    , 🔄, 👥 🔜 📣 *➡ 🛠️ 🔢* &amp; 🔗 🍵 `async def`, ⏮️ 😐 `def`,:
    
    ```Python hl_lines="2"
    # Something goes here
    def read_users(skip: int = 0, limit: int = 100):
        # Something goes here
    ```
    
    ## 🔬 🏒 ⏮️ 🔁
    
    👉 🖼 🔌 ➕ *➡ 🛠️* 👈 🔬 📏 🏭 📨 ⏮️ `time.sleep(sleep_time)`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 19.2K bytes
    - Viewed (0)
  10. docs/en/docs/advanced/security/oauth2-scopes.md

    By validating the data with Pydantic we can make sure that we have, for example, exactly a `list` of `str` with the scopes and a `str` with the `username`.
    
    Instead of, for example, a `dict`, or something else, as it could break the application at some point later, making it a security risk.
    
    We also verify that we have a user with that username, and if not, we raise that same exception we created before.
    
    === "Python 3.10+"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 21:21:35 GMT 2024
    - 20.5K bytes
    - Viewed (0)
Back to top