Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1161 - 1170 of 1,929 for FastAPI (0.06 sec)

  1. docs_src/generate_clients/tutorial003_py39.py

    from fastapi import FastAPI
    from fastapi.routing import APIRoute
    from pydantic import BaseModel
    
    
    def custom_generate_unique_id(route: APIRoute):
        return f"{route.tags[0]}-{route.name}"
    
    
    app = FastAPI(generate_unique_id_function=custom_generate_unique_id)
    
    
    class Item(BaseModel):
        name: str
        price: float
    
    
    class ResponseMessage(BaseModel):
        message: str
    
    
    class User(BaseModel):
        username: str
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Mar 04 22:02:18 UTC 2022
    - 914 bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/testing.md

    You could also use `from starlette.testclient import TestClient`.
    
    **FastAPI** provides the same `starlette.testclient` as `fastapi.testclient` just as a convenience for you, the developer. But it comes directly from Starlette.
    
    ///
    
    /// tip
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  3. docs/em/docs/advanced/wsgi.md

    ๐Ÿ”œ, ๐Ÿ”  ๐Ÿ“จ ๐Ÿ”ฝ โžก `/v1/` ๐Ÿ”œ ๐Ÿต ๐Ÿบ ๐Ÿˆธ.
    
    & ๐ŸŽ‚ ๐Ÿ”œ ๐Ÿต **FastAPI**.
    
    ๐Ÿšฅ ๐Ÿ‘† ๐Ÿƒ โšซ๏ธ โฎ๏ธ Uvicorn &amp; ๐Ÿšถ <a href="http://localhost:8000/v1/" class="external-link" target="_blank">http://localhost:8000/v1/</a> ๐Ÿ‘† ๐Ÿ”œ ๐Ÿ‘€ ๐Ÿ“จ โšช๏ธโžก๏ธ ๐Ÿบ:
    
    ```txt
    Hello, World from Flask!
    ```
    
    &amp; ๐Ÿšฅ ๐Ÿ‘† ๐Ÿšถ <a href="http://localhost:8000/v2" class="external-link" target="_blank">http://localhost:8000/v2</a> ๐Ÿ‘† ๐Ÿ”œ ๐Ÿ‘€ ๐Ÿ“จ โšช๏ธโžก๏ธ FastAPI:
    
    ```JSON
    {
        "message": "Hello World"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  4. tests/test_openapi_query_parameter_extension.py

    from typing import Optional
    
    from dirty_equals import IsDict
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    @app.get(
        "/",
        openapi_extra={
            "parameters": [
                {
                    "required": False,
                    "schema": {"title": "Extra Param 1"},
                    "name": "extra_param_1",
                    "in": "query",
                },
                {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  5. tests/test_enforce_once_required_parameter.py

    from typing import Optional
    
    from fastapi import Depends, FastAPI, Query, status
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    def _get_client_key(client_id: str = Query(...)) -> str:
        return f"{client_id}_key"
    
    
    def _get_client_tag(client_id: Optional[str] = Query(None)) -> Optional[str]:
        if client_id is None:
            return None
        return f"{client_id}_tag"
    
    
    @app.get("/foo")
    def foo_handler(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  6. docs/de/docs/async.md

    Wenn Sie mit **FastAPI** arbeiten, mรผssen Sie sich darรผber keine Sorgen machen, da diese โ€žersteโ€œ Funktion Ihre *Pfadoperation-Funktion* sein wird und FastAPI weiรŸ, was zu tun ist.
    
    Wenn Sie jedoch `async` / `await` ohne FastAPI verwenden mรถchten, kรถnnen Sie dies auch tun.
    
    ### Schreiben Sie Ihren eigenen asynchronen Code
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 26.6K bytes
    - Viewed (0)
  7. docs/tr/docs/tutorial/request-forms.md

    ร–rneฤŸin `pip install python-multipart`.
    
    ///
    
    ## `Form` Sฤฑnฤฑfฤฑnฤฑ Projenize Dahil Edin
    
    `Form` sฤฑnฤฑfฤฑnฤฑ `fastapi`'den projenize dahil edin:
    
    //// tab | Python 3.9+
    
    ```Python hl_lines="3"
    {!> ../../docs_src/request_forms/tutorial001_an_py39.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    
    ```Python hl_lines="1"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/header-param-models.md

    This would allow you to **re-use the model** in **multiple places** and also to declare validations and metadata for all the parameters at once. ๐Ÿ˜Ž
    
    /// note
    
    This is supported since FastAPI version `0.115.0`. ๐Ÿค“
    
    ///
    
    ## Header Parameters with a Pydantic Model
    
    Declare the **header parameters** that you need in a **Pydantic model**, and then declare the parameter as `Header`:
    
    //// tab | Python 3.10+
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  9. docs_src/body_updates/tutorial001_py39.py

    from typing import Union
    
    from fastapi import FastAPI
    from fastapi.encoders import jsonable_encoder
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: Union[str, None] = None
        description: Union[str, None] = None
        price: Union[float, None] = None
        tax: float = 10.5
        tags: list[str] = []
    
    
    items = {
        "foo": {"name": "Foo", "price": 50.2},
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 900 bytes
    - Viewed (0)
  10. docs/em/docs/advanced/custom-response.md

    โญ• ๐Ÿ“จ, ๐Ÿ“จ `Response` ๐Ÿ”— ๐ŸŒ… โฉ ๐ŸŒ˜ ๐Ÿ›ฌ ๐Ÿ“–.
    
    ๐Ÿ‘‰ โ†ฉ๏ธ ๐Ÿ”ข, FastAPI ๐Ÿ”œ โœ” ๐Ÿ”  ๐Ÿฌ ๐Ÿ”˜ &amp; โš’ ๐Ÿ’ญ โšซ๏ธ ๐ŸŽป โฎ๏ธ ๐ŸŽป, โš™๏ธ ๐ŸŽ [๐ŸŽป ๐Ÿ”— ๐Ÿ”ข](../tutorial/encoder.md){.internal-link target=_blank} ๐Ÿ”ฌ ๐Ÿ”ฐ. ๐Ÿ‘‰ โšซ๏ธโ” โœ” ๐Ÿ‘† ๐Ÿ“จ **โŒ ๐ŸŽš**, ๐Ÿ–ผ ๐Ÿ’ฝ ๐Ÿท.
    
    โœ‹๏ธ ๐Ÿšฅ ๐Ÿ‘† ๐ŸŽฏ ๐Ÿ‘ˆ ๐ŸŽš ๐Ÿ‘ˆ ๐Ÿ‘† ๐Ÿ›ฌ **๐ŸŽป โฎ๏ธ ๐ŸŽป**, ๐Ÿ‘† ๐Ÿ’ช ๐Ÿšถโ€โ™€๏ธ โšซ๏ธ ๐Ÿ”— ๐Ÿ“จ ๐ŸŽ“ &amp; โŽ โž• ๐ŸŒฅ ๐Ÿ‘ˆ FastAPI ๐Ÿ”œ โœ”๏ธ ๐Ÿšถโ€โ™€๏ธ ๐Ÿ‘† ๐Ÿ“จ ๐ŸŽš ๐Ÿ”˜ `jsonable_encoder` โญ ๐Ÿšถโ€โ™€๏ธ โšซ๏ธ ๐Ÿ“จ ๐ŸŽ“.
    
    ```Python hl_lines="2  7"
    {!../../docs_src/custom_response/tutorial001b.py!}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.7K bytes
    - Viewed (0)
Back to top