Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 400 for for (0.26 sec)

  1. docs/en/docs/how-to/custom-docs-ui-assets.md

    ```
    
    ### Include the custom docs for static files
    
    And the same way as with a custom CDN, now you can create the *path operations* for the custom docs.
    
    Again, you can re-use FastAPI's internal functions to create the HTML pages for the docs, and pass them the needed arguments:
    
    * `openapi_url`: the URL where the HTML page for the docs can get the OpenAPI schema for your API. You can use here the attribute `app.openapi_url`.
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Oct 30 09:58:58 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  2. docs/en/docs/how-to/separate-openapi-schemas.md

    Because of that, the JSON Schema for a model can be different depending on if it's used for **input or output**:
    
    * for **input** the `description` will **not be required**
    * for **output** it will be **required** (and possibly `None`, or in JSON terms, `null`)
    
    ### Model for Output in Docs
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 6.7K bytes
    - Viewed (0)
  3. docs/en/docs/advanced/templates.md

    ```Python
    {"id": id}
    ```
    
    For example, with an ID of `42`, this would render:
    
    ```html
    Item ID: 42
    ```
    
    ### Template `url_for` Arguments
    
    You can also use `url_for()` inside of the template, it takes as arguments the same arguments that would be used by your *path operation function*.
    
    So, the section with:
    
    {% raw %}
    
    ```jinja
    <a href="{{ url_for('read_item', id=id) }}">
    ```
    
    {% endraw %}
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 22:25:37 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  4. docs/en/docs/advanced/settings.md

    You can also create an environment variable only for a specific program invocation, that is only available to that program, and only for its duration.
    
    To do that, create it right before the program itself, on the same line:
    
    <div class="termy">
    
    ```console
    // Create an env var MY_NAME in line for this program call
    $ MY_NAME="Wade Wilson" python main.py
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 15.7K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/sql-databases.md

    connect_args={"check_same_thread": False}
    ```
    
    ...is needed only for `SQLite`. It's not needed for other databases.
    
    !!! info "Technical Details"
    
        By default SQLite will only allow one thread to communicate with it, assuming that each thread would handle an independent request.
    
        This is to prevent accidentally sharing the same connection for different things (for different requests).
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 29.6K bytes
    - Viewed (0)
  6. docs/en/docs/index.md

    * <a href="https://docs.pydantic.dev/" class="external-link" target="_blank">Pydantic</a> for the data parts.
    
    ## Installation
    
    <div class="termy">
    
    ```console
    $ pip install fastapi
    
    ---> 100%
    ```
    
    </div>
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 19.2K bytes
    - Viewed (0)
  7. docs/en/docs/advanced/additional-responses.md

                            }
                        }
                    }
                }
            }
        }
    }
    ```
    
    ## Additional media types for the main response
    
    You can use this same `responses` parameter to add different media types for the same main response.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 8.8K bytes
    - Viewed (0)
  8. scripts/docs.py

        os.chdir(current_dir)
        typer.secho(f"Successfully built docs for: {lang}", color=typer.colors.GREEN)
    
    
    index_sponsors_template = """
    {% if sponsors %}
    {% for sponsor in sponsors.gold -%}
    <a href="{{ sponsor.url }}" target="_blank" title="{{ sponsor.title }}"><img src="{{ sponsor.img }}"></a>
    {% endfor -%}
    {%- for sponsor in sponsors.silver -%}
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Jan 22 19:26:14 GMT 2024
    - 10.9K bytes
    - Viewed (1)
  9. docs/en/docs/tutorial/path-params-numeric-validations.md

    ## Declare metadata
    
    You can declare all the same parameters as for `Query`.
    
    For example, to declare a `title` metadata value for the path parameter `item_id` you can type:
    
    === "Python 3.10+"
    
        ```Python hl_lines="10"
        {!> ../../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py!}
        ```
    
    === "Python 3.9+"
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  10. docs/en/docs/advanced/events.md

    This can be very useful for setting up **resources** that you need to use for the whole app, and that are **shared** among requests, and/or that you need to **clean up** afterwards. For example, a database connection pool, or loading a shared machine learning model.
    
    ## Use Case
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.8K bytes
    - Viewed (0)
Back to top