Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 47 for agaric (0.2 sec)

  1. docs/en/docs/advanced/dataclasses.md

    7. Here the `response_model` is using a type annotation of a list of `Author` dataclasses.
    
        Again, you can combine `dataclasses` with standard type annotations.
    
    8. Notice that this *path operation function* uses regular `def` instead of `async def`.
    
        As always, in FastAPI you can combine `def` and `async def` as needed.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  2. docs/en/docs/contributing.md

    <div class="termy">
    
    ```console
    $ python -m pip install --upgrade pip
    
    ---> 100%
    ```
    
    </div>
    
    !!! tip
        Every time you install a new package with `pip` under that environment, activate the environment again.
    
        This makes sure that if you use a terminal program installed by that package, you use the one from your local environment and not any other that could be installed globally.
    
    ### Install requirements using pip
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 17:42:43 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/testing.md

    Use the `TestClient` object the same way as you do with `httpx`.
    
    Write simple `assert` statements with the standard Python expressions that you need to check (again, standard `pytest`).
    
    ```Python hl_lines="2  12  15-18"
    {!../../../docs_src/app_testing/tutorial001.py!}
    ```
    
    !!! tip
        Notice that the testing functions are normal `def`, not `async def`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  4. fastapi/param_functions.py

                the dependency is declared again for the rest of the request (for example
                if the dependency is needed by several dependencies), the value will be
                re-used for the rest of the request.
    
                Set `use_cache` to `False` to disable this behavior and ensure the
                dependency is called again (if declared more than once) in the same request.
                """
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 62.5K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/security/get-current-user.md

    You actually don't have users that log in to your application but robots, bots, or other systems, that have just an access token? Again, it all works the same.
    
    Just use any kind of model, any kind of class, any kind of database that you need for your application. **FastAPI** has you covered with the dependency injection system.
    
    ## Code size
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  6. docs/en/docs/alternatives.md

    And it generates OpenAPI schemas.
    
    That's how it works in Flask, Starlette, Responder, etc.
    
    But then, we have again the problem of having a micro-syntax, inside of a Python string (a big YAML).
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/path-params.md

    <img src="/img/tutorial/path-params/image01.png">
    
    !!! check
        Again, just with that same Python type declaration, **FastAPI** gives you automatic, interactive documentation (integrating Swagger UI).
    
        Notice that the path parameter is declared to be an integer.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  8. docs/en/docs/advanced/generate-clients.md

        ```Python hl_lines="8-9  12"
        {!> ../../../docs_src/generate_clients/tutorial003.py!}
        ```
    
    ### Generate a TypeScript Client with Custom Operation IDs
    
    Now if you generate the client again, you will see that it has the improved method names:
    
    <img src="/img/tutorial/generate-clients/image07.png">
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  9. docs_src/dependencies/tutorial008d.py

    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: str = Depends(get_username)):
        if item_id == "portal-gun":
            raise InternalError(
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 694 bytes
    - Viewed (0)
  10. docs_src/dependencies/tutorial008d_an.py

    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)]):
        if item_id == "portal-gun":
            raise InternalError(
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 744 bytes
    - Viewed (0)
Back to top