Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 437 for named (0.14 sec)

  1. docs/en/docs/reference/status.md

    ```
    
    `status` is provided directly by Starlette.
    
    It contains a group of named constants (variables) with integer status codes.
    
    For example:
    
    * 200: `status.HTTP_200_OK`
    * 403: `status.HTTP_403_FORBIDDEN`
    * etc.
    
    It can be convenient to quickly access HTTP (and WebSocket) status codes in your app, using autocompletion for the name without having to remember the integer status codes by memory.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 871 bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/debugging.md

    ```Python
    from myapp import app
    ```
    
    #### More details
    
    Let's say your file is named `myapp.py`.
    
    If you run it with:
    
    <div class="termy">
    
    ```console
    $ python myapp.py
    ```
    
    </div>
    
    then the internal variable `__name__` in your file, created automatically by Python, will have as value the string `"__main__"`.
    
    So, the section:
    
    ```Python
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jun 22 17:04:16 GMT 2023
    - 2.4K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/request-forms.md

    The <abbr title="specification">spec</abbr> requires the fields to be exactly named `username` and `password`, and to be sent as form fields, not JSON.
    
    With `Form` you can declare the same configurations as with `Body` (and `Query`, `Path`, `Cookie`), including validation, examples, an alias (e.g. `user-name` instead of `username`), etc.
    
    !!! info
        `Form` is a class that inherits directly from `Body`.
    
    !!! tip
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  4. docs/en/docs/advanced/websockets.md

    ```Python hl_lines="48-52"
    {!../../../docs_src/websockets/tutorial001.py!}
    ```
    
    You can receive and send binary, text, and JSON data.
    
    ## Try it
    
    If your file is named `main.py`, run your application with:
    
    <div class="termy">
    
    ```console
    $ uvicorn main:app --reload
    
    <span style="color: green;">INFO</span>:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
    ```
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  5. docs/en/docs/how-to/sql-databases-peewee.md

    ```
    
    !!! tip
        Peewee creates several magic attributes.
    
        It will automatically add an `id` attribute as an integer to be the primary key.
    
        It will chose the name of the tables based on the class names.
    
        For the `Item`, it will create an attribute `owner_id` with the integer ID of the `User`. But we don't declare it anywhere.
    
    ## Create the Pydantic models
    
    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)
  6. fastapi/encoders.py

            bool,
            Doc(
                """
                Exclude from the output any fields that start with the name `_sa`.
    
                This is mainly a hack for compatibility with SQLAlchemy objects, they
                store internal SQLAlchemy-specific state in attributes named with `_sa`,
                and those objects can't (and shouldn't be) serialized to JSON.
                """
            ),
        ] = True,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  7. docs/en/docs/advanced/custom-response.md

    2. By using a `with` block, we make sure that the file-like object is closed after the generator function is done. So, after it finishes sending the response.
    3. This `yield from` tells the function to iterate over that thing named `file_like`. And then, for each part iterated, yield that part as coming from this generator function.
    
        So, it is a generator function that transfers the "generating" work to something else internally.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/security/simple-oauth2.md

    And the spec says that the fields have to be named like that. So `user-name` or `email` wouldn't work.
    
    But don't worry, you can show it as you wish to your final users in the frontend.
    
    And your database models can use any other names you want.
    
    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)
  9. docs/en/docs/deployment/server-workers.md

    [19515] [INFO] Application startup complete.
    ```
    
    </div>
    
    Let's see what each of those options mean:
    
    * `main:app`: This is the same syntax used by Uvicorn, `main` means the Python module named "`main`", so, a file `main.py`. And `app` is the name of the variable that is the **FastAPI** application.
        * You can imagine that `main:app` is equivalent to a Python `import` statement like:
    
            ```Python
            from main import app
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  10. docs/en/docs/advanced/openapi-callbacks.md

    The process that happens when your API app calls the *external API* is named a "callback". Because the software that the external developer wrote sends a request to your API and then your API *calls back*, sending a request to an *external API* (that was probably created by the same developer).
    
    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)
Back to top