Streaming types / APIs in standard library
Open
Nobody has claimed this yet.
✨ enhancement
🎨 sdk
needs-discussion
- Dominant language
- TypeScript
- Stars
- 5.4k
- Forks
- 215
- Avg merge
- 2h 9m
- Merged PRs (30d)
- 27
Description
Use Case
- Downloading a file from a bucket and saving it directly to disk
- Downloading a file from an HTTP response, and performing processing on its output
- Reading a file from disk as a stream, and processing it piece by piece (e.g. to count how many lines it has)
- Streaming a response back from an API endpoint written by the user
Proposed Solution
Dedicated streaming APIs that don't require the entire contents of an API response or file or etc. to be loaded in memory at once.
(side note: maybe file streams and HTTP streams should be treated separately? I'm not sure)
Implementation Notes
References:
- https://streams.spec.whatwg.org/#readablestream
- https://developer.mozilla.org/en-US/docs/Web/API/Streams_API
- https://docs.python.org/3/library/io.html
- https://docs.python.org/3/library/asyncio-stream.html
- https://hexdocs.pm/file_streams/file_streams/file_stream.html
Component
SDK
Community Notes
- Please vote by adding a 👍 reaction to the issue to help us prioritize.
- If you are interested to work on this issue, please leave a comment.
- If this issue is labeled needs-discussion, it means the spec has not been finalized yet. Please reach out on the #dev channel in the Wing Discord.
Contributor 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.
Research direction
No implementation files, tests, or entry points are identified in the issue. Start by reviewing the linked WHATWG, MDN, Python, and Elixir streaming references and clarify whether file and HTTP streams share an API. Done means the SDK streaming API scope and specification are finalized, with the unresolved design questions addressed.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100