Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 45 for by (0.18 sec)

  1. tests/test_response_by_alias.py

    @app.get("/by-alias/dict", response_model=Model)
    def by_alias_dict():
        return {"alias": "Foo"}
    
    
    @app.get("/by-alias/model", response_model=Model)
    def by_alias_model():
        return Model(alias="Foo")
    
    
    @app.get("/by-alias/list", response_model=List[Model])
    def by_alias_list():
        return [{"alias": "Foo"}, {"alias": "Bar"}]
    
    
    @app.get("/no-alias/dict", response_model=ModelNoAlias)
    def no_alias_dict():
        return {"name": "Foo"}
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 11.1K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/dependencies/index.md

    And it can return anything you want.
    
    In this case, this dependency expects:
    
    * An optional query parameter `q` that is a `str`.
    * An optional query parameter `skip` that is an `int`, and by default is `0`.
    * An optional query parameter `limit` that is an `int`, and by default is `100`.
    
    And then it just returns a `dict` containing those values.
    
    !!! info
        FastAPI added support for `Annotated` (and started recommending it) in version 0.95.0.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  3. docs/en/docs/help-fastapi.md

    You can "star" FastAPI in GitHub (clicking the star button at the top right): <a href="https://github.com/tiangolo/fastapi" class="external-link" target="_blank">https://github.com/tiangolo/fastapi</a>. ⭐️
    
    By adding a star, other users will be able to find it more easily and see that it has been already useful for others.
    
    ## Watch the GitHub repository for releases
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 13.7K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/request-files.md

    # Request Files
    
    You can define files to be uploaded by the client using `File`.
    
    !!! info
        To receive uploaded files, first install <a href="https://github.com/Kludex/python-multipart" class="external-link" target="_blank">`python-multipart`</a>.
    
        E.g. `pip install python-multipart`.
    
        This is because uploaded files are sent as "form data".
    
    ## Import `File`
    
    Import `File` and `UploadFile` from `fastapi`:
    
    === "Python 3.9+"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/query-params-str-validations.md

        ```
    
    === "Python 3.8+"
    
        ```Python
        q: Annotated[Union[str, None]] = None
        ```
    
    Both of those versions mean the same thing, `q` is a parameter that can be a `str` or `None`, and by default, it is `None`.
    
    Now let's jump to the fun stuff. 🎉
    
    ## Add `Query` to `Annotated` in the `q` parameter
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 25.7K bytes
    - Viewed (0)
  6. docs/en/docs/advanced/custom-response.md

    # Custom Response - HTML, Stream, File, others
    
    By default, **FastAPI** will return the responses using `JSONResponse`.
    
    You can override it by returning a `Response` directly as seen in [Return a Response directly](response-directly.md){.internal-link target=_blank}.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  7. docs/en/docs/advanced/security/oauth2-scopes.md

    They are normally used to declare specific security permissions, for example:
    
    * `users:read` or `users:write` are common examples.
    * `instagram_basic` is used by Facebook / Instagram.
    * `https://www.googleapis.com/auth/drive` is used by Google.
    
    !!! info
        In OAuth2 a "scope" is just a string that declares a specific permission required.
    
        It doesn't matter if it has other characters like `:` or if it is a URL.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 21:21:35 GMT 2024
    - 20.5K bytes
    - Viewed (0)
  8. docs/en/docs/async.md

    * the data from the client to be sent through the network
    * the data sent by your program to be received by the client through the network
    * the contents of a file in the disk to be read by the system and given to your program
    * the contents your program gave to the system to be written to disk
    * a remote API operation
    * a database operation to finish
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/security/simple-oauth2.md

    Each "scope" is just a string (without spaces).
    
    They are normally used to declare specific security permissions, for example:
    
    * `users:read` or `users:write` are common examples.
    * `instagram_basic` is used by Facebook / Instagram.
    * `https://www.googleapis.com/auth/drive` is used by Google.
    
    !!! info
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  10. README.md

    To understand more about it, see the section <a href="https://fastapi.tiangolo.com/benchmarks/" class="internal-link" target="_blank">Benchmarks</a>.
    
    ## Dependencies
    
    Used by Pydantic:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 22.6K bytes
    - Viewed (0)
Back to top