This repository has been archived by the owner on Apr 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 339
add exporting table files #120
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
319e032
add exporting table files
d3c4e58
modify the way we handle long generation time
87ff77a
modify test
ff664a8
flake 8 fix
debf27c
update docs and some small changes
57aa3b9
fix in test
5ca5c98
support filters, rename function name
c5e998b
minor update in readme
7c35fd4
PR review feedback
1c94ae3
small funtion update
f2e219f
use while to avoid recursion
63eb730
text tweak
c713f0c
update readme
3d8ea55
text tweak
c681509
refactor and add test
87b1a14
change the way parameter is being passed
4c2924e
change parameters
1bbf98e
flake8 fix
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from quandl.errors.quandl_error import InvalidRequestError | ||
from .utils.api_key_util import ApiKeyUtil | ||
from .model.datatable import Datatable | ||
from .message import Message | ||
|
||
|
||
def export_table(datatable_code, **kwargs): | ||
"""Downloads an entire table as a zip file. | ||
:param str datatable_code: The datatable code to download, such as MER/F1 | ||
:param str filename: The filename for the download. \ | ||
If not specified, will download to the current working directory | ||
:param str api_key: Most databases require api_key for bulk download | ||
""" | ||
|
||
# discourage users from using authtoken | ||
if 'authtoken' in kwargs: | ||
raise InvalidRequestError(Message.ERROR_AUTHTOKEN_NOT_SUPPORTED) | ||
|
||
ApiKeyUtil.init_api_key_from_args(kwargs) | ||
|
||
filename = kwargs.pop('filename', '.') | ||
return Datatable(datatable_code).download_file(filename, **kwargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason for such formatting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure, I was looking at the old tests...