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

Feature Request: Streaming Support for Incremental Document Uploads #1465

Open
akramhecini opened this issue Jan 21, 2025 · 0 comments
Open

Comments

@akramhecini
Copy link

Hi there,

First off, thank you for the incredible work on python-docx ! It’s been such a reliable library for creating and handling Word documents, and I use it extensively in my projects.

I’m reaching out because I’ve run into a bit of a challenge with a specific workflow. In my use case, I generate documents dynamically and upload them to S3. Right now, I’m using a "file-part" approach: I generate a portion of the document, upload that part to S3, then later reassemble all the parts to create the final document.

This works, but it’s a bit clunky. The main issue is that I still have to generate parts of the document in memory before I can upload them. If I could stream the document content as it’s being generated, it would simplify things so much. I’m thinking of something similar to how video streaming works—you don’t wait for the whole file to be ready, you just send data as it’s created.

Here’s why streaming would be a game-changer:

  • Simpler workflows: No more splitting files or managing reassembly logic.
  • Lower memory usage: I wouldn’t need to hold big chunks of the document in memory or create temporary files.
  • Real-time uploads: This would let me generate and upload content on the fly, which is perfect for large or dynamic documents.

Thank you so much for considering this request, and thanks again for all the effort that goes into maintaining and improving this library!

Best regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant