sibblegp / b2blaze

b2blaze
MIT License
607 stars 32 forks source link

File-like object API support. #11

Open amcgregor opened 6 years ago

amcgregor commented 6 years ago

Or; "please make your file like object file-like" ;P

Glad a friend pointed me at this project; I love the idea, B2 is epic. I'm very strongly in favour of following Python standard object conventions for file-likes, that is, supplying File-like methods as described by Python 3's io package. Ref: https://docs.python.org/3/library/io.html#io.RawIOBase

An example of a Python 2 file-like compatible object can be found in Pymongo's GridFS implementation; for DB-distributed file chunking. (They went with distinct reader and writer objects.)

Thanks for consideration!