Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for Safine (0.19 sec)

  1. docs_src/path_operation_advanced_configuration/tutorial001.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/items/", operation_id="some_specific_id_you_define")
    async def read_items():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 167 bytes
    - Viewed (0)
  2. tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial001.py

                                "content": {"application/json": {"schema": {}}},
                            }
                        },
                        "summary": "Read Items",
                        "operationId": "some_specific_id_you_define",
                    }
                }
            },
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1K bytes
    - Viewed (0)
  3. tests/test_schema_extra_examples.py

                    ],
                ),
            ):
                return item
    
        # TODO: enable these tests once/if Form(embed=False) is supported
        # TODO: In that case, define if File() should support example/examples too
        # @app.post("/form_example")
        # def form_example(firstname: str = Form(example="John")):
        #     return firstname
    
        # @app.post("/form_examples")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 37.7K bytes
    - Viewed (0)
  4. fastapi/security/api_key.py

        with the API key and integrates that into the OpenAPI documentation. It extracts
        the key value sent in the query parameter automatically and provides it as the
        dependency result. But it doesn't define how to send that API key to the client.
    
        ## Usage
    
        Create an instance object and use that object as the dependency in `Depends()`.
    
        The dependency result will be a string containing the key value.
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 23 22:29:18 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  5. tests/test_request_body_parameters_media_type.py

    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    media_type = "application/vnd.api+json"
    
    
    # NOTE: These are not valid JSON:API resources
    # but they are fine for testing requestBody with custom media_type
    class Product(BaseModel):
        name: str
        price: float
    
    
    class Shop(BaseModel):
        name: str
    
    
    @app.post("/products")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 6.4K bytes
    - Viewed (0)
  6. fastapi/security/oauth2.py

                    )
                else:
                    return None  # pragma: nocover
            return param
    
    
    class SecurityScopes:
        """
        This is a special class that you can define in a parameter in a dependency to
        obtain the OAuth2 scopes required by all the dependencies in the same chain.
    
        This way, multiple dependencies can have different scopes, even when used in the
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 21.1K bytes
    - Viewed (1)
  7. fastapi/applications.py

                    """
                ),
            ] = None,
            response_model_by_alias: Annotated[
                bool,
                Doc(
                    """
                    Configuration passed to Pydantic to define if the response model
                    should be serialized by alias when an alias is used.
    
                    Read more about it in the
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 172.2K bytes
    - Viewed (0)
  8. fastapi/encoders.py

                if it should exclude from the output the fields that had the same default
                value, even when they were explicitly set.
                """
            ),
        ] = False,
        exclude_none: Annotated[
            bool,
            Doc(
                """
                Pydantic's `exclude_none` parameter, passed to Pydantic models to define
    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)
  9. fastapi/routing.py

                    """
                ),
            ] = None,
            response_model_by_alias: Annotated[
                bool,
                Doc(
                    """
                    Configuration passed to Pydantic to define if the response model
                    should be serialized by alias when an alias is used.
    
                    Read more about it in the
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 170.1K bytes
    - Viewed (0)
  10. fastapi/datastructures.py

    from starlette.datastructures import UploadFile as StarletteUploadFile
    from typing_extensions import Annotated, Doc
    
    
    class UploadFile(StarletteUploadFile):
        """
        A file uploaded in a request.
    
        Define it as a *path operation function* (or dependency) parameter.
    
        If you are using a regular `def` function, you can use the `upload_file.file`
        attribute to access the raw standard Python file (blocking, not async), useful and
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 5.6K bytes
    - Viewed (0)
Back to top