Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 29 of 29 for Forty (0.19 sec)

  1. tests/test_tutorial/test_dependencies/test_tutorial012_an_py39.py

                "X-Key": "fake-super-secret-key",
            },
        )
        assert response.status_code == 200, response.text
        assert response.json() == [{"username": "Rick"}, {"username": "Morty"}]
    
    
    @needs_py39
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 8.8K bytes
    - Viewed (0)
  2. 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
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 25.7K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_bigger_applications/test_main_an.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() == IsDict(
            {
                "detail": [
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 24.6K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_bigger_applications/test_main_an_py39.py

    
    @needs_py39
    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"}]
    
    
    @needs_py39
    def test_users_with_no_token(client: TestClient):
        response = client.get("/users")
        assert response.status_code == 422
        assert response.json() == IsDict(
            {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 24.9K bytes
    - Viewed (0)
  5. 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"
    ```
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 38K bytes
    - Viewed (0)
  6. 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 wird nicht klar, ob der Defaultwert `"rick"` oder `"morty"` sein soll.
    
    Sie würden also (bevorzugt) schreiben:
    
    ```Python
    q: Annotated[str, Query()] = "rick"
    ```
    
    In älterem Code werden Sie auch finden:
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 17:58:59 GMT 2024
    - 27.7K 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() == IsDict(
            {
                "detail": [
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 24.6K bytes
    - Viewed (0)
  8. fastapi/routing.py

        app = FastAPI()
        router = APIRouter()
    
    
        @router.get("/users/", tags=["users"])
        async def read_users():
            return [{"username": "Rick"}, {"username": "Morty"}]
    
    
        app.include_router(router)
        ```
        """
    
        def __init__(
            self,
            *,
            prefix: Annotated[str, Doc("An optional path prefix for the router.")] = "",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 170.1K bytes
    - Viewed (0)
  9. docs/en/docs/release-notes.md

    ```Python
    from fastapi import Depends, FastAPI, HTTPException
    from typing_extensions import Annotated
    
    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"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Apr 28 00:28:00 GMT 2024
    - 385.5K bytes
    - Viewed (1)
Back to top