Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for me (0.18 sec)

  1. docs/en/docs/help-fastapi.md

    You can connect with <a href="https://tiangolo.com" class="external-link" target="_blank">me (Sebastián Ramírez / `tiangolo`)</a>, the author.
    
    You can:
    
    * <a href="https://github.com/tiangolo" class="external-link" target="_blank">Follow me on **GitHub**</a>.
        * See other Open Source projects I have created that could help you.
        * Follow me to see when I create a new Open Source project.
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 13.7K bytes
    - Viewed (0)
  2. tests/test_security_oauth2_optional_description.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.9K bytes
    - Viewed (0)
  3. tests/test_security_oauth2.py

        return form_data
    
    
    @app.get("/users/me")
    # Here we use string annotations to test them
    def read_current_user(current_user: "User" = Depends(get_current_user)):
        return current_user
    
    
    client = TestClient(app)
    
    
    def test_security_oauth2():
        response = client.get("/users/me", headers={"Authorization": "Bearer footokenbar"})
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 10.7K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. tests/test_tutorial/test_bigger_applications/test_main.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)
  8. 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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10K bytes
    - Viewed (0)
  9. 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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Apr 19 15:29:38 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  10. build-logic/binary-compatibility/src/main/groovy/gradlebuild/binarycompatibility/rules/AbstractGradleViolationRule.groovy

    import japicmp.model.JApiConstructor
    import japicmp.model.JApiField
    import japicmp.model.JApiHasAnnotations
    import japicmp.model.JApiHasChangeStatus
    import japicmp.model.JApiMethod
    import me.champeau.gradle.japicmp.report.AbstractContextAwareViolationRule
    import me.champeau.gradle.japicmp.report.Violation
    import org.gradle.api.Incubating
    
    import javax.inject.Inject
    
    Groovy
    - Registered: Wed May 01 11:36:15 GMT 2024
    - Last Modified: Tue Apr 23 08:40:36 GMT 2024
    - 10.4K bytes
    - Viewed (0)
Back to top