Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for James (0.19 sec)

  1. tests/test_operations_signatures.py

    import inspect
    
    from fastapi import APIRouter, FastAPI
    
    method_names = ["get", "put", "post", "delete", "options", "head", "patch", "trace"]
    
    
    def test_signatures_consistency():
        base_sig = inspect.signature(APIRouter.get)
        for method_name in method_names:
            router_method = getattr(APIRouter, method_name)
            app_method = getattr(FastAPI, method_name)
            router_sig = inspect.signature(router_method)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon May 27 12:08:13 GMT 2019
    - 934 bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/body-multiple-params.md

        ```
    
    In this case, **FastAPI** will notice that there are more than one body parameters in the function (two parameters that are Pydantic models).
    
    So, it will then use the parameter names as keys (field names) in the body, and expect a body like:
    
    ```JSON
    {
        "item": {
            "name": "Foo",
            "description": "The pretender",
            "price": 42.0,
            "tax": 3.2
        },
        "user": {
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 7.7K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/header-params.md

    Most of the standard headers are separated by a "hyphen" character, also known as the "minus symbol" (`-`).
    
    But a variable like `user-agent` is invalid in Python.
    
    So, by default, `Header` will convert the parameter names characters from underscore (`_`) to hyphen (`-`) to extract and document the headers.
    
    Also, HTTP headers are case-insensitive, so, you can declare them with standard Python style (also known as "snake_case").
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/path-params-numeric-validations.md

    But you can re-order them, and have the value without a default (the query parameter `q`) first.
    
    It doesn't matter for **FastAPI**. It will detect the parameters by their names, types and default declarations (`Query`, `Path`, etc), it doesn't care about the order.
    
    So, you can declare your function as:
    
    === "Python 3.8 non-Annotated"
    
        !!! tip
    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)
  5. docs/en/docs/advanced/middleware.md

    ```Python hl_lines="2  6-8"
    {!../../../docs_src/advanced_middleware/tutorial002.py!}
    ```
    
    The following arguments are supported:
    
    * `allowed_hosts` - A list of domain names that should be allowed as hostnames. Wildcard domains such as `*.example.com` are supported for matching subdomains. To allow any hostname either use `allowed_hosts=["*"]` or omit the middleware.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 10 18:27:10 GMT 2023
    - 4K bytes
    - Viewed (0)
  6. docs/en/docs/deployment/manually.md

    * <a href="https://github.com/django/daphne" class="external-link" target="_blank">Daphne</a>: the ASGI server built for Django Channels.
    
    ## Server Machine and Server Program
    
    There's a small detail about names to keep in mind. 💡
    
    The word "**server**" is commonly used to refer to both the remote/cloud computer (the physical or virtual machine) and also the program that is running on that machine (e.g. Uvicorn).
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  7. fastapi/utils.py

            "4XX",
            "5XX",
        }:
            return True
        current_status_code = int(status_code)
        return not (current_status_code < 200 or current_status_code in {204, 205, 304})
    
    
    def get_path_param_names(path: str) -> Set[str]:
        return set(re.findall("{(.*?)}", path))
    
    
    def create_response_field(
        name: str,
        type_: Type[Any],
        class_validators: Optional[Dict[str, Validator]] = None,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/path-params.md

    !!! tip
        If you are wondering, "AlexNet", "ResNet", and "LeNet" are just names of Machine Learning <abbr title="Technically, Deep Learning model architectures">models</abbr>.
    
    ### Declare a *path parameter*
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  9. docs_src/path_operation_advanced_configuration/tutorial002.py

    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items():
        return [{"item_id": "Foo"}]
    
    
    def use_route_names_as_operation_ids(app: FastAPI) -> None:
        """
        Simplify operation IDs so that generated API clients have simpler function
        names.
    
        Should be called only after all routes have been added.
        """
        for route in app.routes:
            if isinstance(route, APIRoute):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 572 bytes
    - Viewed (0)
  10. docs/language_names.yml

    清靈語 <******@****.***> 1705952573 +0800
    Others
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Jan 22 19:42:53 GMT 2024
    - 3.1K bytes
    - Viewed (0)
Back to top