Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 142 for host (0.16 sec)

  1. docs/en/docs/advanced/middleware.md

    ```
    
    ## `TrustedHostMiddleware`
    
    Enforces that all incoming requests have a correctly set `Host` header, in order to guard against HTTP Host Header attacks.
    
    ```Python hl_lines="2  6-8"
    {!../../../docs_src/advanced_middleware/tutorial002.py!}
    ```
    
    The following arguments are supported:
    
    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)
  2. docs/ko/docs/tutorial/debugging.md

    따라서 섹션
    
    ```Python
        uvicorn.run(app, host="0.0.0.0", port=8000)
    ```
    
    이 실행됩니다.
    
    ---
    
    해당 모듈(파일)을 가져오면 이런 일이 발생하지 않습니다
    
    그래서 다음과 같은 다른 파일 `importer.py`가 있는 경우:
    
    ```Python
    from myapp import app
    
    # Some more code
    ```
    
    이 경우 `myapp.py` 내부의 자동 변수에는 값이 `"__main__"`인 변수 `__name__`이 없습니다.
    
    따라서 다음 행
    
    ```Python
        uvicorn.run(app, host="0.0.0.0", port=8000)
    ```
    
    은 실행되지 않습니다.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 04:18:08 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  3. docs_src/debugging/tutorial001.py

    import uvicorn
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    def root():
        a = "a"
        b = "b" + a
        return {"hello world": b}
    
    
    if __name__ == "__main__":
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 223 bytes
    - Viewed (0)
  4. docs/pt/docs/deployment/https.md

        * Os conteúdos são criptografados, embora sejam enviados com o protocolo HTTP.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 05 10:40:05 GMT 2021
    - 3.9K bytes
    - Viewed (0)
  5. docs/ru/docs/tutorial/debugging.md

    </div>
    
    то встроенная переменная `__name__`, автоматически создаваемая Python в вашем файле, будет иметь значение строкового типа `"__main__"`.
    
    Тогда выполнится условие и эта часть кода:
    
    ```Python
        uvicorn.run(app, host="0.0.0.0", port=8000)
    ```
    
    будет запущена.
    
    ---
    
    Но этого не произойдет, если вы импортируете этот модуль (файл).
    
    Таким образом, если у вас есть файл `importer.py` с таким импортом:
    
    ```Python
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  6. docs/fr/docs/tutorial/debugging.md

    ```
    
    </div>
    
    alors la variable interne `__name__` de votre fichier, créée automatiquement par Python, aura pour valeur la chaîne de caractères `"__main__"`.
    
    Ainsi, la section :
    
    ```Python
        uvicorn.run(app, host="0.0.0.0", port=8000)
    ```
    
    va s'exécuter.
    
    ---
    
    Cela ne se produira pas si vous importez ce module (fichier).
    
    Par exemple, si vous avez un autre fichier `importer.py` qui contient :
    
    ```Python
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Mar 06 16:26:49 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  7. docs/em/docs/tutorial/debugging.md

    , 📄:
    
    ```Python
        uvicorn.run(app, host="0.0.0.0", port=8000)
    ```
    
    🔜 🏃.
    
    ---
    
    👉 🏆 🚫 🔨 🚥 👆 🗄 👈 🕹 (📁).
    
    , 🚥 👆 ✔️ ➕1️⃣ 📁 `importer.py` ⏮️:
    
    ```Python
    from myapp import app
    
    # Some more code
    ```
    
    👈 💼, 🏧 🔢 🔘 `myapp.py` 🔜 🚫 ✔️ 🔢 `__name__` ⏮️ 💲 `"__main__"`.
    
    , ⏸:
    
    ```Python
        uvicorn.run(app, host="0.0.0.0", port=8000)
    ```
    
    🔜 🚫 🛠️.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  8. docs/en/docs/img/deployment/https/https01.drawio

    <mxfile host="65bd71144e">
        <diagram id="jyERGzDynktFHFRGN0ph" name="Page-1">
            <mxGraphModel dx="2738" dy="2173" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1920" pageHeight="1200" math="0" shadow="0">
                <root>
                    <mxCell id="0"/>
                    <mxCell id="1" parent="0"/>
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 12 00:06:16 GMT 2022
    - 6.2K bytes
    - Viewed (0)
  9. docs/fr/docs/deployment/docker.md

    Dans ce cas, votre `Dockerfile` pourrait ressembler à ceci :
    
    ```Dockerfile
    FROM python:3.7
    
    RUN pip install fastapi uvicorn
    
    EXPOSE 80
    
    COPY ./app /app
    
    CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]
    ```
    
    ## Créer le code **FastAPI**.
    
    * Créer un répertoire `app` et y entrer.
    * Créez un fichier `main.py` avec :
    
    ```Python
    from typing import Optional
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 12 00:06:16 GMT 2022
    - 7.5K bytes
    - Viewed (0)
  10. docs/en/docs/advanced/using-request-directly.md

    But there are specific cases where it's useful to get the `Request` object.
    
    ## Use the `Request` object directly
    
    Let's imagine you want to get the client's IP address/host inside of your *path operation function*.
    
    For that you need to access the request directly.
    
    ```Python hl_lines="1  7-8"
    {!../../../docs_src/using_request_directly/tutorial001.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Aug 29 14:02:58 GMT 2020
    - 2.3K bytes
    - Viewed (0)
Back to top