Search Options

Results per page
Sort
Preferred Languages
Advance

Results 271 - 280 of 1,962 for fastapi (0.07 sec)

  1. docs_src/encoder/tutorial001.py

    from datetime import datetime
    from typing import Union
    
    from fastapi import FastAPI
    from fastapi.encoders import jsonable_encoder
    from pydantic import BaseModel
    
    fake_db = {}
    
    
    class Item(BaseModel):
        title: str
        timestamp: datetime
        description: Union[str, None] = None
    
    
    app = FastAPI()
    
    
    @app.put("/items/{id}")
    def update_item(id: str, item: Item):
        json_compatible_item_data = jsonable_encoder(item)
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 461 bytes
    - Viewed (0)
  2. docs/em/docs/deployment/docker.md

    ---> 100%
    Successfully installed fastapi pydantic uvicorn
    ```
    
    </div>
    
    /// info
    
    ๐Ÿ“ค ๐ŸŽ ๐Ÿ“ &amp; ๐Ÿงฐ ๐Ÿ”ฌ &amp; โŽ ๐Ÿ“ฆ ๐Ÿ”—.
    
    ๐Ÿ‘ค ๐Ÿ”œ ๐ŸŽฆ ๐Ÿ‘† ๐Ÿ–ผ โš™๏ธ ๐ŸŽถ โช ๐Ÿ“„ ๐Ÿ”›. ๐Ÿ‘ถ
    
    ///
    
    ### โœ **FastAPI** ๐Ÿ“Ÿ
    
    * โœ `app` ๐Ÿ“ &amp; โ›” โšซ๏ธ.
    * โœ ๐Ÿ› ๐Ÿ“ `__init__.py`.
    * โœ `main.py` ๐Ÿ“ โฎ๏ธ:
    
    ```Python
    from typing import Union
    
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon Aug 12 21:47:53 UTC 2024
    - 27.9K bytes
    - Viewed (0)
  3. docs_src/security/tutorial007_an.py

    import secrets
    
    from fastapi import Depends, FastAPI, HTTPException, status
    from fastapi.security import HTTPBasic, HTTPBasicCredentials
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    security = HTTPBasic()
    
    
    def get_current_username(
        credentials: Annotated[HTTPBasicCredentials, Depends(security)],
    ):
        current_username_bytes = credentials.username.encode("utf8")
        correct_username_bytes = b"stanleyjobson"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  4. tests/test_no_swagger_ui_redirect.py

    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    
    app = FastAPI(swagger_ui_oauth2_redirect_url=None)
    
    
    @app.get("/items/")
    async def read_items():
        return {"id": "foo"}
    
    
    client = TestClient(app)
    
    
    def test_swagger_ui():
        response = client.get("/docs")
        assert response.status_code == 200, response.text
        assert response.headers["content-type"] == "text/html; charset=utf-8"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Apr 08 04:37:38 UTC 2020
    - 786 bytes
    - Viewed (0)
  5. docs/em/docs/tutorial/response-model.md

    ๐Ÿ‘ฅ โœ ๐Ÿ”ข ๐Ÿ“จ ๐Ÿ†Ž `BaseUser`, โœ‹๏ธ ๐Ÿ‘ฅ ๐Ÿค™ ๐Ÿ›ฌ `UserIn` ๐Ÿ‘.
    
    ๐Ÿ‘จโ€๐ŸŽจ, โœ, &amp; ๐ŸŽ ๐Ÿงฐ ๐Ÿ† ๐Ÿšซ ๐Ÿ˜ญ ๐Ÿ”ƒ ๐Ÿ‘‰ โ†ฉ๏ธ, โŒจ โš–, `UserIn` ๐Ÿฟ `BaseUser`, โ” โ›“ โšซ๏ธ *โ˜‘* ๐Ÿ†Ž ๐Ÿ•โ” โšซ๏ธโ” โŒ› ๐Ÿ•ณ ๐Ÿ‘ˆ `BaseUser`.
    
    ### FastAPI ๐Ÿ’ฝ ๐Ÿ–ฅ
    
    ๐Ÿ”œ, FastAPI, โšซ๏ธ ๐Ÿ”œ ๐Ÿ‘€ ๐Ÿ“จ ๐Ÿ†Ž &amp; โš’ ๐Ÿ’ญ ๐Ÿ‘ˆ โšซ๏ธโ” ๐Ÿ‘† ๐Ÿ“จ ๐Ÿ”Œ **๐Ÿ•ด** ๐Ÿ‘ ๐Ÿ‘ˆ ๐Ÿ“ฃ ๐Ÿ†Ž.
    
    FastAPI ๐Ÿ”จ ๐Ÿ“š ๐Ÿ‘œ ๐Ÿ”˜ โฎ๏ธ Pydantic โš’ ๐Ÿ’ญ ๐Ÿ‘ˆ ๐Ÿ“š ๐ŸŽ ๐Ÿšซ ๐ŸŽ“ ๐Ÿงฌ ๐Ÿšซ โš™๏ธ ๐Ÿ“จ ๐Ÿ’ฝ ๐Ÿ–ฅ, โช ๐Ÿ‘† ๐Ÿ’ช ๐Ÿ”š ๐Ÿ†™ ๐Ÿ›ฌ ๐ŸŒ… ๐ŸŒ… ๐Ÿ’ฝ ๐ŸŒ˜ โšซ๏ธโ” ๐Ÿ‘† ๐Ÿ“ˆ.
    
    ๐Ÿ‘‰ ๐ŸŒŒ, ๐Ÿ‘† ๐Ÿ’ช ๐Ÿคš ๐Ÿ† ๐Ÿ‘ฏโ€โ™‚๏ธ ๐ŸŒ: ๐Ÿ†Ž โœ โฎ๏ธ **๐Ÿญ ๐Ÿ•โ€๐Ÿฆบ** &amp; **๐Ÿ’ฝ ๐Ÿ–ฅ**.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  6. docs/pl/docs/tutorial/index.md

    Uลผycie w Twoim edytorze jest tym, co pokazuje prawdziwe korzyล›ci z FastAPI, pozwala zobaczyฤ‡ jak maล‚o kodu musisz napisaฤ‡, wszystkie funkcje, takie jak kontrola typรณw, <abbr title="auto-complete, autocompletion, IntelliSense">automatyczne uzupeล‚nianie</abbr>, itd.
    
    ---
    
    ## Instalacja FastAPI
    
    Jako pierwszy krok zainstaluj FastAPI.
    
    Na potrzeby samouczka moลผesz zainstalowaฤ‡ rรณwnieลผ wszystkie opcjonalne biblioteki:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  7. tests/test_response_change_status_code.py

    from fastapi import Depends, FastAPI, Response
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    async def response_status_setter(response: Response):
        response.status_code = 201
    
    
    async def parent_dep(result=Depends(response_status_setter)):
        return result
    
    
    @app.get("/", dependencies=[Depends(parent_dep)])
    async def get_main():
        return {"msg": "Hello World"}
    
    
    client = TestClient(app)
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Apr 08 04:37:38 UTC 2020
    - 589 bytes
    - Viewed (0)
  8. docs/em/docs/tutorial/security/index.md

    /// tip
    
    ๐Ÿ› ๏ธ ๐ŸŽ ๐Ÿค/โœ” ๐Ÿ•โ€๐Ÿฆบ ๐Ÿ’– ๐Ÿ‡บ๐Ÿ‡ธ๐Ÿ”, ๐Ÿ‘ฑ๐Ÿ“”, ๐Ÿ‘ฑ๐Ÿ“”, ๐Ÿ“‚, โ™’๏ธ. ๐Ÿ’ช &amp; ๐Ÿ“ถ โฉ.
    
    ๐ŸŒ… ๐Ÿ— โš  ๐Ÿ— ๐Ÿค/โœ” ๐Ÿ•โ€๐Ÿฆบ ๐Ÿ’– ๐Ÿ‘ˆ, โœ‹๏ธ **FastAPI** ๐Ÿค ๐Ÿ‘† ๐Ÿงฐ โšซ๏ธ ๐Ÿ’ช, โช ๐Ÿ”จ ๐Ÿ‹๏ธ ๐Ÿ‹โ€โ™‚ ๐Ÿ‘†.
    
    ///
    
    ## **FastAPI** ๐Ÿš™
    
    FastAPI ๐Ÿšš ๐Ÿ“š ๐Ÿงฐ ๐Ÿ”  ๐Ÿ‘‰ ๐Ÿ’‚โ€โ™‚ โš– `fastapi.security` ๐Ÿ•น ๐Ÿ‘ˆ ๐Ÿ“‰ โš™๏ธ ๐Ÿ‘‰ ๐Ÿ’‚โ€โ™‚ ๐Ÿ› ๏ธ.
    
    โญ ๐Ÿ“ƒ ๐Ÿ‘† ๐Ÿ”œ ๐Ÿ‘€ โ” ๐Ÿšฎ ๐Ÿ’‚โ€โ™‚ ๐Ÿ‘† ๐Ÿ› ๏ธ โš™๏ธ ๐Ÿ“š ๐Ÿงฐ ๐Ÿšš **FastAPI**.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  9. docs/ru/docs/tutorial/body-multiple-params.md

    ะะฐะฟั€ะธะผะตั€, ั€ะฐััˆะธั€ัั ะฟั€ะตะดั‹ะดัƒั‰ัƒัŽ ะผะพะดะตะปัŒ, ะฒั‹ ะผะพะถะตั‚ะต ั€ะตัˆะธั‚ัŒ, ั‡ั‚ะพ ะฒะฐะผ ะฝัƒะถะตะฝ ะตั‰ะต ะพะดะธะฝ ะบะปัŽั‡ `importance` ะฒ ั‚ะพะผ ะถะต ั‚ะตะปะต ะทะฐะฟั€ะพัะฐ, ะฟะพะผะธะผะพ ะฟะฐั€ะฐะผะตั‚ั€ะพะฒ `item` ะธ `user`.
    
    ะ•ัะปะธ ะฒั‹ ะพะฑัŠัะฒะธั‚ะต ะตะณะพ ะฑะตะท ัƒะบะฐะทะฐะฝะธั, ะบะฐะบะพะน ะธะผะตะฝะฝะพ ะพะฑัŠะตะบั‚ (Path, Query, Body ะธ .ั‚.ะฟ.) ะพะถะธะดะฐะตั‚ะต, ั‚ะพ, ะฟะพัะบะพะปัŒะบัƒ ัั‚ะพ ัะฒะปัะตั‚ัั ะฟั€ะพัั‚ั‹ะผ ั‚ะธะฟะพะผ ะดะฐะฝะฝั‹ั…, **FastAPI** ะฑัƒะดะตั‚ ัั‡ะธั‚ะฐั‚ัŒ, ั‡ั‚ะพ ัั‚ะพ query-ะฟะฐั€ะฐะผะตั‚ั€.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  10. tests/test_forms_from_non_typing_sequences.py

    from fastapi import FastAPI, Form
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    @app.post("/form/python-list")
    def post_form_param_list(items: list = Form()):
        return items
    
    
    @app.post("/form/python-set")
    def post_form_param_set(items: set = Form()):
        return items
    
    
    @app.post("/form/python-tuple")
    def post_form_param_tuple(items: tuple = Form()):
        return items
    
    
    client = TestClient(app)
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 1.2K bytes
    - Viewed (0)
Back to top