Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1141 - 1150 of 1,977 for Fastapi (0.07 sec)

  1. tests/test_tutorial/test_security/test_tutorial001_an_py39.py

    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.security.tutorial001_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_no_token(client: TestClient):
        response = client.get("/items")
        assert response.status_code == 401, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  2. docs/ru/docs/tutorial/path-params.md

    ```JSON
    {"item_id":3}
    ```
    
    /// check | "Заметка"
    
    Обратите внимание на значение `3`, которое получила (и вернула) функция. Это целочисленный Python `int`, а не строка `"3"`.
    
    Используя определения типов, **FastAPI** выполняет автоматический <abbr title="преобразование строк из HTTP-запроса в типы данных Python">"парсинг"</abbr> запросов.
    
    ///
    
    ## <abbr title="Или валидация">Проверка</abbr> данных
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  3. docs/de/docs/advanced/generate-clients.md

    Einige von diesen ✨ [**sponsern FastAPI**](../help-fastapi.md#den-autor-sponsern){.internal-link target=_blank} ✨, das gewährleistet die kontinuierliche und gesunde **Entwicklung** von FastAPI und seinem **Ökosystem**.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  4. docs/en/docs/reference/exceptions.md

    You can use:
    
    * `HTTPException`
    * `WebSocketException`
    
    These exceptions can be imported directly from `fastapi`:
    
    ```python
    from fastapi import HTTPException, WebSocketException
    ```
    
    ::: fastapi.HTTPException
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 597 bytes
    - Viewed (0)
  5. docs_src/security/tutorial002_an_py310.py

    from typing import Annotated
    
    from fastapi import Depends, FastAPI
    from fastapi.security import OAuth2PasswordBearer
    from pydantic import BaseModel
    
    app = FastAPI()
    
    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
    
    
    class User(BaseModel):
        username: str
        email: str | None = None
        full_name: str | None = None
        disabled: bool | None = None
    
    
    def fake_decode_token(token):
        return User(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 761 bytes
    - Viewed (0)
  6. docs/pt/docs/tutorial/header-param-models.md

    Isso vai lhe permitir **reusar o modelo** em **múltiplos lugares** e também declarar validações e metadadados para todos os parâmetros de uma vez. 😎
    
    /// note | Nota
    
    Isso é possível desde a versão `0.115.0` do FastAPI. 🤓
    
    ///
    
    ## Parâmetros do Cabeçalho com um Modelo Pydantic
    
    Declare os **parâmetros de cabeçalho** que você precisa em um **modelo do Pydantic**, e então declare o parâmetro como `Header`:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Oct 22 20:41:28 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  7. docs_src/security/tutorial002.py

    from typing import Union
    
    from fastapi import Depends, FastAPI
    from fastapi.security import OAuth2PasswordBearer
    from pydantic import BaseModel
    
    app = FastAPI()
    
    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
    
    
    class User(BaseModel):
        username: str
        email: Union[str, None] = None
        full_name: Union[str, None] = None
        disabled: Union[bool, None] = None
    
    
    def fake_decode_token(token):
        return User(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 755 bytes
    - Viewed (0)
  8. docs/em/docs/tutorial/index.md

    ```
    
    </div>
    
    ⚫️ **🏆 💡** 👈 👆 ✍ ⚖️ 📁 📟, ✍ ⚫️ &amp; 🏃 ⚫️ 🌐.
    
    ⚙️ ⚫️ 👆 👨‍🎨 ⚫️❔ 🤙 🎦 👆 💰 FastAPI, 👀 ❔ 🐥 📟 👆 ✔️ ✍, 🌐 🆎 ✅, ✍, ♒️.
    
    ---
    
    ## ❎ FastAPI
    
    🥇 🔁 ❎ FastAPI.
    
    🔰, 👆 💪 💚 ❎ ⚫️ ⏮️ 🌐 📦 🔗 &amp; ⚒:
    
    <div class="termy">
    
    ```console
    $ pip install "fastapi[all]"
    
    ---> 100%
    ```
    
    </div>
    
    ...👈 🔌 `uvicorn`, 👈 👆 💪 ⚙️ 💽 👈 🏃 👆 📟.
    
    /// note
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  9. docs_src/security/tutorial002_an.py

    from typing import Union
    
    from fastapi import Depends, FastAPI
    from fastapi.security import OAuth2PasswordBearer
    from pydantic import BaseModel
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
    
    
    class User(BaseModel):
        username: str
        email: Union[str, None] = None
        full_name: Union[str, None] = None
        disabled: Union[bool, None] = None
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 815 bytes
    - Viewed (0)
  10. docs_src/security/tutorial007_an_py39.py

    import secrets
    from typing import Annotated
    
    from fastapi import Depends, FastAPI, HTTPException, status
    from fastapi.security import HTTPBasic, HTTPBasicCredentials
    
    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.1K bytes
    - Viewed (0)
Back to top