Closed JR-1991 closed 4 months ago
Overview
This pull request introduces the possibility of passing other IO objects, such as BytesIO or StringIO, alongside local files.
IO
BytesIO
StringIO
Example
from dvuploader import File, DVUploader from io import BytesIO handler = BytesIO(b"some file data") file = File( filepath="somefile.txt", handler=handler, ) uploader = DVUploader(files=[file]) uploader.upload( persistent_id="<persistent_id>", api_token="<api_token>", dataverse_url="<dataverse_url>", )
Overview
This pull request introduces the possibility of passing other
IO
objects, such asBytesIO
orStringIO
, alongside local files.Example