Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 166 for rica (0.03 sec)

  1. docs_src/dependencies/tutorial008d_an_py39.py

    from typing import Annotated
    
    from fastapi import Depends, FastAPI, HTTPException
    
    app = FastAPI()
    
    
    class InternalError(Exception):
        pass
    
    
    def get_username():
        try:
            yield "Rick"
        except InternalError:
            print("We don't swallow the internal error here, we raise again 😎")
            raise
    
    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 734 bytes
    - Viewed (0)
  2. 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 Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 756 bytes
    - Viewed (0)
  3. docs_src/dependencies/tutorial008c.py

    from fastapi import Depends, FastAPI, HTTPException
    
    app = FastAPI()
    
    
    class InternalError(Exception):
        pass
    
    
    def get_username():
        try:
            yield "Rick"
        except InternalError:
            print("Oops, we didn't raise again, Britney đŸ˜±")
    
    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: str = Depends(get_username)):
        if item_id == "portal-gun":
            raise InternalError(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 660 bytes
    - Viewed (0)
  4. docs_src/dependencies/tutorial008c_an_py39.py

    from typing import Annotated
    
    from fastapi import Depends, FastAPI, HTTPException
    
    app = FastAPI()
    
    
    class InternalError(Exception):
        pass
    
    
    def get_username():
        try:
            yield "Rick"
        except InternalError:
            print("Oops, we didn't raise again, Britney đŸ˜±")
    
    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
        if item_id == "portal-gun":
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 700 bytes
    - Viewed (0)
  5. docs_src/dependencies/tutorial008c_an.py

    from fastapi import Depends, FastAPI, HTTPException
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    class InternalError(Exception):
        pass
    
    
    def get_username():
        try:
            yield "Rick"
        except InternalError:
            print("Oops, we didn't raise again, Britney đŸ˜±")
    
    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
        if item_id == "portal-gun":
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 710 bytes
    - Viewed (0)
  6. docs_src/dependencies/tutorial012.py

    
    @app.get("/items/")
    async def read_items():
        return [{"item": "Portal Gun"}, {"item": "Plumbus"}]
    
    
    @app.get("/users/")
    async def read_users():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 696 bytes
    - Viewed (0)
  7. docs/pt/docs/advanced/security/index.md

    ## Funcionalidades Adicionais
    
    Existem algumas funcionalidades adicionais para lidar com segurança além das cobertas em [Tutorial - Guia de Usuårio: Segurança](../../tutorial/security/index.md){.internal-link target=_blank}.
    
    /// tip | "Dica"
    
    As próximas seçÔes **não são necessariamente "avançadas"**.
    
    E é possível que para o seu caso de uso, a solução estå em uma delas.
    
    ///
    
    ## Leia o Tutorial primeiro
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Sep 03 13:43:56 UTC 2024
    - 713 bytes
    - Viewed (0)
  8. 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 Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  9. docs/pt/docs/advanced/websockets.md

    LĂĄ vocĂȘ pode definir:
    
    * O "Item ID", usado na rota.
    * O "Token" usado como um parĂąmetro de consulta.
    
    /// tip | Dica
    
    Perceba que a consulta `token` serĂĄ manipulada por uma dependĂȘncia.
    
    ///
    
    Com isso vocĂȘ pode conectar o WebSocket e entĂŁo enviar e receber mensagens:
    
    <img src="/img/tutorial/websockets/image05.png">
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Oct 31 12:20:59 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  10. docs/pt/docs/deployment/versions.md

    /// tip | "Dica"
    
    O "PATCH" Ă© o Ășltimo nĂșmero, por exemplo, em `0.2.3`, a versĂŁo PATCH Ă© `3`.
    
    ///
    
    Logo, vocĂȘ deveria conseguir fixar a versĂŁo, como:
    
    ```txt
    fastapi>=0.45.0,<0.46.0
    ```
    
    Mudanças significativas e novos recursos são adicionados em versÔes "MINOR".
    
    /// tip | "Dica"
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 3.8K bytes
    - Viewed (0)
Back to top