DelfiniItemWriterText¶
- class pydelfini.item_io.DelfiniItemWriterText(collection_id, version_id, item_id, client)[source]¶
Bases:
DelfiniItemWriterCore
,TextIO
File-like interface for writing text data to items.
It is important to either use this in a context manager or else call the
close()
method when writing is complete, otherwise the full contents of the file may not be written.Suggested usage:
with item.open('w') as fp: fp.write('my item content, as much as I have\n')
Attributes
buffer
closed
encoding
errors
line_buffering
mode
name
newlines
- Parameters:
collection_id (str)
version_id (str)
item_id (str)
client (AuthenticatedClient)
- close()¶
Close and flush the stream, completing the file write.
- Return type:
None
- seek(offset, whence=0)¶
N/A - not a real file
- truncate(size=None)¶
N/A - not a real file