Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 72 for Don (0.21 sec)

  1. docs/en/docs/tutorial/security/simple-oauth2.md

        If you need to enforce it, use `OAuth2PasswordRequestFormStrict` instead of `OAuth2PasswordRequestForm`.
    
    * An optional `client_id` (we don't need it for our example).
    * An optional `client_secret` (we don't need it for our example).
    
    !!! info
        The `OAuth2PasswordRequestForm` is not a special class for **FastAPI** as is `OAuth2PasswordBearer`.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  2. docs/en/docs/advanced/security/oauth2-scopes.md

    Because this dependency function doesn't have any scope requirements itself, we can use `Depends` with `oauth2_scheme`, we don't have to use `Security` when we don't need to specify security scopes.
    
    We also declare a special parameter of type `SecurityScopes`, imported from `fastapi.security`.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 21:21:35 GMT 2024
    - 20.5K bytes
    - Viewed (0)
  3. docs/en/docs/how-to/sql-databases-peewee.md

    We are going to override the internal parts of Peewee that use `threading.local` and replace them with `contextvars`, with the corresponding updates.
    
    This might seem a bit complex (and it actually is), you don't really need to completely understand how it works to use it.
    
    We will create a `PeeweeConnectionState`:
    
    ```Python hl_lines="10-19"
    {!../../../docs_src/sql_databases_peewee/sql_app/database.py!}
    ```
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Jan 16 13:23:25 GMT 2024
    - 23.6K bytes
    - Viewed (0)
  4. docs_src/response_model/tutorial002_py310.py

    from fastapi import FastAPI
    from pydantic import BaseModel, EmailStr
    
    app = FastAPI()
    
    
    class UserIn(BaseModel):
        username: str
        password: str
        email: EmailStr
        full_name: str | None = None
    
    
    # Don't do this in production!
    @app.post("/user/")
    async def create_user(user: UserIn) -> UserIn:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Jan 07 13:45:48 GMT 2023
    - 318 bytes
    - Viewed (0)
  5. docs/en/docs/async.md

        results = some_library()
        return results
    ```
    
    ---
    
    If your application (somehow) doesn't have to communicate with anything else and wait for it to respond, use `async def`.
    
    ---
    
    If you just don't know, use normal `def`.
    
    ---
    
    **Note**: You can mix `def` and `async def` in your *path operation functions* as much as you need and define each one using the best option for you. FastAPI will do the right thing with them.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/background-tasks.md

    ## Caveat
    
    If you need to perform heavy background computation and you don't necessarily need it to be run by the same process (for example, you don't need to share memory, variables, etc), you might benefit from using other bigger tools like <a href="https://docs.celeryq.dev" class="external-link" target="_blank">Celery</a>.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 5.6K bytes
    - Viewed (0)
  7. docs/en/docs/help-fastapi.md

    ### Don't worry about style
    
    * Don't worry too much about things like commit message styles, I will squash and merge customizing the commit manually.
    
    * Also don't worry about style rules, there are already automatized tools checking that.
    
    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)
  8. docs/en/docs/advanced/path-operation-advanced-configuration.md

    # Path Operation Advanced Configuration
    
    ## OpenAPI operationId
    
    !!! warning
        If you are not an "expert" in OpenAPI, you probably don't need this.
    
    You can set the OpenAPI `operationId` to be used in your *path operation* with the parameter `operation_id`.
    
    You would have to make sure that it is unique for each operation.
    
    ```Python hl_lines="6"
    {!../../../docs_src/path_operation_advanced_configuration/tutorial001.py!}
    ```
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/body.md

    A **request** body is data sent by the client to your API. A **response** body is the data your API sends to the client.
    
    Your API almost always has to send a **response** body. But clients don't necessarily need to send **request** bodies all the time.
    
    To declare a **request** body, you use <a href="https://docs.pydantic.dev/" class="external-link" target="_blank">Pydantic</a> models with all their power and benefits.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  10. docs_src/dependencies/tutorial008d.py

    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: str = Depends(get_username)):
        if item_id == "portal-gun":
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 694 bytes
    - Viewed (0)
Back to top