Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 27 for morty (0.01 sec)

  1. docs_src/dependencies/tutorial012_an_py39.py

    
    @app.get("/items/")
    async def read_items():
        return [{"item": "Portal Gun"}, {"item": "Plumbus"}]
    
    
    @app.get("/users/")
    async def read_users():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 746 bytes
    - Viewed (0)
  2. docs_src/dependencies/tutorial008b_py39.py

    from fastapi import Depends, FastAPI, HTTPException
    
    app = FastAPI()
    
    
    data = {
        "plumbus": {"description": "Freshly pickled plumbus", "owner": "Morty"},
        "portal-gun": {"description": "Gun to create portals", "owner": "Rick"},
    }
    
    
    class OwnerError(Exception):
        pass
    
    
    def get_username():
        try:
            yield "Rick"
        except OwnerError as e:
            raise HTTPException(status_code=400, detail=f"Owner error: {e}")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 735 bytes
    - Viewed (0)
  3. tests/test_tutorial/test_path_operation_configurations/test_tutorial002b.py

        assert response.json() == ["Portal gun", "Plumbus"]
    
    
    def test_get_users():
        response = client.get("/users/")
        assert response.status_code == 200, response.text
        assert response.json() == ["Rick", "Morty"]
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_dependencies/test_tutorial012.py

                "X-Key": "fake-super-secret-key",
            },
        )
        assert response.status_code == 200, response.text
        assert response.json() == [{"username": "Rick"}, {"username": "Morty"}]
    
    
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 7.7K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/query-params-str-validations.md

    For example, this is not allowed:
    
    ```Python
    q: Annotated[str, Query(default="rick")] = "morty"
    ```
    
    ...because it's not clear if the default value should be `"rick"` or `"morty"`.
    
    So, you would use (preferably):
    
    ```Python
    q: Annotated[str, Query()] = "rick"
    ```
    
    ...or in older code bases you will find:
    
    ```Python
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 16.7K bytes
    - Viewed (0)
  6. docs/uk/docs/tutorial/query-params-str-validations.md

    Наприклад, цей варіант є некоректним:
    
    ```Python
    q: Annotated[str, Query(default="rick")] = "morty"
    ```
    
    ...тому, що не зрозуміло, яке значення має бути значенням за замовчуванням: `"rick"` чи `"morty"`.
    
    Коректні варіанти:
    
    ```Python
    q: Annotated[str, Query()] = "rick"
    ```
    
    ...або у старих кодових базах Ви знайдете:
    
    ```Python
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri May 30 14:17:24 UTC 2025
    - 26.1K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_bigger_applications/test_main.py

    
    def test_users_token_jessica(client: TestClient):
        response = client.get("/users?token=jessica")
        assert response.status_code == 200
        assert response.json() == [{"username": "Rick"}, {"username": "Morty"}]
    
    
    def test_users_with_no_token(client: TestClient):
        response = client.get("/users")
        assert response.status_code == 422
        assert response.json() == {
            "detail": [
                {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 21.3K bytes
    - Viewed (0)
  8. docs/ru/docs/tutorial/query-params-str-validations.md

    Например, так делать нельзя:
    
    ```Python
    q: Annotated[str, Query(default="rick")] = "morty"
    ```
    
    ...потому что непонятно, какое значение должно быть по умолчанию: `"rick"` или `"morty"`.
    
    Следовательно, используйте (предпочтительно):
    
    ```Python
    q: Annotated[str, Query()] = "rick"
    ```
    
    ...или в старой кодовой базе вы увидите:
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 26.2K bytes
    - Viewed (0)
  9. docs/de/docs/tutorial/query-params-str-validations.md

    Zum Beispiel ist das nicht erlaubt:
    
    ```Python
    q: Annotated[str, Query(default="rick")] = "morty"
    ```
    
    ... denn es ist nicht klar, ob der Defaultwert `"rick"` oder `"morty"` sein soll.
    
    Sie würden also (bevorzugt) schreiben:
    
    ```Python
    q: Annotated[str, Query()] = "rick"
    ```
    
    ... oder in älteren Codebasen finden Sie:
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 24 10:28:19 UTC 2025
    - 19.1K bytes
    - Viewed (0)
  10. docs/pt/docs/tutorial/query-params-str-validations.md

    Por exemplo, isto não é permitido:
    
    ```Python
    q: Annotated[str, Query(default="rick")] = "morty"
    ```
    
    ...porque não está claro se o valor padrão deveria ser `"rick"` ou `"morty"`.
    
    Então, você usaria (preferencialmente):
    
    ```Python
    q: Annotated[str, Query()] = "rick"
    ```
    
    ...ou em bases de código mais antigas você encontrará:
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 18.2K bytes
    - Viewed (0)
Back to top