Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): Streaming multipart parser #3872

Merged
merged 11 commits into from
Nov 28, 2024
Merged

feat(core): Streaming multipart parser #3872

merged 11 commits into from
Nov 28, 2024

Conversation

provinzkraut
Copy link
Member

Add a streaming multipart parser via the multipart lib.

This gives us:

  • Ability to stream large / larger-than-memory file uploads
  • Better / more correct edge case handling
  • Still good performance

@github-actions github-actions bot added area/connection area/dependencies This PR involves changes to the dependencies area/kwargs area/private-api This PR involves changes to the privatized API size: small type/feat area/multipart pr/internal labels Nov 23, 2024
pyproject.toml Outdated Show resolved Hide resolved
Copy link

codecov bot commented Nov 23, 2024

Codecov Report

Attention: Patch coverage is 95.12195% with 2 lines in your changes missing coverage. Please review.

Project coverage is 98.40%. Comparing base (444d594) to head (76cf74f).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
litestar/_multipart.py 94.73% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3872      +/-   ##
==========================================
- Coverage   98.41%   98.40%   -0.02%     
==========================================
  Files         344      344              
  Lines       15478    15467      -11     
  Branches     1702     1701       -1     
==========================================
- Hits        15233    15220      -13     
- Misses        115      118       +3     
+ Partials      130      129       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@defnull defnull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't wait till tomorrow with the review ;)

litestar/_multipart.py Show resolved Hide resolved
litestar/_multipart.py Outdated Show resolved Hide resolved
litestar/_multipart.py Outdated Show resolved Hide resolved
litestar/_multipart.py Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
@provinzkraut provinzkraut marked this pull request as ready for review November 24, 2024 17:09
@provinzkraut provinzkraut requested review from a team as code owners November 24, 2024 17:09
Copy link
Contributor

@euri10 euri10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amazing addition

tests/unit/test_kwargs/test_multipart_data.py Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
@cofin cofin force-pushed the streaming-multipart branch from ba9941d to 3150721 Compare November 26, 2024 22:39
Copy link

Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/3872

@defnull
Copy link

defnull commented Nov 28, 2024

Multipart v1.2.0 is released now :)
Changelog: https://multipart.readthedocs.io/en/latest/changelog.html

@provinzkraut provinzkraut enabled auto-merge (squash) November 28, 2024 17:36
@provinzkraut provinzkraut merged commit 7bf0a51 into main Nov 28, 2024
24 of 26 checks passed
@provinzkraut provinzkraut deleted the streaming-multipart branch November 28, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants