Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 373 for sample (5.62 sec)

  1. docs/en/docs/advanced/generate-clients.md

    ## Custom Operation IDs and Better Method Names
    
    You can **modify** the way these operation IDs are **generated** to make them simpler and have **simpler method names** in the clients.
    
    In this case you will have to ensure that each operation ID is **unique** in some other way.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  2. fastapi/security/oauth2.py

        fields `username` and `password`.
    
        All the initialization parameters are extracted from the request.
    
        Read more about it in the
        [FastAPI docs for Simple OAuth2 with Password and Bearer](https://fastapi.tiangolo.com/tutorial/security/simple-oauth2/).
    
        ## Example
    
        ```python
        from typing import Annotated
    
        from fastapi import Depends, FastAPI
        from fastapi.security import OAuth2PasswordRequestForm
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 21.1K bytes
    - Viewed (1)
  3. docs/en/docs/alternatives.md

    Requests has a very simple and intuitive design, it's very easy to use, with sensible defaults. But at the same time, it's very powerful and customizable.
    
    That's why, as said in the official website:
    
    > Requests is one of the most downloaded Python packages of all time
    
    The way you use it is very simple. For example, to do a `GET` request, you would write:
    
    ```Python
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  4. docs/en/docs/benchmarks.md

        * But it provides you the tools to build simple web applications, with routing based on paths, etc.
        * If you are comparing Starlette, compare it against Sanic, Flask, Django, etc. Web frameworks (or microframeworks).
    * **FastAPI**:
        * The same way that Starlette uses Uvicorn and cannot be faster than it, **FastAPI** uses Starlette, so it cannot be faster than it.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  5. docs/en/docs/advanced/middleware.md

    app = SomeASGIApp()
    
    new_app = UnicornMiddleware(app, some_config="rainbow")
    ```
    
    But FastAPI (actually Starlette) provides a simpler way to do it that makes sure that the internal middlewares to handle server errors and custom exception handlers work properly.
    
    For that, you use `app.add_middleware()` (as in the example for CORS).
    
    ```Python
    from fastapi import FastAPI
    from unicorn import UnicornMiddleware
    
    app = FastAPI()
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 10 18:27:10 GMT 2023
    - 4K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/response-model.md

        {!> ../../../docs_src/response_model/tutorial002.py!}
        ```
    
    Now, whenever a browser is creating a user with a password, the API will return the same password in the response.
    
    In this case, it might not be a problem, because it's the same user sending the password.
    
    But if we use the same model for another *path operation*, we could be sending our user's passwords to every client.
    
    !!! danger
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17.9K bytes
    - Viewed (0)
  7. docs/en/docs/contributing.md

    </div>
    
    Now you can check in your code editor the newly created directory `docs/ht/`.
    
    That command created a file `docs/ht/mkdocs.yml` with a simple config that inherits everything from the `en` version:
    
    ```yaml
    INHERIT: ../en/mkdocs.yml
    ```
    
    !!! tip
        You could also simply create that file with those contents manually.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 17:42:43 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/first-steps.md

    ![Swagger UI](https://fastapi.tiangolo.com/img/index/index-01-swagger-ui-simple.png)
    
    ### Alternative API docs
    
    And now, go to <a href="http://127.0.0.1:8000/redoc" class="external-link" target="_blank">http://127.0.0.1:8000/redoc</a>.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 12K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/testing.md

    {!../../../docs_src/app_testing/test_main.py!}
    ```
    
    ...and have the code for the tests just like before.
    
    ## Testing: extended example
    
    Now let's extend this example and add more details to see how to test different parts.
    
    ### Extended **FastAPI** app file
    
    Let's continue with the same file structure as before:
    
    ```
    .
    ├── app
    │   ├── __init__.py
    │   ├── main.py
    │   └── test_main.py
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  10. docs/ru/docs/tutorial/first-steps.md

    ![Swagger UI](https://fastapi.tiangolo.com/img/index/index-01-swagger-ui-simple.png)
    
    ### Альтернативная документация API
    
    Теперь перейдите по адресу <a href="http://127.0.0.1:8000/redoc" class="external-link" target="_blank">http://127.0.0.1:8000/redoc</a>.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 13.1K bytes
    - Viewed (0)
Back to top