Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 35 for ME (0.12 sec)

  1. tests/test_tutorial/test_security/test_tutorial005_an.py

                                },
                            }
                        },
                        "summary": "Read Users Me",
                        "operationId": "read_users_me_users_me__get",
                        "security": [{"OAuth2PasswordBearer": ["me"]}],
                    }
                },
                "/users/me/items/": {
                    "get": {
                        "responses": {
                            "200": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  2. docs/em/docs/advanced/security/oauth2-scopes.md

    <img src="/img/tutorial/security/image11.png">
    
    🚥 👆 🚫 🖊 🙆 ↔, 👆 🔜 "🔓", ✋️ 🕐❔ 👆 🔄 🔐 `/users/me/` ⚖️ `/users/me/items/` 👆 🔜 🤚 ❌ 💬 👈 👆 🚫 ✔️ 🥃 ✔. 👆 🔜 💪 🔐 `/status/`.
    
    &amp; 🚥 👆 🖊 ↔ `me` ✋️ 🚫 ↔ `items`, 👆 🔜 💪 🔐 `/users/me/` ✋️ 🚫 `/users/me/items/`.
    
    👈 ⚫️❔ 🔜 🔨 🥉 🥳 🈸 👈 🔄 🔐 1️⃣ 👫 *➡ 🛠️* ⏮️ 🤝 🚚 👩‍💻, ⚓️ 🔛 ❔ 📚 ✔ 👩‍💻 🤝 🈸.
    
    ## 🔃 🥉 🥳 🛠️
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 21:21:35 GMT 2024
    - 11.1K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_bigger_applications/test_main_an.py

                    },
                ]
            }
        )
    
    
    def test_users_me_token_jessica(client: TestClient):
        response = client.get("/users/me?token=jessica")
        assert response.status_code == 200
        assert response.json() == {"username": "fakecurrentuser"}
    
    
    def test_users_me_with_no_token(client: TestClient):
        response = client.get("/users/me")
        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.6K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_bigger_applications/test_main_an_py39.py

                ]
            }
        )
    
    
    @needs_py39
    def test_users_me_token_jessica(client: TestClient):
        response = client.get("/users/me?token=jessica")
        assert response.status_code == 200
        assert response.json() == {"username": "fakecurrentuser"}
    
    
    @needs_py39
    def test_users_me_with_no_token(client: TestClient):
        response = client.get("/users/me")
        assert response.status_code == 422
    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/path-params.md

    Например, `/users/me`. Предположим, что это путь для получения данных о текущем пользователе.
    
    У вас также может быть путь `/users/{user_id}`, чтобы получить данные о конкретном пользователе по его ID.
    
    Поскольку *операции пути* выполняются в порядке их объявления, необходимо, чтобы путь для `/users/me` был объявлен раньше, чем путь для `/users/{user_id}`:
    
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_security/test_tutorial005_py39.py

                                },
                            }
                        },
                        "summary": "Read Users Me",
                        "operationId": "read_users_me_users_me__get",
                        "security": [{"OAuth2PasswordBearer": ["me"]}],
                    }
                },
                "/users/me/items/": {
                    "get": {
                        "responses": {
                            "200": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  7. docs/fr/docs/tutorial/path-params.md

    Tel que `/users/me`, disons pour récupérer les données sur l'utilisateur actuel.
    
    Et vous avez un second chemin : `/users/{user_id}` pour récupérer de la donnée sur un utilisateur spécifique grâce à son identifiant d'utilisateur
    
    Les *fonctions de chemin* étant évaluées dans l'ordre, il faut s'assurer que la fonction correspondant à `/users/me` est déclarée avant celle de `/users/{user_id}` :
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10K bytes
    - Viewed (0)
  8. fastapi/security/http.py

        from fastapi import Depends, FastAPI
        from fastapi.security import HTTPBasic, HTTPBasicCredentials
    
        app = FastAPI()
    
        security = HTTPBasic()
    
    
        @app.get("/users/me")
        def read_current_user(credentials: Annotated[HTTPBasicCredentials, Depends(security)]):
            return {"username": credentials.username, "password": credentials.password}
        ```
        """
    
        def __init__(
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Apr 19 15:29:38 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  9. tests/test_security_oauth2_optional.py

        return form_data
    
    
    @app.get("/users/me")
    def read_users_me(current_user: Optional[User] = Depends(get_current_user)):
        if current_user is None:
            return {"msg": "Create an account first"}
        return current_user
    
    
    client = TestClient(app)
    
    
    def test_security_oauth2():
        response = client.get("/users/me", headers={"Authorization": "Bearer footokenbar"})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  10. docs/de/docs/tutorial/path-params.md

    Etwa `/users/me`, um Daten über den aktuellen Benutzer zu erhalten.
    
    Und Sie haben auch einen Pfad `/users/{user_id}`, um Daten über einen spezifischen Benutzer zu erhalten, mittels einer Benutzer-ID.
    
    Weil *Pfadoperationen* in ihrer Reihenfolge ausgewertet werden, müssen Sie sicherstellen, dass der Pfad `/users/me` vor `/users/{user_id}` deklariert wurde:
    
    ```Python hl_lines="6  11"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:28:59 GMT 2024
    - 10.3K bytes
    - Viewed (0)
Back to top