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

Adding support to download the Files #9

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

abhi-glitchhg
Copy link

With these changes, record object can support the downloading of the files.
Addresses #5

@abhi-glitchhg abhi-glitchhg marked this pull request as ready for review April 10, 2023 21:38
@abhi-glitchhg abhi-glitchhg marked this pull request as draft April 10, 2023 21:38
@abhi-glitchhg
Copy link
Author

abhi-glitchhg commented Apr 10, 2023

minimalistic usage:

from pyzenodo3 import Zenodo

zen = Zenodo()

rec = zen.get_record(<give your record_id>)  # record_id should be of type string; # Todo add static typing.
rec.download("./") # here you can give the path where you want to download the file.

# using search method 

recs = zen.search("scivision") # remember this search method returns the list of record objects; hence one has to iterate on the returned object to use the download method. 
for rec in recs:
  rec.download("./")

src/pyzenodo3/base.py Outdated Show resolved Hide resolved
give pwd as default value for root
@abhi-glitchhg
Copy link
Author

@scivision, could you please review the PR and let me know your suggestions?

Thanks.

@abhi-glitchhg abhi-glitchhg marked this pull request as ready for review August 2, 2023 00:21
@romainsacchi
Copy link

Any chance you could proceed to merging? It'd be very useful to me, at least.

@abhi-glitchhg
Copy link
Author

abhi-glitchhg commented Sep 16, 2023

Any chance you could proceed to merging? It'd be very useful to me, at least.

The repository is stale; the maintainers are not responding. So merge isnt possible.

But if you still want to use the features proposed in this pr, you can install pyzenodo3 from my branch.

# activate your environment

git clone https://github.com/abhi-glitchhg/pyzenodo3.git
pip install -e pyzenodo3

Thanks,

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

Successfully merging this pull request may close these issues.

2 participants