kod-kristoff opened a new issue, #3444:
URL: https://github.com/apache/fory/issues/3444

   ### Feature Request
   
   I suggest that `Fory` adds a method `dump` (and maybe `load`) to serialize a 
object directly to a file.
   
   
   
   
   ### Is your feature request related to a problem? Please describe
   
   I have a very large Python class that I currently can pickle with 
   ```python
   obj = BigPythonObject()
   with Path(path).open("wb") as fp:
      pickle.dump(obj, fp)
   ```
   But with `pyfory` I need to use a temporary buffer and the program chrashes 
because of out-of-memory:
   ```python
   obj = BigPythonObject()
   tmp_buffer = fory.dumps(obj)
   Path(path).write_bytes(tmp_buffer)
   ```
   
   
   ### Describe the solution you'd like
   
   I want to be able to use `fory.dump(obj, fp)` where fp is a file-like object 
in the same manner as 
[`pickle.dump`](https://docs.python.org/3/library/pickle.html#pickle.dump)
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to