Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downloader should accept a file object #55

Open
tbrittoborges opened this issue Jan 25, 2018 · 0 comments
Open

Downloader should accept a file object #55

tbrittoborges opened this issue Jan 25, 2018 · 0 comments
Assignees

Comments

@tbrittoborges
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant