Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 520 for Contents (0.2 sec)

  1. docs/em/docs/tutorial/request-files.md

    * `close()`: 🔐 📁.
    
    🌐 👫 👩‍🔬 `async` 👩‍🔬, 👆 💪 "⌛" 👫.
    
    🖼, 🔘 `async` *➡ 🛠️ 🔢* 👆 💪 🤚 🎚 ⏮️:
    
    ```Python
    contents = await myfile.read()
    ```
    
    🚥 👆 🔘 😐 `def` *➡ 🛠️ 🔢*, 👆 💪 🔐 `UploadFile.file` 🔗, 🖼:
    
    ```Python
    contents = myfile.file.read()
    ```
    
    !!! note "`async` 📡 ℹ"
        🕐❔ 👆 ⚙️ `async` 👩‍🔬, **FastAPI** 🏃 📁 👩‍🔬 🧵 & ⌛ 👫.
    
    !!! note "💃 📡 ℹ"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 6.6K bytes
    - Viewed (0)
  2. docs/ko/docs/tutorial/request-files.md

    * `close()`: 파일을 닫습니다.
    
    상기 모든 메소드들이 `async` 메소드이기 때문에 “await”을 사용하여야 합니다.
    
    예를들어, `async` *경로 작동 함수*의 내부에서 다음과 같은 방식으로 내용을 가져올 수 있습니다:
    
    ```Python
    contents = await myfile.read()
    ```
    
    만약 일반적인 `def` *경로 작동 함수*의 내부라면, 다음과 같이 `UploadFile.file` 에 직접 접근할 수 있습니다:
    
    ```Python
    contents = myfile.file.read()
    ```
    
    !!! note  "`async` 기술적 세부사항"
        `async` 메소드들을 사용할 때 **FastAPI**는 스레드풀에서 파일 메소드들을 실행하고 그들을 기다립니다.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  3. docs/zh/docs/tutorial/request-files.md

    * `close()`:关闭文件。
    
    因为上述方法都是 `async` 方法,要搭配「await」使用。
    
    例如,在 `async` *路径操作函数* 内,要用以下方式读取文件内容:
    
    ```Python
    contents = await myfile.read()
    ```
    
    在普通 `def` *路径操作函数*  内,则可以直接访问 `UploadFile.file`,例如:
    
    ```Python
    contents = myfile.file.read()
    ```
    
    !!! note "`async` 技术细节"
    
        使用 `async` 方法时,**FastAPI** 在线程池中执行文件方法,并 `await` 操作完成。
    
    !!! note "Starlette 技术细节"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  4. .github/actions/notify-translations/app/main.py

        if not settings.github_event_path.is_file():
            raise RuntimeError(
                f"No github event file available at: {settings.github_event_path}"
            )
        contents = settings.github_event_path.read_text()
        github_event = PartialGitHubEvent.parse_raw(contents)
    
        # Avoid race conditions with multiple labels
        sleep_time = random.random() * 10  # random number between 0 and 10 seconds
        logging.info(
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Sep 27 23:01:46 GMT 2023
    - 12.4K bytes
    - Viewed (0)
  5. docs/en/docs/contributing.md

    ```yaml
    INHERIT: ../en/mkdocs.yml
    ```
    
    !!! tip
        You could also simply create that file with those contents manually.
    
    That command also created a dummy file `docs/ht/index.md` for the main page, you can start by translating that one.
    
    You can continue with the previous instructions for an "Existing Language" for that process.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 17:42:43 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  6. docs/ru/docs/tutorial/request-files.md

    Например, внутри `async` *функции операции пути* можно получить содержимое с помощью:
    
    ```Python
    contents = await myfile.read()
    ```
    
    Если вы находитесь внутри обычной `def` *функции операции пути*, можно получить прямой доступ к файлу `UploadFile.file`, например:
    
    ```Python
    contents = myfile.file.read()
    ```
    
    !!! note "Технические детали `async`"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_custom_response/test_tutorial004.py

    from fastapi.testclient import TestClient
    
    from docs_src.custom_response.tutorial004 import app
    
    client = TestClient(app)
    
    
    html_contents = """
        <html>
            <head>
                <title>Some HTML in here</title>
            </head>
            <body>
                <h1>Look ma! HTML!</h1>
            </body>
        </html>
        """
    
    
    def test_get_custom_response():
        response = client.get("/items/")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.2K bytes
    - Viewed (0)
  8. docs/em/docs/tutorial/dependencies/dependencies-with-yield.md

    🖼, <a href="https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files" class="external-link" target="_blank">👆 💪 ⚙️ `with` ✍ 📁</a>:
    
    ```Python
    with open("./somefile.txt") as f:
        contents = f.read()
        print(contents)
    ```
    
    🔘, `open("./somefile.txt")` ✍ 🎚 👈 🤙 "🔑 👨‍💼".
    
    🕐❔ `with` 🍫 🏁, ⚫️ ⚒ 💭 🔐 📁, 🚥 📤 ⚠.
    
    🕐❔ 👆 ✍ 🔗 ⏮️ `yield`, **FastAPI** 🔜 🔘 🗜 ⚫️ 🔑 👨‍💼, &amp; 🌀 ⚫️ ⏮️ 🎏 🔗 🧰.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/request-files.md

        * This is especially useful if you run `await myfile.read()` once and then need to read the contents again.
    * `close()`: Closes the file.
    
    As all these methods are `async` methods, you need to "await" them.
    
    For example, inside of an `async` *path operation function* you can get the contents with:
    
    ```Python
    contents = await myfile.read()
    ```
    
    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)
  10. docs/en/docs/how-to/nosql-databases-couchbase.md

    ## Get the user
    
    Now create a function that will:
    
    * Take a username.
    * Generate a document ID from it.
    * Get the document with that ID.
    * Put the contents of the document in a `UserInDB` model.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 16 13:23:25 GMT 2024
    - 6K bytes
    - Viewed (0)
Back to top