Skip to content

Downloader should accept a file object #55

@tbrittoborges

Description

@tbrittoborges

The new Downloader could accept a _file parameter to use a file object instead of a file path. Alternatively, we could use the following pattern:

import tempfile
uniprot_id = 'P17612'
with tempfile.NamedTemporaryFile(delete=False) as temp:
    Annotation.download(
        identifier=uniprot_id, 
        filename=temp.name)
    P17612_annotation = Annotation.read(filename=temp.name)

Which is also not working right now. I will investigate.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions