Feature: Stream bytes out on copy_from_container
評估
研究方向
先閱讀 copy_file_from_container() 的 Python 實作及其測試;issue 未指定特定檔案。檢查目前基於 Path 的複製如何實作,以及附近的 API 如何提供串流。完成標準是呼叫端可以收集複製的位元組,而不必將其寫入暫存檔,並且測試涵蓋新行為。
由索引模型根據 Issue 內容生成。
描述
What are you trying to do?
In Testcontainers Java, there's a handy override for copyFileFromContainer() that let's you pass a function to collect the output stream. This seems to be primarily exist so you can stream the bytes out without writing them to disk.
In Testcontainers Go, CopyFileFromContainer() returns an io.ReadCloser directly which is super nice.
It would be handy if there was a way to do this in the python version, which currently only supports passing a Path and writing to that path.
Why should it be done this way?
I don't want to use a temporary file on disk.
Other references:
https://golang.testcontainers.org/features/files_and_mounts/
- 主要語言
- Python
- 星號
- 2.3k
- 分支
- 397
- 平均合併
- 8 天 16 小時
- 30 天內合併 PR
- 5
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
testcontainers/testcontainers-python 的其他 Issue
-
Bug: HttpWaitStrategy ignores response predicates for accepted HTTP error statuses可能已有人在做 @PranavMulakala 於 41 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 85/100
-
Bug: LogMessageWaitStrategy: a container that exits before its message raises without its logs, and __enter__ then removes the container可能已有人在做 @granzer69 於 42 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 76/100
-
難度 2/5 1-3 小時 新手友好度 67/100
testcontainers/testcontainers-python#1086 · 1 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 68/100
testcontainers/testcontainers-python#578 · 5 則留言 ·
-
Bug: Reaper is force-removed at interpreter exit since 4.15.0, session containers are never reaped可能已有人在做 @pantafive 於 42 天前認領。 未關閉
難度 3/5 1-2 天 新手友好度 72/100
查看 testcontainers/testcontainers-python 的全部 Issue
相似的 Issue
-
bug feature request
難度 2/5 1-3 小時 新手友好度 67/100
維護者通常 1 天內回覆
-
難度 1/5 1-3 小時 新手友好度 66/100
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
Qiskit/qiskit-obp#156 ·
-
action-item enhancement
難度 2/5 1-3 小時 新手友好度 88/100
getcommunityone/open-navigator#1658 ·
維護者通常 1 天內回覆
-
review-panel severity:low
難度 2/5 1-3 小時 新手友好度 72/100
kristovatlas/coin-accounting#636 ·
維護者通常 1 天內回覆