Feature: Stream bytes out on copy_from_container
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 67/100
Research direction
Start by reading the Python implementation of copy_file_from_container() and its tests; the issue does not name specific files. Check how the current Path-based copy is implemented and how nearby APIs expose streams. Done means callers can collect copied bytes without writing them to a temporary file, with tests covering the new behavior.
Written by the indexing model from the issue text.
Description
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/
- Dominant language
- Python
- Stars
- 2.3k
- Forks
- 397
- Avg merge
- 8d 16h
- Merged PRs (30d)
- 5
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from testcontainers/testcontainers-python
-
Bug: HttpWaitStrategy ignores response predicates for accepted HTTP error statusesPossibly taken @PranavMulakala claimed this 41 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Bug: LogMessageWaitStrategy: a container that exits before its message raises without its logs, and __enter__ then removes the containerPossibly taken @granzer69 claimed this 42 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
testcontainers/testcontainers-python#1086 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
testcontainers/testcontainers-python#578 · 5 comments ·
-
Bug: Reaper is force-removed at interpreter exit since 4.15.0, session containers are never reapedPossibly taken @pantafive claimed this 42 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 72/100
All issues in testcontainers/testcontainers-python
Similar issues
-
bug feature request
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Qiskit/qiskit-obp#156 ·
-
action-item enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
getcommunityone/open-navigator#1658 ·
Maintainers usually reply within 1 day
-
review-panel severity:low
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
kristovatlas/coin-accounting#636 ·
Maintainers usually reply within 1 day